generated-configure.sh revision 754:b2b87e9e8683
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
684JT_HOME
685JTREGEXE
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
800CODESIGN
801XATTR
802IS_GNU_TIME
803TIME
804STAT
805HG
806READELF
807OTOOL
808LDD
809ZIP
810UNZIP
811FIND_DELETE
812MAKE
813CHECK_TOOLSDIR_MAKE
814CHECK_TOOLSDIR_GMAKE
815CHECK_MAKE
816CHECK_GMAKE
817PKGHANDLER
818OUTPUT_ROOT
819CONF_NAME
820SPEC
821BUILD_VARIANT_RELEASE
822DEBUG_CLASSFILES
823FASTDEBUG
824VARIANT
825DEBUG_LEVEL
826MACOSX_UNIVERSAL
827INCLUDE_SA
828JVM_VARIANT_ZEROSHARK
829JVM_VARIANT_ZERO
830JVM_VARIANT_KERNEL
831JVM_VARIANT_MINIMAL1
832JVM_VARIANT_CLIENT
833JVM_VARIANT_SERVER
834JVM_VARIANTS
835JDK_VARIANT
836SET_OPENJDK
837BUILD_LOG_WRAPPER
838BUILD_LOG_PREVIOUS
839BUILD_LOG
840SYS_ROOT
841PATH_SEP
842SRC_ROOT
843ZERO_ARCHDEF
844DEFINE_CROSS_COMPILE_ARCH
845LP64
846OPENJDK_TARGET_OS_API_DIR
847OPENJDK_TARGET_CPU_JLI_CFLAGS
848OPENJDK_TARGET_CPU_OSARCH
849OPENJDK_TARGET_CPU_ISADIR
850OPENJDK_TARGET_CPU_LIBDIR
851OPENJDK_TARGET_CPU_LEGACY_LIB
852OPENJDK_TARGET_CPU_LEGACY
853REQUIRED_OS_VERSION
854REQUIRED_OS_NAME
855COMPILE_TYPE
856OPENJDK_TARGET_CPU_ENDIAN
857OPENJDK_TARGET_CPU_BITS
858OPENJDK_TARGET_CPU_ARCH
859OPENJDK_TARGET_CPU
860OPENJDK_TARGET_OS_API
861OPENJDK_TARGET_OS
862OPENJDK_BUILD_CPU_ENDIAN
863OPENJDK_BUILD_CPU_BITS
864OPENJDK_BUILD_CPU_ARCH
865OPENJDK_BUILD_CPU
866OPENJDK_BUILD_OS_API
867OPENJDK_BUILD_OS
868OPENJDK_BUILD_AUTOCONF_NAME
869OPENJDK_TARGET_AUTOCONF_NAME
870target_os
871target_vendor
872target_cpu
873target
874host_os
875host_vendor
876host_cpu
877host
878build_os
879build_vendor
880build_cpu
881build
882SETFILE
883DF
884READLINK
885CYGPATH
886NAWK
887SED
888FGREP
889EGREP
890GREP
891AWK
892XARGS
893WHICH
894WC
895UNIQ
896UNAME
897TR
898TOUCH
899TEE
900TAR
901TAIL
902SORT
903SH
904RM
905PRINTF
906MV
907MKTEMP
908MKDIR
909LS
910LN
911HEAD
912FIND
913FILE
914EXPR
915ECHO
916DIRNAME
917DIFF
918DATE
919CUT
920CPIO
921CP
922COMM
923CMP
924CHMOD
925CAT
926BASH
927BASENAME
928DATE_WHEN_CONFIGURED
929CONFIGURE_COMMAND_LINE
930CUSTOM_MAKE_DIR
931target_alias
932host_alias
933build_alias
934LIBS
935ECHO_T
936ECHO_N
937ECHO_C
938DEFS
939mandir
940localedir
941libdir
942psdir
943pdfdir
944dvidir
945htmldir
946infodir
947docdir
948oldincludedir
949includedir
950localstatedir
951sharedstatedir
952sysconfdir
953datadir
954datarootdir
955libexecdir
956sbindir
957bindir
958program_transform_name
959prefix
960exec_prefix
961PACKAGE_URL
962PACKAGE_BUGREPORT
963PACKAGE_STRING
964PACKAGE_VERSION
965PACKAGE_TARNAME
966PACKAGE_NAME
967PATH_SEPARATOR
968SHELL'
969ac_subst_files=''
970ac_user_opts='
971enable_option_checking
972with_custom_make_dir
973with_target_bits
974with_sys_root
975with_tools_dir
976with_devkit
977enable_openjdk_only
978with_jdk_variant
979with_jvm_variants
980enable_debug
981with_debug_level
982with_conf_name
983with_builddeps_conf
984with_builddeps_server
985with_builddeps_dir
986with_builddeps_group
987enable_headful
988enable_hotspot_test_in_build
989with_cacerts_file
990enable_unlimited_crypto
991with_milestone
992with_update_version
993with_build_number
994with_user_release_suffix
995with_boot_jdk
996with_boot_jdk_jvmargs
997with_add_source_root
998with_override_source_root
999with_adds_and_overrides
1000with_override_langtools
1001with_override_corba
1002with_override_jaxp
1003with_override_jaxws
1004with_override_hotspot
1005with_override_jdk
1006with_import_hotspot
1007with_msvcr_dll
1008with_dxsdk
1009with_dxsdk_lib
1010with_dxsdk_include
1011with_jtreg
1012with_extra_cflags
1013with_extra_cxxflags
1014with_extra_ldflags
1015enable_debug_symbols
1016enable_zip_debug_info
1017enable_macosx_runtime_support
1018with_x
1019with_cups
1020with_cups_include
1021with_freetype
1022with_alsa
1023with_alsa_include
1024with_alsa_lib
1025with_giflib
1026with_zlib
1027with_stdc__lib
1028with_num_cores
1029with_memory_size
1030with_jobs
1031with_sjavac_server_java
1032enable_sjavac
1033enable_precompiled_headers
1034enable_ccache
1035with_ccache_dir
1036'
1037      ac_precious_vars='build_alias
1038host_alias
1039target_alias
1040PKG_CONFIG
1041CC
1042CFLAGS
1043LDFLAGS
1044LIBS
1045CPPFLAGS
1046CXX
1047CXXFLAGS
1048CCC
1049OBJC
1050OBJCFLAGS
1051CPP
1052CXXCPP
1053XMKMF
1054FREETYPE2_CFLAGS
1055FREETYPE2_LIBS
1056ALSA_CFLAGS
1057ALSA_LIBS
1058LIBFFI_CFLAGS
1059LIBFFI_LIBS'
1060
1061
1062# Initialize some variables set by options.
1063ac_init_help=
1064ac_init_version=false
1065ac_unrecognized_opts=
1066ac_unrecognized_sep=
1067# The variables have the same names as the options, with
1068# dashes changed to underlines.
1069cache_file=/dev/null
1070exec_prefix=NONE
1071no_create=
1072no_recursion=
1073prefix=NONE
1074program_prefix=NONE
1075program_suffix=NONE
1076program_transform_name=s,x,x,
1077silent=
1078site=
1079srcdir=
1080verbose=
1081x_includes=NONE
1082x_libraries=NONE
1083
1084# Installation directory options.
1085# These are left unexpanded so users can "make install exec_prefix=/foo"
1086# and all the variables that are supposed to be based on exec_prefix
1087# by default will actually change.
1088# Use braces instead of parens because sh, perl, etc. also accept them.
1089# (The list follows the same order as the GNU Coding Standards.)
1090bindir='${exec_prefix}/bin'
1091sbindir='${exec_prefix}/sbin'
1092libexecdir='${exec_prefix}/libexec'
1093datarootdir='${prefix}/share'
1094datadir='${datarootdir}'
1095sysconfdir='${prefix}/etc'
1096sharedstatedir='${prefix}/com'
1097localstatedir='${prefix}/var'
1098includedir='${prefix}/include'
1099oldincludedir='/usr/include'
1100docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1101infodir='${datarootdir}/info'
1102htmldir='${docdir}'
1103dvidir='${docdir}'
1104pdfdir='${docdir}'
1105psdir='${docdir}'
1106libdir='${exec_prefix}/lib'
1107localedir='${datarootdir}/locale'
1108mandir='${datarootdir}/man'
1109
1110ac_prev=
1111ac_dashdash=
1112for ac_option
1113do
1114  # If the previous option needs an argument, assign it.
1115  if test -n "$ac_prev"; then
1116    eval $ac_prev=\$ac_option
1117    ac_prev=
1118    continue
1119  fi
1120
1121  case $ac_option in
1122  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1123  *=)   ac_optarg= ;;
1124  *)    ac_optarg=yes ;;
1125  esac
1126
1127  # Accept the important Cygnus configure options, so we can diagnose typos.
1128
1129  case $ac_dashdash$ac_option in
1130  --)
1131    ac_dashdash=yes ;;
1132
1133  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1134    ac_prev=bindir ;;
1135  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1136    bindir=$ac_optarg ;;
1137
1138  -build | --build | --buil | --bui | --bu)
1139    ac_prev=build_alias ;;
1140  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1141    build_alias=$ac_optarg ;;
1142
1143  -cache-file | --cache-file | --cache-fil | --cache-fi \
1144  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1145    ac_prev=cache_file ;;
1146  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1147  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1148    cache_file=$ac_optarg ;;
1149
1150  --config-cache | -C)
1151    cache_file=config.cache ;;
1152
1153  -datadir | --datadir | --datadi | --datad)
1154    ac_prev=datadir ;;
1155  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1156    datadir=$ac_optarg ;;
1157
1158  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1159  | --dataroo | --dataro | --datar)
1160    ac_prev=datarootdir ;;
1161  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1162  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1163    datarootdir=$ac_optarg ;;
1164
1165  -disable-* | --disable-*)
1166    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1167    # Reject names that are not valid shell variable names.
1168    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1169      as_fn_error $? "invalid feature name: $ac_useropt"
1170    ac_useropt_orig=$ac_useropt
1171    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1172    case $ac_user_opts in
1173      *"
1174"enable_$ac_useropt"
1175"*) ;;
1176      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1177	 ac_unrecognized_sep=', ';;
1178    esac
1179    eval enable_$ac_useropt=no ;;
1180
1181  -docdir | --docdir | --docdi | --doc | --do)
1182    ac_prev=docdir ;;
1183  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1184    docdir=$ac_optarg ;;
1185
1186  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1187    ac_prev=dvidir ;;
1188  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1189    dvidir=$ac_optarg ;;
1190
1191  -enable-* | --enable-*)
1192    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1193    # Reject names that are not valid shell variable names.
1194    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1195      as_fn_error $? "invalid feature name: $ac_useropt"
1196    ac_useropt_orig=$ac_useropt
1197    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198    case $ac_user_opts in
1199      *"
1200"enable_$ac_useropt"
1201"*) ;;
1202      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1203	 ac_unrecognized_sep=', ';;
1204    esac
1205    eval enable_$ac_useropt=\$ac_optarg ;;
1206
1207  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1208  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1209  | --exec | --exe | --ex)
1210    ac_prev=exec_prefix ;;
1211  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1212  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1213  | --exec=* | --exe=* | --ex=*)
1214    exec_prefix=$ac_optarg ;;
1215
1216  -gas | --gas | --ga | --g)
1217    # Obsolete; use --with-gas.
1218    with_gas=yes ;;
1219
1220  -help | --help | --hel | --he | -h)
1221    ac_init_help=long ;;
1222  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1223    ac_init_help=recursive ;;
1224  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1225    ac_init_help=short ;;
1226
1227  -host | --host | --hos | --ho)
1228    ac_prev=host_alias ;;
1229  -host=* | --host=* | --hos=* | --ho=*)
1230    host_alias=$ac_optarg ;;
1231
1232  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1233    ac_prev=htmldir ;;
1234  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1235  | --ht=*)
1236    htmldir=$ac_optarg ;;
1237
1238  -includedir | --includedir | --includedi | --included | --include \
1239  | --includ | --inclu | --incl | --inc)
1240    ac_prev=includedir ;;
1241  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1242  | --includ=* | --inclu=* | --incl=* | --inc=*)
1243    includedir=$ac_optarg ;;
1244
1245  -infodir | --infodir | --infodi | --infod | --info | --inf)
1246    ac_prev=infodir ;;
1247  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1248    infodir=$ac_optarg ;;
1249
1250  -libdir | --libdir | --libdi | --libd)
1251    ac_prev=libdir ;;
1252  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1253    libdir=$ac_optarg ;;
1254
1255  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1256  | --libexe | --libex | --libe)
1257    ac_prev=libexecdir ;;
1258  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1259  | --libexe=* | --libex=* | --libe=*)
1260    libexecdir=$ac_optarg ;;
1261
1262  -localedir | --localedir | --localedi | --localed | --locale)
1263    ac_prev=localedir ;;
1264  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1265    localedir=$ac_optarg ;;
1266
1267  -localstatedir | --localstatedir | --localstatedi | --localstated \
1268  | --localstate | --localstat | --localsta | --localst | --locals)
1269    ac_prev=localstatedir ;;
1270  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1271  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1272    localstatedir=$ac_optarg ;;
1273
1274  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1275    ac_prev=mandir ;;
1276  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1277    mandir=$ac_optarg ;;
1278
1279  -nfp | --nfp | --nf)
1280    # Obsolete; use --without-fp.
1281    with_fp=no ;;
1282
1283  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1284  | --no-cr | --no-c | -n)
1285    no_create=yes ;;
1286
1287  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1288  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1289    no_recursion=yes ;;
1290
1291  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1292  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1293  | --oldin | --oldi | --old | --ol | --o)
1294    ac_prev=oldincludedir ;;
1295  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1296  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1297  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1298    oldincludedir=$ac_optarg ;;
1299
1300  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1301    ac_prev=prefix ;;
1302  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1303    prefix=$ac_optarg ;;
1304
1305  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1306  | --program-pre | --program-pr | --program-p)
1307    ac_prev=program_prefix ;;
1308  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1309  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1310    program_prefix=$ac_optarg ;;
1311
1312  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1313  | --program-suf | --program-su | --program-s)
1314    ac_prev=program_suffix ;;
1315  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1316  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1317    program_suffix=$ac_optarg ;;
1318
1319  -program-transform-name | --program-transform-name \
1320  | --program-transform-nam | --program-transform-na \
1321  | --program-transform-n | --program-transform- \
1322  | --program-transform | --program-transfor \
1323  | --program-transfo | --program-transf \
1324  | --program-trans | --program-tran \
1325  | --progr-tra | --program-tr | --program-t)
1326    ac_prev=program_transform_name ;;
1327  -program-transform-name=* | --program-transform-name=* \
1328  | --program-transform-nam=* | --program-transform-na=* \
1329  | --program-transform-n=* | --program-transform-=* \
1330  | --program-transform=* | --program-transfor=* \
1331  | --program-transfo=* | --program-transf=* \
1332  | --program-trans=* | --program-tran=* \
1333  | --progr-tra=* | --program-tr=* | --program-t=*)
1334    program_transform_name=$ac_optarg ;;
1335
1336  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1337    ac_prev=pdfdir ;;
1338  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1339    pdfdir=$ac_optarg ;;
1340
1341  -psdir | --psdir | --psdi | --psd | --ps)
1342    ac_prev=psdir ;;
1343  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1344    psdir=$ac_optarg ;;
1345
1346  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1347  | -silent | --silent | --silen | --sile | --sil)
1348    silent=yes ;;
1349
1350  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1351    ac_prev=sbindir ;;
1352  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1353  | --sbi=* | --sb=*)
1354    sbindir=$ac_optarg ;;
1355
1356  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1357  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1358  | --sharedst | --shareds | --shared | --share | --shar \
1359  | --sha | --sh)
1360    ac_prev=sharedstatedir ;;
1361  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1362  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1363  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1364  | --sha=* | --sh=*)
1365    sharedstatedir=$ac_optarg ;;
1366
1367  -site | --site | --sit)
1368    ac_prev=site ;;
1369  -site=* | --site=* | --sit=*)
1370    site=$ac_optarg ;;
1371
1372  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1373    ac_prev=srcdir ;;
1374  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1375    srcdir=$ac_optarg ;;
1376
1377  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1378  | --syscon | --sysco | --sysc | --sys | --sy)
1379    ac_prev=sysconfdir ;;
1380  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1381  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1382    sysconfdir=$ac_optarg ;;
1383
1384  -target | --target | --targe | --targ | --tar | --ta | --t)
1385    ac_prev=target_alias ;;
1386  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1387    target_alias=$ac_optarg ;;
1388
1389  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1390    verbose=yes ;;
1391
1392  -version | --version | --versio | --versi | --vers | -V)
1393    ac_init_version=: ;;
1394
1395  -with-* | --with-*)
1396    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1397    # Reject names that are not valid shell variable names.
1398    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1399      as_fn_error $? "invalid package name: $ac_useropt"
1400    ac_useropt_orig=$ac_useropt
1401    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1402    case $ac_user_opts in
1403      *"
1404"with_$ac_useropt"
1405"*) ;;
1406      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1407	 ac_unrecognized_sep=', ';;
1408    esac
1409    eval with_$ac_useropt=\$ac_optarg ;;
1410
1411  -without-* | --without-*)
1412    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1413    # Reject names that are not valid shell variable names.
1414    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1415      as_fn_error $? "invalid package name: $ac_useropt"
1416    ac_useropt_orig=$ac_useropt
1417    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1418    case $ac_user_opts in
1419      *"
1420"with_$ac_useropt"
1421"*) ;;
1422      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1423	 ac_unrecognized_sep=', ';;
1424    esac
1425    eval with_$ac_useropt=no ;;
1426
1427  --x)
1428    # Obsolete; use --with-x.
1429    with_x=yes ;;
1430
1431  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1432  | --x-incl | --x-inc | --x-in | --x-i)
1433    ac_prev=x_includes ;;
1434  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1435  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1436    x_includes=$ac_optarg ;;
1437
1438  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1439  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1440    ac_prev=x_libraries ;;
1441  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1442  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1443    x_libraries=$ac_optarg ;;
1444
1445  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1446Try \`$0 --help' for more information"
1447    ;;
1448
1449  *=*)
1450    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1451    # Reject names that are not valid shell variable names.
1452    case $ac_envvar in #(
1453      '' | [0-9]* | *[!_$as_cr_alnum]* )
1454      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1455    esac
1456    eval $ac_envvar=\$ac_optarg
1457    export $ac_envvar ;;
1458
1459  *)
1460    # FIXME: should be removed in autoconf 3.0.
1461    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1462    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1463      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1464    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1465    ;;
1466
1467  esac
1468done
1469
1470if test -n "$ac_prev"; then
1471  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1472  as_fn_error $? "missing argument to $ac_option"
1473fi
1474
1475if test -n "$ac_unrecognized_opts"; then
1476  case $enable_option_checking in
1477    no) ;;
1478    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1479    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1480  esac
1481fi
1482
1483# Check all directory arguments for consistency.
1484for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1485		datadir sysconfdir sharedstatedir localstatedir includedir \
1486		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1487		libdir localedir mandir
1488do
1489  eval ac_val=\$$ac_var
1490  # Remove trailing slashes.
1491  case $ac_val in
1492    */ )
1493      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1494      eval $ac_var=\$ac_val;;
1495  esac
1496  # Be sure to have absolute directory names.
1497  case $ac_val in
1498    [\\/$]* | ?:[\\/]* )  continue;;
1499    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1500  esac
1501  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1502done
1503
1504# There might be people who depend on the old broken behavior: `$host'
1505# used to hold the argument of --host etc.
1506# FIXME: To remove some day.
1507build=$build_alias
1508host=$host_alias
1509target=$target_alias
1510
1511# FIXME: To remove some day.
1512if test "x$host_alias" != x; then
1513  if test "x$build_alias" = x; then
1514    cross_compiling=maybe
1515    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1516    If a cross compiler is detected then cross compile mode will be used" >&2
1517  elif test "x$build_alias" != "x$host_alias"; then
1518    cross_compiling=yes
1519  fi
1520fi
1521
1522ac_tool_prefix=
1523test -n "$host_alias" && ac_tool_prefix=$host_alias-
1524
1525test "$silent" = yes && exec 6>/dev/null
1526
1527
1528ac_pwd=`pwd` && test -n "$ac_pwd" &&
1529ac_ls_di=`ls -di .` &&
1530ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1531  as_fn_error $? "working directory cannot be determined"
1532test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1533  as_fn_error $? "pwd does not report name of working directory"
1534
1535
1536# Find the source files, if location was not specified.
1537if test -z "$srcdir"; then
1538  ac_srcdir_defaulted=yes
1539  # Try the directory containing this script, then the parent directory.
1540  ac_confdir=`$as_dirname -- "$as_myself" ||
1541$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1542	 X"$as_myself" : 'X\(//\)[^/]' \| \
1543	 X"$as_myself" : 'X\(//\)$' \| \
1544	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1545$as_echo X"$as_myself" |
1546    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1547	    s//\1/
1548	    q
1549	  }
1550	  /^X\(\/\/\)[^/].*/{
1551	    s//\1/
1552	    q
1553	  }
1554	  /^X\(\/\/\)$/{
1555	    s//\1/
1556	    q
1557	  }
1558	  /^X\(\/\).*/{
1559	    s//\1/
1560	    q
1561	  }
1562	  s/.*/./; q'`
1563  srcdir=$ac_confdir
1564  if test ! -r "$srcdir/$ac_unique_file"; then
1565    srcdir=..
1566  fi
1567else
1568  ac_srcdir_defaulted=no
1569fi
1570if test ! -r "$srcdir/$ac_unique_file"; then
1571  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1572  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1573fi
1574ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1575ac_abs_confdir=`(
1576	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1577	pwd)`
1578# When building in place, set srcdir=.
1579if test "$ac_abs_confdir" = "$ac_pwd"; then
1580  srcdir=.
1581fi
1582# Remove unnecessary trailing slashes from srcdir.
1583# Double slashes in file names in object file debugging info
1584# mess up M-x gdb in Emacs.
1585case $srcdir in
1586*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1587esac
1588for ac_var in $ac_precious_vars; do
1589  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1590  eval ac_env_${ac_var}_value=\$${ac_var}
1591  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1592  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1593done
1594
1595#
1596# Report the --help message.
1597#
1598if test "$ac_init_help" = "long"; then
1599  # Omit some internal or obsolete options to make the list less imposing.
1600  # This message is too long to be a string in the A/UX 3.1 sh.
1601  cat <<_ACEOF
1602\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1603
1604Usage: $0 [OPTION]... [VAR=VALUE]...
1605
1606To assign environment variables (e.g., CC, CFLAGS...), specify them as
1607VAR=VALUE.  See below for descriptions of some of the useful variables.
1608
1609Defaults for the options are specified in brackets.
1610
1611Configuration:
1612  -h, --help              display this help and exit
1613      --help=short        display options specific to this package
1614      --help=recursive    display the short help of all the included packages
1615  -V, --version           display version information and exit
1616  -q, --quiet, --silent   do not print \`checking ...' messages
1617      --cache-file=FILE   cache test results in FILE [disabled]
1618  -C, --config-cache      alias for \`--cache-file=config.cache'
1619  -n, --no-create         do not create output files
1620      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1621
1622Installation directories:
1623  --prefix=PREFIX         install architecture-independent files in PREFIX
1624                          [$ac_default_prefix]
1625  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1626                          [PREFIX]
1627
1628By default, \`make install' will install all the files in
1629\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1630an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1631for instance \`--prefix=\$HOME'.
1632
1633For better control, use the options below.
1634
1635Fine tuning of the installation directories:
1636  --bindir=DIR            user executables [EPREFIX/bin]
1637  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1638  --libexecdir=DIR        program executables [EPREFIX/libexec]
1639  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1640  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1641  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1642  --libdir=DIR            object code libraries [EPREFIX/lib]
1643  --includedir=DIR        C header files [PREFIX/include]
1644  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1645  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1646  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1647  --infodir=DIR           info documentation [DATAROOTDIR/info]
1648  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1649  --mandir=DIR            man documentation [DATAROOTDIR/man]
1650  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1651  --htmldir=DIR           html documentation [DOCDIR]
1652  --dvidir=DIR            dvi documentation [DOCDIR]
1653  --pdfdir=DIR            pdf documentation [DOCDIR]
1654  --psdir=DIR             ps documentation [DOCDIR]
1655_ACEOF
1656
1657  cat <<\_ACEOF
1658
1659X features:
1660  --x-includes=DIR    X include files are in DIR
1661  --x-libraries=DIR   X library files are in DIR
1662
1663System types:
1664  --build=BUILD     configure for building on BUILD [guessed]
1665  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1666  --target=TARGET   configure for building compilers for TARGET [HOST]
1667_ACEOF
1668fi
1669
1670if test -n "$ac_init_help"; then
1671  case $ac_init_help in
1672     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1673   esac
1674  cat <<\_ACEOF
1675
1676Optional Features:
1677  --disable-option-checking  ignore unrecognized --enable/--with options
1678  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1679  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1680  --enable-openjdk-only   suppress building custom source even if present
1681                          [disabled]
1682  --enable-debug          set the debug level to fastdebug (shorthand for
1683                          --with-debug-level=fastdebug) [disabled]
1684  --disable-headful       disable building headful support (graphical UI
1685                          support) [enabled]
1686  --enable-hotspot-test-in-build
1687                          run the Queens test after Hotspot build [disabled]
1688  --enable-unlimited-crypto
1689                          Enable unlimited crypto policy [disabled]
1690  --disable-debug-symbols disable generation of debug symbols [enabled]
1691  --disable-zip-debug-info
1692                          disable zipping of debug-info files [enabled]
1693  --disable-macosx-runtime-support
1694                          disable the use of MacOSX Java runtime support
1695                          framework [enabled]
1696  --enable-sjavac         use sjavac to do fast incremental compiles
1697                          [disabled]
1698  --disable-precompiled-headers
1699                          disable using precompiled headers when compiling C++
1700                          [enabled]
1701  --disable-ccache        disable using ccache to speed up recompilations
1702                          [enabled]
1703
1704Optional Packages:
1705  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1706  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1707  --with-custom-make-dir  use this directory for custom build/make files
1708  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1709                          support it), e.g. --with-target-bits=32 [guessed]
1710  --with-sys-root         pass this sys-root to the compilers and tools (for
1711                          cross-compiling)
1712  --with-tools-dir        search this directory for compilers and tools (for
1713                          cross-compiling)
1714  --with-devkit           use this directory as base for tools-dir and
1715                          sys-root (for cross-compiling)
1716  --with-jdk-variant      JDK variant to build (normal) [normal]
1717  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1718                          client, minimal1, kernel, zero, zeroshark) [server]
1719  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1720                          [release]
1721  --with-conf-name        use this as the name of the configuration [generated
1722                          from important configuration options]
1723  --with-builddeps-conf   use this configuration file for the builddeps
1724  --with-builddeps-server download and use build dependencies from this server
1725                          url
1726  --with-builddeps-dir    store downloaded build dependencies here
1727                          [/localhome/builddeps]
1728  --with-builddeps-group  chgrp the downloaded build dependencies to this
1729                          group
1730  --with-cacerts-file     specify alternative cacerts file
1731  --with-milestone        Set milestone value for build [internal]
1732  --with-update-version   Set update version value for build [b00]
1733  --with-build-number     Set build number value for build [b00]
1734  --with-user-release-suffix
1735                          Add a custom string to the version string if build
1736                          number isn't set.[username_builddateb00]
1737  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1738  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1739                          invocations of the Boot JDK, overriding the default
1740                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1741                          -enableassertions"
1742  --with-add-source-root  for each and every source directory, look in this
1743                          additional source root for the same directory; if it
1744                          exists and have files in it, include it in the build
1745  --with-override-source-root
1746                          for each and every source directory, look in this
1747                          override source root for the same directory; if it
1748                          exists, use that directory instead and ignore the
1749                          directory in the original source root
1750  --with-adds-and-overrides
1751                          use the subdirs 'adds' and 'overrides' in the
1752                          specified directory as add-source-root and
1753                          override-source-root
1754  --with-override-langtools
1755                          use this langtools dir for the build
1756  --with-override-corba   use this corba dir for the build
1757  --with-override-jaxp    use this jaxp dir for the build
1758  --with-override-jaxws   use this jaxws dir for the build
1759  --with-override-hotspot use this hotspot dir for the build
1760  --with-override-jdk     use this jdk dir for the build
1761  --with-import-hotspot   import hotspot binaries from this jdk image or
1762                          hotspot build dist dir instead of building from
1763                          source
1764  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1765                          only) [probed]
1766  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1767  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1768                          [probed]
1769  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1770                          [probed]
1771  --with-jtreg            Regression Test Harness [probed]
1772  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1773  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1774  --with-extra-ldflags    extra flags to be used when linking jdk
1775  --with-x                use the X Window System
1776  --with-cups             specify prefix directory for the cups package
1777                          (expecting the headers under PATH/include)
1778  --with-cups-include     specify directory for the cups include files
1779  --with-freetype         specify prefix directory for the freetype2 package
1780                          (expecting the libraries under PATH/lib and the
1781                          headers under PATH/include)
1782  --with-alsa             specify prefix directory for the alsa package
1783                          (expecting the libraries under PATH/lib and the
1784                          headers under PATH/include)
1785  --with-alsa-include     specify directory for the alsa include files
1786  --with-alsa-lib         specify directory for the alsa library
1787  --with-giflib           use giflib from build system or OpenJDK source
1788                          (system, bundled) [bundled]
1789  --with-zlib             use zlib from build system or OpenJDK source
1790                          (system, bundled) [bundled]
1791  --with-stdc++lib=<static>,<dynamic>,<default>
1792                          force linking of the C++ runtime on Linux to either
1793                          static or dynamic, default is static with dynamic as
1794                          fallback
1795  --with-num-cores        number of cores in the build system, e.g.
1796                          --with-num-cores=8 [probed]
1797  --with-memory-size      memory (in MB) available in the build system, e.g.
1798                          --with-memory-size=1024 [probed]
1799  --with-jobs             number of parallel jobs to let make run [calculated
1800                          based on cores and memory]
1801  --with-sjavac-server-java
1802                          use this java binary for running the sjavac
1803                          background server [Boot JDK java]
1804  --with-ccache-dir       where to store ccache files [~/.ccache]
1805
1806Some influential environment variables:
1807  PKG_CONFIG  path to pkg-config utility
1808  CC          C compiler command
1809  CFLAGS      C compiler flags
1810  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1811              nonstandard directory <lib dir>
1812  LIBS        libraries to pass to the linker, e.g. -l<library>
1813  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1814              you have headers in a nonstandard directory <include dir>
1815  CXX         C++ compiler command
1816  CXXFLAGS    C++ compiler flags
1817  OBJC        Objective C compiler command
1818  OBJCFLAGS   Objective C compiler flags
1819  CPP         C preprocessor
1820  CXXCPP      C++ preprocessor
1821  XMKMF       Path to xmkmf, Makefile generator for X Window System
1822  FREETYPE2_CFLAGS
1823              C compiler flags for FREETYPE2, overriding pkg-config
1824  FREETYPE2_LIBS
1825              linker flags for FREETYPE2, overriding pkg-config
1826  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1827  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1828  LIBFFI_CFLAGS
1829              C compiler flags for LIBFFI, overriding pkg-config
1830  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1831
1832Use these variables to override the choices made by `configure' or to help
1833it to find libraries and programs with nonstandard names/locations.
1834
1835Report bugs to <build-dev@openjdk.java.net>.
1836OpenJDK home page: <http://openjdk.java.net>.
1837_ACEOF
1838ac_status=$?
1839fi
1840
1841if test "$ac_init_help" = "recursive"; then
1842  # If there are subdirs, report their specific --help.
1843  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1844    test -d "$ac_dir" ||
1845      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1846      continue
1847    ac_builddir=.
1848
1849case "$ac_dir" in
1850.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1851*)
1852  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1853  # A ".." for each directory in $ac_dir_suffix.
1854  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1855  case $ac_top_builddir_sub in
1856  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1857  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1858  esac ;;
1859esac
1860ac_abs_top_builddir=$ac_pwd
1861ac_abs_builddir=$ac_pwd$ac_dir_suffix
1862# for backward compatibility:
1863ac_top_builddir=$ac_top_build_prefix
1864
1865case $srcdir in
1866  .)  # We are building in place.
1867    ac_srcdir=.
1868    ac_top_srcdir=$ac_top_builddir_sub
1869    ac_abs_top_srcdir=$ac_pwd ;;
1870  [\\/]* | ?:[\\/]* )  # Absolute name.
1871    ac_srcdir=$srcdir$ac_dir_suffix;
1872    ac_top_srcdir=$srcdir
1873    ac_abs_top_srcdir=$srcdir ;;
1874  *) # Relative name.
1875    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1876    ac_top_srcdir=$ac_top_build_prefix$srcdir
1877    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1878esac
1879ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1880
1881    cd "$ac_dir" || { ac_status=$?; continue; }
1882    # Check for guested configure.
1883    if test -f "$ac_srcdir/configure.gnu"; then
1884      echo &&
1885      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1886    elif test -f "$ac_srcdir/configure"; then
1887      echo &&
1888      $SHELL "$ac_srcdir/configure" --help=recursive
1889    else
1890      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1891    fi || ac_status=$?
1892    cd "$ac_pwd" || { ac_status=$?; break; }
1893  done
1894fi
1895
1896test -n "$ac_init_help" && exit $ac_status
1897if $ac_init_version; then
1898  cat <<\_ACEOF
1899OpenJDK configure jdk8
1900generated by GNU Autoconf 2.67
1901
1902Copyright (C) 2010 Free Software Foundation, Inc.
1903This configure script is free software; the Free Software Foundation
1904gives unlimited permission to copy, distribute and modify it.
1905_ACEOF
1906  exit
1907fi
1908
1909## ------------------------ ##
1910## Autoconf initialization. ##
1911## ------------------------ ##
1912
1913# ac_fn_c_try_compile LINENO
1914# --------------------------
1915# Try to compile conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_c_try_compile ()
1917{
1918  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919  rm -f conftest.$ac_objext
1920  if { { ac_try="$ac_compile"
1921case "(($ac_try" in
1922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923  *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927  (eval "$ac_compile") 2>conftest.err
1928  ac_status=$?
1929  if test -s conftest.err; then
1930    grep -v '^ *+' conftest.err >conftest.er1
1931    cat conftest.er1 >&5
1932    mv -f conftest.er1 conftest.err
1933  fi
1934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935  test $ac_status = 0; } && {
1936	 test -z "$ac_c_werror_flag" ||
1937	 test ! -s conftest.err
1938       } && test -s conftest.$ac_objext; then :
1939  ac_retval=0
1940else
1941  $as_echo "$as_me: failed program was:" >&5
1942sed 's/^/| /' conftest.$ac_ext >&5
1943
1944	ac_retval=1
1945fi
1946  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1947  as_fn_set_status $ac_retval
1948
1949} # ac_fn_c_try_compile
1950
1951# ac_fn_cxx_try_compile LINENO
1952# ----------------------------
1953# Try to compile conftest.$ac_ext, and return whether this succeeded.
1954ac_fn_cxx_try_compile ()
1955{
1956  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957  rm -f conftest.$ac_objext
1958  if { { ac_try="$ac_compile"
1959case "(($ac_try" in
1960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961  *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965  (eval "$ac_compile") 2>conftest.err
1966  ac_status=$?
1967  if test -s conftest.err; then
1968    grep -v '^ *+' conftest.err >conftest.er1
1969    cat conftest.er1 >&5
1970    mv -f conftest.er1 conftest.err
1971  fi
1972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973  test $ac_status = 0; } && {
1974	 test -z "$ac_cxx_werror_flag" ||
1975	 test ! -s conftest.err
1976       } && test -s conftest.$ac_objext; then :
1977  ac_retval=0
1978else
1979  $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
1981
1982	ac_retval=1
1983fi
1984  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985  as_fn_set_status $ac_retval
1986
1987} # ac_fn_cxx_try_compile
1988
1989# ac_fn_objc_try_compile LINENO
1990# -----------------------------
1991# Try to compile conftest.$ac_ext, and return whether this succeeded.
1992ac_fn_objc_try_compile ()
1993{
1994  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995  rm -f conftest.$ac_objext
1996  if { { ac_try="$ac_compile"
1997case "(($ac_try" in
1998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1999  *) ac_try_echo=$ac_try;;
2000esac
2001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2002$as_echo "$ac_try_echo"; } >&5
2003  (eval "$ac_compile") 2>conftest.err
2004  ac_status=$?
2005  if test -s conftest.err; then
2006    grep -v '^ *+' conftest.err >conftest.er1
2007    cat conftest.er1 >&5
2008    mv -f conftest.er1 conftest.err
2009  fi
2010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2011  test $ac_status = 0; } && {
2012	 test -z "$ac_objc_werror_flag" ||
2013	 test ! -s conftest.err
2014       } && test -s conftest.$ac_objext; then :
2015  ac_retval=0
2016else
2017  $as_echo "$as_me: failed program was:" >&5
2018sed 's/^/| /' conftest.$ac_ext >&5
2019
2020	ac_retval=1
2021fi
2022  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2023  as_fn_set_status $ac_retval
2024
2025} # ac_fn_objc_try_compile
2026
2027# ac_fn_c_try_cpp LINENO
2028# ----------------------
2029# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2030ac_fn_c_try_cpp ()
2031{
2032  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2033  if { { ac_try="$ac_cpp conftest.$ac_ext"
2034case "(($ac_try" in
2035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2036  *) ac_try_echo=$ac_try;;
2037esac
2038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2039$as_echo "$ac_try_echo"; } >&5
2040  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2041  ac_status=$?
2042  if test -s conftest.err; then
2043    grep -v '^ *+' conftest.err >conftest.er1
2044    cat conftest.er1 >&5
2045    mv -f conftest.er1 conftest.err
2046  fi
2047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2048  test $ac_status = 0; } > conftest.i && {
2049	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2050	 test ! -s conftest.err
2051       }; then :
2052  ac_retval=0
2053else
2054  $as_echo "$as_me: failed program was:" >&5
2055sed 's/^/| /' conftest.$ac_ext >&5
2056
2057    ac_retval=1
2058fi
2059  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2060  as_fn_set_status $ac_retval
2061
2062} # ac_fn_c_try_cpp
2063
2064# ac_fn_cxx_try_cpp LINENO
2065# ------------------------
2066# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2067ac_fn_cxx_try_cpp ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if { { ac_try="$ac_cpp conftest.$ac_ext"
2071case "(($ac_try" in
2072  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2073  *) ac_try_echo=$ac_try;;
2074esac
2075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2076$as_echo "$ac_try_echo"; } >&5
2077  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2078  ac_status=$?
2079  if test -s conftest.err; then
2080    grep -v '^ *+' conftest.err >conftest.er1
2081    cat conftest.er1 >&5
2082    mv -f conftest.er1 conftest.err
2083  fi
2084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2085  test $ac_status = 0; } > conftest.i && {
2086	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2087	 test ! -s conftest.err
2088       }; then :
2089  ac_retval=0
2090else
2091  $as_echo "$as_me: failed program was:" >&5
2092sed 's/^/| /' conftest.$ac_ext >&5
2093
2094    ac_retval=1
2095fi
2096  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2097  as_fn_set_status $ac_retval
2098
2099} # ac_fn_cxx_try_cpp
2100
2101# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2102# ---------------------------------------------------------
2103# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2104# the include files in INCLUDES and setting the cache variable VAR
2105# accordingly.
2106ac_fn_cxx_check_header_mongrel ()
2107{
2108  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2109  if eval "test \"\${$3+set}\"" = set; then :
2110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2111$as_echo_n "checking for $2... " >&6; }
2112if eval "test \"\${$3+set}\"" = set; then :
2113  $as_echo_n "(cached) " >&6
2114fi
2115eval ac_res=\$$3
2116	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2117$as_echo "$ac_res" >&6; }
2118else
2119  # Is the header compilable?
2120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2121$as_echo_n "checking $2 usability... " >&6; }
2122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h.  */
2124$4
2125#include <$2>
2126_ACEOF
2127if ac_fn_cxx_try_compile "$LINENO"; then :
2128  ac_header_compiler=yes
2129else
2130  ac_header_compiler=no
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2134$as_echo "$ac_header_compiler" >&6; }
2135
2136# Is the header present?
2137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2138$as_echo_n "checking $2 presence... " >&6; }
2139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140/* end confdefs.h.  */
2141#include <$2>
2142_ACEOF
2143if ac_fn_cxx_try_cpp "$LINENO"; then :
2144  ac_header_preproc=yes
2145else
2146  ac_header_preproc=no
2147fi
2148rm -f conftest.err conftest.i conftest.$ac_ext
2149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2150$as_echo "$ac_header_preproc" >&6; }
2151
2152# So?  What about this header?
2153case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2154  yes:no: )
2155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2156$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2158$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2159    ;;
2160  no:yes:* )
2161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2162$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2163    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2164$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2165    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2166$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2167    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2168$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2170$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2171( $as_echo "## ----------------------------------------- ##
2172## Report this to build-dev@openjdk.java.net ##
2173## ----------------------------------------- ##"
2174     ) | sed "s/^/$as_me: WARNING:     /" >&2
2175    ;;
2176esac
2177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
2179if eval "test \"\${$3+set}\"" = set; then :
2180  $as_echo_n "(cached) " >&6
2181else
2182  eval "$3=\$ac_header_compiler"
2183fi
2184eval ac_res=\$$3
2185	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2186$as_echo "$ac_res" >&6; }
2187fi
2188  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2189
2190} # ac_fn_cxx_check_header_mongrel
2191
2192# ac_fn_cxx_try_run LINENO
2193# ------------------------
2194# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2195# that executables *can* be run.
2196ac_fn_cxx_try_run ()
2197{
2198  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199  if { { ac_try="$ac_link"
2200case "(($ac_try" in
2201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2202  *) ac_try_echo=$ac_try;;
2203esac
2204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2205$as_echo "$ac_try_echo"; } >&5
2206  (eval "$ac_link") 2>&5
2207  ac_status=$?
2208  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2209  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2210  { { case "(($ac_try" in
2211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212  *) ac_try_echo=$ac_try;;
2213esac
2214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215$as_echo "$ac_try_echo"; } >&5
2216  (eval "$ac_try") 2>&5
2217  ac_status=$?
2218  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2219  test $ac_status = 0; }; }; then :
2220  ac_retval=0
2221else
2222  $as_echo "$as_me: program exited with status $ac_status" >&5
2223       $as_echo "$as_me: failed program was:" >&5
2224sed 's/^/| /' conftest.$ac_ext >&5
2225
2226       ac_retval=$ac_status
2227fi
2228  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2229  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2230  as_fn_set_status $ac_retval
2231
2232} # ac_fn_cxx_try_run
2233
2234# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2235# ---------------------------------------------------------
2236# Tests whether HEADER exists and can be compiled using the include files in
2237# INCLUDES, setting the cache variable VAR accordingly.
2238ac_fn_cxx_check_header_compile ()
2239{
2240  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2242$as_echo_n "checking for $2... " >&6; }
2243if eval "test \"\${$3+set}\"" = set; then :
2244  $as_echo_n "(cached) " >&6
2245else
2246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h.  */
2248$4
2249#include <$2>
2250_ACEOF
2251if ac_fn_cxx_try_compile "$LINENO"; then :
2252  eval "$3=yes"
2253else
2254  eval "$3=no"
2255fi
2256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257fi
2258eval ac_res=\$$3
2259	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260$as_echo "$ac_res" >&6; }
2261  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2262
2263} # ac_fn_cxx_check_header_compile
2264
2265# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2266# ----------------------------------------------
2267# Tries to find the compile-time value of EXPR in a program that includes
2268# INCLUDES, setting VAR accordingly. Returns whether the value could be
2269# computed
2270ac_fn_cxx_compute_int ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if test "$cross_compiling" = yes; then
2274    # Depending upon the size, compute the lo and hi bounds.
2275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h.  */
2277$4
2278int
2279main ()
2280{
2281static int test_array [1 - 2 * !(($2) >= 0)];
2282test_array [0] = 0
2283
2284  ;
2285  return 0;
2286}
2287_ACEOF
2288if ac_fn_cxx_try_compile "$LINENO"; then :
2289  ac_lo=0 ac_mid=0
2290  while :; do
2291    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h.  */
2293$4
2294int
2295main ()
2296{
2297static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2298test_array [0] = 0
2299
2300  ;
2301  return 0;
2302}
2303_ACEOF
2304if ac_fn_cxx_try_compile "$LINENO"; then :
2305  ac_hi=$ac_mid; break
2306else
2307  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2308			if test $ac_lo -le $ac_mid; then
2309			  ac_lo= ac_hi=
2310			  break
2311			fi
2312			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315  done
2316else
2317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h.  */
2319$4
2320int
2321main ()
2322{
2323static int test_array [1 - 2 * !(($2) < 0)];
2324test_array [0] = 0
2325
2326  ;
2327  return 0;
2328}
2329_ACEOF
2330if ac_fn_cxx_try_compile "$LINENO"; then :
2331  ac_hi=-1 ac_mid=-1
2332  while :; do
2333    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334/* end confdefs.h.  */
2335$4
2336int
2337main ()
2338{
2339static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2340test_array [0] = 0
2341
2342  ;
2343  return 0;
2344}
2345_ACEOF
2346if ac_fn_cxx_try_compile "$LINENO"; then :
2347  ac_lo=$ac_mid; break
2348else
2349  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2350			if test $ac_mid -le $ac_hi; then
2351			  ac_lo= ac_hi=
2352			  break
2353			fi
2354			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2355fi
2356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2357  done
2358else
2359  ac_lo= ac_hi=
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2364# Binary search between lo and hi bounds.
2365while test "x$ac_lo" != "x$ac_hi"; do
2366  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h.  */
2369$4
2370int
2371main ()
2372{
2373static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2374test_array [0] = 0
2375
2376  ;
2377  return 0;
2378}
2379_ACEOF
2380if ac_fn_cxx_try_compile "$LINENO"; then :
2381  ac_hi=$ac_mid
2382else
2383  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386done
2387case $ac_lo in #((
2388?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2389'') ac_retval=1 ;;
2390esac
2391  else
2392    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2393/* end confdefs.h.  */
2394$4
2395static long int longval () { return $2; }
2396static unsigned long int ulongval () { return $2; }
2397#include <stdio.h>
2398#include <stdlib.h>
2399int
2400main ()
2401{
2402
2403  FILE *f = fopen ("conftest.val", "w");
2404  if (! f)
2405    return 1;
2406  if (($2) < 0)
2407    {
2408      long int i = longval ();
2409      if (i != ($2))
2410	return 1;
2411      fprintf (f, "%ld", i);
2412    }
2413  else
2414    {
2415      unsigned long int i = ulongval ();
2416      if (i != ($2))
2417	return 1;
2418      fprintf (f, "%lu", i);
2419    }
2420  /* Do not output a trailing newline, as this causes \r\n confusion
2421     on some platforms.  */
2422  return ferror (f) || fclose (f) != 0;
2423
2424  ;
2425  return 0;
2426}
2427_ACEOF
2428if ac_fn_cxx_try_run "$LINENO"; then :
2429  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2430else
2431  ac_retval=1
2432fi
2433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2434  conftest.$ac_objext conftest.beam conftest.$ac_ext
2435rm -f conftest.val
2436
2437  fi
2438  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2439  as_fn_set_status $ac_retval
2440
2441} # ac_fn_cxx_compute_int
2442
2443# ac_fn_cxx_try_link LINENO
2444# -------------------------
2445# Try to link conftest.$ac_ext, and return whether this succeeded.
2446ac_fn_cxx_try_link ()
2447{
2448  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2449  rm -f conftest.$ac_objext conftest$ac_exeext
2450  if { { ac_try="$ac_link"
2451case "(($ac_try" in
2452  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2453  *) ac_try_echo=$ac_try;;
2454esac
2455eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2456$as_echo "$ac_try_echo"; } >&5
2457  (eval "$ac_link") 2>conftest.err
2458  ac_status=$?
2459  if test -s conftest.err; then
2460    grep -v '^ *+' conftest.err >conftest.er1
2461    cat conftest.er1 >&5
2462    mv -f conftest.er1 conftest.err
2463  fi
2464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2465  test $ac_status = 0; } && {
2466	 test -z "$ac_cxx_werror_flag" ||
2467	 test ! -s conftest.err
2468       } && test -s conftest$ac_exeext && {
2469	 test "$cross_compiling" = yes ||
2470	 $as_test_x conftest$ac_exeext
2471       }; then :
2472  ac_retval=0
2473else
2474  $as_echo "$as_me: failed program was:" >&5
2475sed 's/^/| /' conftest.$ac_ext >&5
2476
2477	ac_retval=1
2478fi
2479  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2480  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2481  # interfere with the next link command; also delete a directory that is
2482  # left behind by Apple's compiler.  We do this before executing the actions.
2483  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2484  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2485  as_fn_set_status $ac_retval
2486
2487} # ac_fn_cxx_try_link
2488
2489# ac_fn_cxx_check_func LINENO FUNC VAR
2490# ------------------------------------
2491# Tests whether FUNC exists, setting the cache variable VAR accordingly
2492ac_fn_cxx_check_func ()
2493{
2494  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2496$as_echo_n "checking for $2... " >&6; }
2497if eval "test \"\${$3+set}\"" = set; then :
2498  $as_echo_n "(cached) " >&6
2499else
2500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2501/* end confdefs.h.  */
2502/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2503   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2504#define $2 innocuous_$2
2505
2506/* System header to define __stub macros and hopefully few prototypes,
2507    which can conflict with char $2 (); below.
2508    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2509    <limits.h> exists even on freestanding compilers.  */
2510
2511#ifdef __STDC__
2512# include <limits.h>
2513#else
2514# include <assert.h>
2515#endif
2516
2517#undef $2
2518
2519/* Override any GCC internal prototype to avoid an error.
2520   Use char because int might match the return type of a GCC
2521   builtin and then its argument prototype would still apply.  */
2522#ifdef __cplusplus
2523extern "C"
2524#endif
2525char $2 ();
2526/* The GNU C library defines this for functions which it implements
2527    to always fail with ENOSYS.  Some functions are actually named
2528    something starting with __ and the normal name is an alias.  */
2529#if defined __stub_$2 || defined __stub___$2
2530choke me
2531#endif
2532
2533int
2534main ()
2535{
2536return $2 ();
2537  ;
2538  return 0;
2539}
2540_ACEOF
2541if ac_fn_cxx_try_link "$LINENO"; then :
2542  eval "$3=yes"
2543else
2544  eval "$3=no"
2545fi
2546rm -f core conftest.err conftest.$ac_objext \
2547    conftest$ac_exeext conftest.$ac_ext
2548fi
2549eval ac_res=\$$3
2550	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2551$as_echo "$ac_res" >&6; }
2552  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2553
2554} # ac_fn_cxx_check_func
2555
2556# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2557# -------------------------------------------------------
2558# Tests whether HEADER exists and can be compiled using the include files in
2559# INCLUDES, setting the cache variable VAR accordingly.
2560ac_fn_c_check_header_compile ()
2561{
2562  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2564$as_echo_n "checking for $2... " >&6; }
2565if eval "test \"\${$3+set}\"" = set; then :
2566  $as_echo_n "(cached) " >&6
2567else
2568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2569/* end confdefs.h.  */
2570$4
2571#include <$2>
2572_ACEOF
2573if ac_fn_c_try_compile "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2579fi
2580eval ac_res=\$$3
2581	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582$as_echo "$ac_res" >&6; }
2583  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2584
2585} # ac_fn_c_check_header_compile
2586cat >config.log <<_ACEOF
2587This file contains any messages produced by compilers while
2588running configure, to aid debugging if configure makes a mistake.
2589
2590It was created by OpenJDK $as_me jdk8, which was
2591generated by GNU Autoconf 2.67.  Invocation command line was
2592
2593  $ $0 $@
2594
2595_ACEOF
2596exec 5>>config.log
2597{
2598cat <<_ASUNAME
2599## --------- ##
2600## Platform. ##
2601## --------- ##
2602
2603hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2604uname -m = `(uname -m) 2>/dev/null || echo unknown`
2605uname -r = `(uname -r) 2>/dev/null || echo unknown`
2606uname -s = `(uname -s) 2>/dev/null || echo unknown`
2607uname -v = `(uname -v) 2>/dev/null || echo unknown`
2608
2609/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2610/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2611
2612/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2613/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2614/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2615/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2616/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2617/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2618/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2619
2620_ASUNAME
2621
2622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623for as_dir in $PATH
2624do
2625  IFS=$as_save_IFS
2626  test -z "$as_dir" && as_dir=.
2627    $as_echo "PATH: $as_dir"
2628  done
2629IFS=$as_save_IFS
2630
2631} >&5
2632
2633cat >&5 <<_ACEOF
2634
2635
2636## ----------- ##
2637## Core tests. ##
2638## ----------- ##
2639
2640_ACEOF
2641
2642
2643# Keep a trace of the command line.
2644# Strip out --no-create and --no-recursion so they do not pile up.
2645# Strip out --silent because we don't want to record it for future runs.
2646# Also quote any args containing shell meta-characters.
2647# Make two passes to allow for proper duplicate-argument suppression.
2648ac_configure_args=
2649ac_configure_args0=
2650ac_configure_args1=
2651ac_must_keep_next=false
2652for ac_pass in 1 2
2653do
2654  for ac_arg
2655  do
2656    case $ac_arg in
2657    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2658    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2659    | -silent | --silent | --silen | --sile | --sil)
2660      continue ;;
2661    *\'*)
2662      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2663    esac
2664    case $ac_pass in
2665    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2666    2)
2667      as_fn_append ac_configure_args1 " '$ac_arg'"
2668      if test $ac_must_keep_next = true; then
2669	ac_must_keep_next=false # Got value, back to normal.
2670      else
2671	case $ac_arg in
2672	  *=* | --config-cache | -C | -disable-* | --disable-* \
2673	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2674	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2675	  | -with-* | --with-* | -without-* | --without-* | --x)
2676	    case "$ac_configure_args0 " in
2677	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2678	    esac
2679	    ;;
2680	  -* ) ac_must_keep_next=true ;;
2681	esac
2682      fi
2683      as_fn_append ac_configure_args " '$ac_arg'"
2684      ;;
2685    esac
2686  done
2687done
2688{ ac_configure_args0=; unset ac_configure_args0;}
2689{ ac_configure_args1=; unset ac_configure_args1;}
2690
2691# When interrupted or exit'd, cleanup temporary files, and complete
2692# config.log.  We remove comments because anyway the quotes in there
2693# would cause problems or look ugly.
2694# WARNING: Use '\'' to represent an apostrophe within the trap.
2695# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2696trap 'exit_status=$?
2697  # Save into config.log some information that might help in debugging.
2698  {
2699    echo
2700
2701    $as_echo "## ---------------- ##
2702## Cache variables. ##
2703## ---------------- ##"
2704    echo
2705    # The following way of writing the cache mishandles newlines in values,
2706(
2707  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2708    eval ac_val=\$$ac_var
2709    case $ac_val in #(
2710    *${as_nl}*)
2711      case $ac_var in #(
2712      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2713$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2714      esac
2715      case $ac_var in #(
2716      _ | IFS | as_nl) ;; #(
2717      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2718      *) { eval $ac_var=; unset $ac_var;} ;;
2719      esac ;;
2720    esac
2721  done
2722  (set) 2>&1 |
2723    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2724    *${as_nl}ac_space=\ *)
2725      sed -n \
2726	"s/'\''/'\''\\\\'\'''\''/g;
2727	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2728      ;; #(
2729    *)
2730      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2731      ;;
2732    esac |
2733    sort
2734)
2735    echo
2736
2737    $as_echo "## ----------------- ##
2738## Output variables. ##
2739## ----------------- ##"
2740    echo
2741    for ac_var in $ac_subst_vars
2742    do
2743      eval ac_val=\$$ac_var
2744      case $ac_val in
2745      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746      esac
2747      $as_echo "$ac_var='\''$ac_val'\''"
2748    done | sort
2749    echo
2750
2751    if test -n "$ac_subst_files"; then
2752      $as_echo "## ------------------- ##
2753## File substitutions. ##
2754## ------------------- ##"
2755      echo
2756      for ac_var in $ac_subst_files
2757      do
2758	eval ac_val=\$$ac_var
2759	case $ac_val in
2760	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2761	esac
2762	$as_echo "$ac_var='\''$ac_val'\''"
2763      done | sort
2764      echo
2765    fi
2766
2767    if test -s confdefs.h; then
2768      $as_echo "## ----------- ##
2769## confdefs.h. ##
2770## ----------- ##"
2771      echo
2772      cat confdefs.h
2773      echo
2774    fi
2775    test "$ac_signal" != 0 &&
2776      $as_echo "$as_me: caught signal $ac_signal"
2777    $as_echo "$as_me: exit $exit_status"
2778  } >&5
2779  rm -f core *.core core.conftest.* &&
2780    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2781    exit $exit_status
2782' 0
2783for ac_signal in 1 2 13 15; do
2784  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2785done
2786ac_signal=0
2787
2788# confdefs.h avoids OS command line length limits that DEFS can exceed.
2789rm -f -r conftest* confdefs.h
2790
2791$as_echo "/* confdefs.h */" > confdefs.h
2792
2793# Predefined preprocessor variables.
2794
2795cat >>confdefs.h <<_ACEOF
2796#define PACKAGE_NAME "$PACKAGE_NAME"
2797_ACEOF
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2801_ACEOF
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_VERSION "$PACKAGE_VERSION"
2805_ACEOF
2806
2807cat >>confdefs.h <<_ACEOF
2808#define PACKAGE_STRING "$PACKAGE_STRING"
2809_ACEOF
2810
2811cat >>confdefs.h <<_ACEOF
2812#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2813_ACEOF
2814
2815cat >>confdefs.h <<_ACEOF
2816#define PACKAGE_URL "$PACKAGE_URL"
2817_ACEOF
2818
2819
2820# Let the site file select an alternate cache file if it wants to.
2821# Prefer an explicitly selected file to automatically selected ones.
2822ac_site_file1=NONE
2823ac_site_file2=NONE
2824if test -n "$CONFIG_SITE"; then
2825  # We do not want a PATH search for config.site.
2826  case $CONFIG_SITE in #((
2827    -*)  ac_site_file1=./$CONFIG_SITE;;
2828    */*) ac_site_file1=$CONFIG_SITE;;
2829    *)   ac_site_file1=./$CONFIG_SITE;;
2830  esac
2831elif test "x$prefix" != xNONE; then
2832  ac_site_file1=$prefix/share/config.site
2833  ac_site_file2=$prefix/etc/config.site
2834else
2835  ac_site_file1=$ac_default_prefix/share/config.site
2836  ac_site_file2=$ac_default_prefix/etc/config.site
2837fi
2838for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2839do
2840  test "x$ac_site_file" = xNONE && continue
2841  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2842    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2843$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2844    sed 's/^/| /' "$ac_site_file" >&5
2845    . "$ac_site_file" \
2846      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2848as_fn_error $? "failed to load site script $ac_site_file
2849See \`config.log' for more details" "$LINENO" 5 ; }
2850  fi
2851done
2852
2853if test -r "$cache_file"; then
2854  # Some versions of bash will fail to source /dev/null (special files
2855  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2856  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2857    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2858$as_echo "$as_me: loading cache $cache_file" >&6;}
2859    case $cache_file in
2860      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2861      *)                      . "./$cache_file";;
2862    esac
2863  fi
2864else
2865  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2866$as_echo "$as_me: creating cache $cache_file" >&6;}
2867  >$cache_file
2868fi
2869
2870# Check that the precious variables saved in the cache have kept the same
2871# value.
2872ac_cache_corrupted=false
2873for ac_var in $ac_precious_vars; do
2874  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2875  eval ac_new_set=\$ac_env_${ac_var}_set
2876  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2877  eval ac_new_val=\$ac_env_${ac_var}_value
2878  case $ac_old_set,$ac_new_set in
2879    set,)
2880      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2881$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2882      ac_cache_corrupted=: ;;
2883    ,set)
2884      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2885$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2886      ac_cache_corrupted=: ;;
2887    ,);;
2888    *)
2889      if test "x$ac_old_val" != "x$ac_new_val"; then
2890	# differences in whitespace do not lead to failure.
2891	ac_old_val_w=`echo x $ac_old_val`
2892	ac_new_val_w=`echo x $ac_new_val`
2893	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2894	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2895$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2896	  ac_cache_corrupted=:
2897	else
2898	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2899$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2900	  eval $ac_var=\$ac_old_val
2901	fi
2902	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2903$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2904	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2905$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2906      fi;;
2907  esac
2908  # Pass precious variables to config.status.
2909  if test "$ac_new_set" = set; then
2910    case $ac_new_val in
2911    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2912    *) ac_arg=$ac_var=$ac_new_val ;;
2913    esac
2914    case " $ac_configure_args " in
2915      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2916      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2917    esac
2918  fi
2919done
2920if $ac_cache_corrupted; then
2921  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2923  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2924$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2925  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2926fi
2927## -------------------- ##
2928## Main body of script. ##
2929## -------------------- ##
2930
2931ac_ext=c
2932ac_cpp='$CPP $CPPFLAGS'
2933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2935ac_compiler_gnu=$ac_cv_c_compiler_gnu
2936
2937
2938
2939ac_aux_dir=
2940for ac_dir in build-aux "$srcdir"/build-aux; do
2941  if test -f "$ac_dir/install-sh"; then
2942    ac_aux_dir=$ac_dir
2943    ac_install_sh="$ac_aux_dir/install-sh -c"
2944    break
2945  elif test -f "$ac_dir/install.sh"; then
2946    ac_aux_dir=$ac_dir
2947    ac_install_sh="$ac_aux_dir/install.sh -c"
2948    break
2949  elif test -f "$ac_dir/shtool"; then
2950    ac_aux_dir=$ac_dir
2951    ac_install_sh="$ac_aux_dir/shtool install -c"
2952    break
2953  fi
2954done
2955if test -z "$ac_aux_dir"; then
2956  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2957fi
2958
2959# These three variables are undocumented and unsupported,
2960# and are intended to be withdrawn in a future Autoconf release.
2961# They can cause serious problems if a builder's source tree is in a directory
2962# whose full name contains unusual characters.
2963ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2964ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2965ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2966
2967
2968# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2969
2970#
2971# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2972# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2973#
2974# This code is free software; you can redistribute it and/or modify it
2975# under the terms of the GNU General Public License version 2 only, as
2976# published by the Free Software Foundation.  Oracle designates this
2977# particular file as subject to the "Classpath" exception as provided
2978# by Oracle in the LICENSE file that accompanied this code.
2979#
2980# This code is distributed in the hope that it will be useful, but WITHOUT
2981# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2982# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2983# version 2 for more details (a copy is included in the LICENSE file that
2984# accompanied this code).
2985#
2986# You should have received a copy of the GNU General Public License version
2987# 2 along with this work; if not, write to the Free Software Foundation,
2988# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2989#
2990# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2991# or visit www.oracle.com if you need additional information or have any
2992# questions.
2993#
2994
2995#
2996# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2997#
2998# This program is free software; you can redistribute it and/or modify
2999# it under the terms of the GNU General Public License as published by
3000# the Free Software Foundation; either version 2 of the License, or
3001# (at your option) any later version.
3002#
3003# This program is distributed in the hope that it will be useful, but
3004# WITHOUT ANY WARRANTY; without even the implied warranty of
3005# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3006# General Public License for more details.
3007#
3008# You should have received a copy of the GNU General Public License
3009# along with this program; if not, write to the Free Software
3010# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3011#
3012# As a special exception to the GNU General Public License, if you
3013# distribute this file as part of a program that contains a
3014# configuration script generated by Autoconf, you may include it under
3015# the same distribution terms that you use for the rest of that program.
3016
3017# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3018# ----------------------------------
3019# PKG_PROG_PKG_CONFIG
3020
3021# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3022#
3023# Check to see whether a particular set of modules exists.  Similar
3024# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3025#
3026#
3027# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3028# this or PKG_CHECK_MODULES is called, or make sure to call
3029# PKG_CHECK_EXISTS manually
3030# --------------------------------------------------------------
3031
3032
3033
3034# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3035# ---------------------------------------------
3036# _PKG_CONFIG
3037
3038# _PKG_SHORT_ERRORS_SUPPORTED
3039# -----------------------------
3040# _PKG_SHORT_ERRORS_SUPPORTED
3041
3042
3043# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3044# [ACTION-IF-NOT-FOUND])
3045#
3046#
3047# Note that if there is a possibility the first call to
3048# PKG_CHECK_MODULES might not happen, you should be sure to include an
3049# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3050#
3051#
3052# --------------------------------------------------------------
3053# PKG_CHECK_MODULES
3054
3055
3056# Include these first...
3057#
3058# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3059# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3060#
3061# This code is free software; you can redistribute it and/or modify it
3062# under the terms of the GNU General Public License version 2 only, as
3063# published by the Free Software Foundation.  Oracle designates this
3064# particular file as subject to the "Classpath" exception as provided
3065# by Oracle in the LICENSE file that accompanied this code.
3066#
3067# This code is distributed in the hope that it will be useful, but WITHOUT
3068# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3069# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3070# version 2 for more details (a copy is included in the LICENSE file that
3071# accompanied this code).
3072#
3073# You should have received a copy of the GNU General Public License version
3074# 2 along with this work; if not, write to the Free Software Foundation,
3075# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3076#
3077# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3078# or visit www.oracle.com if you need additional information or have any
3079# questions.
3080#
3081
3082# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3083# If so, then append $1 to $2\
3084# Also set JVM_ARG_OK to true/false depending on outcome.
3085
3086
3087# Appends a string to a path variable, only adding the : when needed.
3088
3089
3090# This will make sure the given variable points to a full and proper
3091# path. This means:
3092# 1) There will be no spaces in the path. On posix platforms,
3093#    spaces in the path will result in an error. On Windows,
3094#    the path will be rewritten using short-style to be space-free.
3095# 2) The path will be absolute, and it will be in unix-style (on
3096#     cygwin).
3097# $1: The name of the variable to fix
3098
3099
3100# This will make sure the given variable points to a executable
3101# with a full and proper path. This means:
3102# 1) There will be no spaces in the path. On posix platforms,
3103#    spaces in the path will result in an error. On Windows,
3104#    the path will be rewritten using short-style to be space-free.
3105# 2) The path will be absolute, and it will be in unix-style (on
3106#     cygwin).
3107# Any arguments given to the executable is preserved.
3108# If the input variable does not have a directory specification, then
3109# it need to be in the PATH.
3110# $1: The name of the variable to fix
3111
3112
3113
3114
3115
3116
3117# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3118# $1: variable to check
3119# $2: executable name to print in warning (optional)
3120
3121
3122# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3123# Arguments as AC_PATH_PROG:
3124# $1: variable to set
3125# $2: executable name to look for
3126
3127
3128# Setup the most fundamental tools that relies on not much else to set up,
3129# but is used by much of the early bootstrap code.
3130
3131
3132# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3133
3134
3135
3136
3137
3138
3139
3140#%%% Simple tools %%%
3141
3142# Check if we have found a usable version of make
3143# $1: the path to a potential make binary (or empty)
3144# $2: the description on how we found this
3145
3146
3147# Goes looking for a usable version of GNU make.
3148
3149
3150
3151
3152
3153
3154# Check if build directory is on local disk. If not possible to determine,
3155# we prefer to claim it's local.
3156# Argument 1: directory to test
3157# Argument 2: what to do if it is on local disk
3158# Argument 3: what to do otherwise (remote disk or failure)
3159
3160
3161# Check that source files have basic read permissions set. This might
3162# not be the case in cygwin in certain conditions.
3163
3164
3165
3166
3167#
3168# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3169# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3170#
3171# This code is free software; you can redistribute it and/or modify it
3172# under the terms of the GNU General Public License version 2 only, as
3173# published by the Free Software Foundation.  Oracle designates this
3174# particular file as subject to the "Classpath" exception as provided
3175# by Oracle in the LICENSE file that accompanied this code.
3176#
3177# This code is distributed in the hope that it will be useful, but WITHOUT
3178# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3179# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3180# version 2 for more details (a copy is included in the LICENSE file that
3181# accompanied this code).
3182#
3183# You should have received a copy of the GNU General Public License version
3184# 2 along with this work; if not, write to the Free Software Foundation,
3185# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3186#
3187# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3188# or visit www.oracle.com if you need additional information or have any
3189# questions.
3190#
3191
3192
3193
3194
3195
3196# Helper function which possibly converts a path using DOS-style short mode.
3197# If so, the updated path is stored in $new_path.
3198# $1: The path to check
3199
3200
3201# Helper function which possibly converts a path using DOS-style short mode.
3202# If so, the updated path is stored in $new_path.
3203# $1: The path to check
3204
3205
3206# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3207# and could probably be heavily simplified. However, all changes in this
3208# area tend to need lot of testing in different scenarios, and in lack of
3209# proper unit testing, cleaning this up has not been deemed worth the effort
3210# at the moment.
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3221
3222
3223
3224
3225#
3226# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3228#
3229# This code is free software; you can redistribute it and/or modify it
3230# under the terms of the GNU General Public License version 2 only, as
3231# published by the Free Software Foundation.  Oracle designates this
3232# particular file as subject to the "Classpath" exception as provided
3233# by Oracle in the LICENSE file that accompanied this code.
3234#
3235# This code is distributed in the hope that it will be useful, but WITHOUT
3236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3238# version 2 for more details (a copy is included in the LICENSE file that
3239# accompanied this code).
3240#
3241# You should have received a copy of the GNU General Public License version
3242# 2 along with this work; if not, write to the Free Software Foundation,
3243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3244#
3245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3246# or visit www.oracle.com if you need additional information or have any
3247# questions.
3248#
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260# ... then the rest
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286# Execute the check given as argument, and verify the result
3287# If the Boot JDK was previously found, do nothing
3288# $1 A command line (typically autoconf macro) to execute
3289
3290
3291# Test: Is bootjdk explicitely set by command line arguments?
3292
3293
3294# Test: Is bootjdk available from builddeps?
3295
3296
3297# Test: Is $JAVA_HOME set?
3298
3299
3300# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3301
3302
3303# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3304
3305
3306# Look for a jdk in the given path. If there are multiple, try to select the newest.
3307# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3308# $1 = Path to directory containing jdk installations.
3309# $2 = String to append to the found JDK directory to get the proper JDK home
3310
3311
3312# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3313# environmental variable as base for where to look.
3314# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3315
3316
3317# Test: Is there a JDK installed in default, well-known locations?
3318
3319
3320# Check that a command-line tool in the Boot JDK is correct
3321# $1 = name of variable to assign
3322# $2 = name of binary
3323
3324
3325###############################################################################
3326#
3327# We need a Boot JDK to bootstrap the build.
3328#
3329
3330
3331
3332
3333
3334#
3335# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3336# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3337#
3338# This code is free software; you can redistribute it and/or modify it
3339# under the terms of the GNU General Public License version 2 only, as
3340# published by the Free Software Foundation.  Oracle designates this
3341# particular file as subject to the "Classpath" exception as provided
3342# by Oracle in the LICENSE file that accompanied this code.
3343#
3344# This code is distributed in the hope that it will be useful, but WITHOUT
3345# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3346# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3347# version 2 for more details (a copy is included in the LICENSE file that
3348# accompanied this code).
3349#
3350# You should have received a copy of the GNU General Public License version
3351# 2 along with this work; if not, write to the Free Software Foundation,
3352# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3353#
3354# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3355# or visit www.oracle.com if you need additional information or have any
3356# questions.
3357#
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378#
3379# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3381#
3382# This code is free software; you can redistribute it and/or modify it
3383# under the terms of the GNU General Public License version 2 only, as
3384# published by the Free Software Foundation.  Oracle designates this
3385# particular file as subject to the "Classpath" exception as provided
3386# by Oracle in the LICENSE file that accompanied this code.
3387#
3388# This code is distributed in the hope that it will be useful, but WITHOUT
3389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3391# version 2 for more details (a copy is included in the LICENSE file that
3392# accompanied this code).
3393#
3394# You should have received a copy of the GNU General Public License version
3395# 2 along with this work; if not, write to the Free Software Foundation,
3396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3397#
3398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3399# or visit www.oracle.com if you need additional information or have any
3400# questions.
3401#
3402
3403
3404
3405
3406
3407cygwin_help() {
3408    case $1 in
3409    unzip)
3410        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3411    zip)
3412        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3413    make)
3414        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3415    * )
3416       break ;;
3417    esac
3418}
3419
3420apt_help() {
3421    case $1 in
3422    devkit)
3423        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3424    openjdk)
3425        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3426    alsa)
3427        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3428    cups)
3429        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3430    freetype2)
3431        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3432    pulse)
3433        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3434    x11)
3435        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3436    ccache)
3437        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3438    * )
3439       break ;;
3440    esac
3441}
3442
3443yum_help() {
3444    case $1 in
3445    devkit)
3446        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3447    openjdk)
3448        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3449    alsa)
3450        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3451    cups)
3452        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3453    freetype2)
3454        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3455    pulse)
3456        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3457    x11)
3458        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3459    ccache)
3460        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3461    * )
3462       break ;;
3463    esac
3464}
3465
3466port_help() {
3467    PKGHANDLER_COMMAND=""
3468}
3469
3470pkgutil_help() {
3471    PKGHANDLER_COMMAND=""
3472}
3473
3474pkgadd_help() {
3475    PKGHANDLER_COMMAND=""
3476}
3477
3478
3479
3480#
3481# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3482# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3483#
3484# This code is free software; you can redistribute it and/or modify it
3485# under the terms of the GNU General Public License version 2 only, as
3486# published by the Free Software Foundation.  Oracle designates this
3487# particular file as subject to the "Classpath" exception as provided
3488# by Oracle in the LICENSE file that accompanied this code.
3489#
3490# This code is distributed in the hope that it will be useful, but WITHOUT
3491# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3492# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3493# version 2 for more details (a copy is included in the LICENSE file that
3494# accompanied this code).
3495#
3496# You should have received a copy of the GNU General Public License version
3497# 2 along with this work; if not, write to the Free Software Foundation,
3498# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3499#
3500# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3501# or visit www.oracle.com if you need additional information or have any
3502# questions.
3503#
3504
3505
3506
3507
3508
3509
3510
3511
3512###############################################################################
3513#
3514# Should we build only OpenJDK even if closed sources are present?
3515#
3516
3517
3518
3519
3520###############################################################################
3521#
3522# Setup version numbers
3523#
3524
3525
3526
3527
3528
3529
3530# Support for customization of the build process. Some build files
3531# will include counterparts from this location, if they exist. This allows
3532# for a degree of customization of the build targets and the rules/recipes
3533# to create them
3534
3535# Check whether --with-custom-make-dir was given.
3536if test "${with_custom_make_dir+set}" = set; then :
3537  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3538fi
3539
3540
3541
3542#
3543# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3545#
3546# This code is free software; you can redistribute it and/or modify it
3547# under the terms of the GNU General Public License version 2 only, as
3548# published by the Free Software Foundation.  Oracle designates this
3549# particular file as subject to the "Classpath" exception as provided
3550# by Oracle in the LICENSE file that accompanied this code.
3551#
3552# This code is distributed in the hope that it will be useful, but WITHOUT
3553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3555# version 2 for more details (a copy is included in the LICENSE file that
3556# accompanied this code).
3557#
3558# You should have received a copy of the GNU General Public License version
3559# 2 along with this work; if not, write to the Free Software Foundation,
3560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3561#
3562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3563# or visit www.oracle.com if you need additional information or have any
3564# questions.
3565#
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581#
3582# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3583# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3584#
3585# This code is free software; you can redistribute it and/or modify it
3586# under the terms of the GNU General Public License version 2 only, as
3587# published by the Free Software Foundation.  Oracle designates this
3588# particular file as subject to the "Classpath" exception as provided
3589# by Oracle in the LICENSE file that accompanied this code.
3590#
3591# This code is distributed in the hope that it will be useful, but WITHOUT
3592# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3593# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3594# version 2 for more details (a copy is included in the LICENSE file that
3595# accompanied this code).
3596#
3597# You should have received a copy of the GNU General Public License version
3598# 2 along with this work; if not, write to the Free Software Foundation,
3599# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3600#
3601# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3602# or visit www.oracle.com if you need additional information or have any
3603# questions.
3604#
3605
3606# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3607# Converts autoconf style CPU name to OpenJDK style, into
3608# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3609
3610
3611# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3612# Converts autoconf style OS name to OpenJDK style, into
3613# VAR_OS and VAR_OS_API.
3614
3615
3616# Expects $host_os $host_cpu $build_os and $build_cpu
3617# and $with_target_bits to have been setup!
3618#
3619# Translate the standard triplet(quadruplet) definition
3620# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3621# OPENJDK_BUILD_OS, etc.
3622
3623
3624# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3625# accordingly. Must be done after setting up build and target system, but before
3626# doing anything else with these values.
3627
3628
3629    # Setup the legacy variables, for controlling the old makefiles.
3630    #
3631
3632
3633
3634
3635#%%% Build and target systems %%%
3636
3637
3638
3639
3640# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3641# Add -mX to various FLAGS variables.
3642
3643
3644
3645
3646
3647
3648#
3649# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3651#
3652# This code is free software; you can redistribute it and/or modify it
3653# under the terms of the GNU General Public License version 2 only, as
3654# published by the Free Software Foundation.  Oracle designates this
3655# particular file as subject to the "Classpath" exception as provided
3656# by Oracle in the LICENSE file that accompanied this code.
3657#
3658# This code is distributed in the hope that it will be useful, but WITHOUT
3659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3661# version 2 for more details (a copy is included in the LICENSE file that
3662# accompanied this code).
3663#
3664# You should have received a copy of the GNU General Public License version
3665# 2 along with this work; if not, write to the Free Software Foundation,
3666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3667#
3668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3669# or visit www.oracle.com if you need additional information or have any
3670# questions.
3671#
3672
3673
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705# $1 = compiler to test (CC or CXX)
3706# $2 = human readable name of compiler (C or C++)
3707
3708
3709
3710
3711
3712# $1 = compiler to test (CC or CXX)
3713# $2 = human readable name of compiler (C or C++)
3714# $3 = list of compiler names to search for
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3729#                                   [RUN-IF-FALSE])
3730# ------------------------------------------------------------
3731# Check that the c and c++ compilers support an argument
3732
3733
3734
3735
3736# Setup the JTREG paths
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768
3769
3770# Check if the VS env variables were setup prior to running configure.
3771# If not, then find vcvarsall.bat and run it automatically, and integrate
3772# the set env variables into the spec file.
3773
3774
3775
3776# Setup the DXSDK paths
3777
3778
3779
3780
3781
3782
3783# This line needs to be here, verbatim, after all includes and the dummy hook
3784# definitions. It is replaced with custom functionality when building
3785# custom sources.
3786#CUSTOM_AUTOCONF_INCLUDE
3787
3788# Do not change or remove the following line, it is needed for consistency checks:
3789DATE_WHEN_GENERATED=1372770384
3790
3791###############################################################################
3792#
3793# Initialization / Boot-strapping
3794#
3795# The bootstrapping process needs to solve the "chicken or the egg" problem,
3796# thus it jumps back and forth, each time gaining something needed later on.
3797#
3798###############################################################################
3799
3800# Basic initialization that must happen first of all
3801
3802# Save the original command line. This is passed to us by the wrapper configure script.
3803
3804DATE_WHEN_CONFIGURED=`LANG=C date`
3805
3806{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3807$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3808{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3809$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3810
3811
3812
3813# Start with tools that do not need have cross compilation support
3814# and can be expected to be found in the default PATH. These tools are
3815# used by configure. Nor are these tools expected to be found in the
3816# devkit from the builddeps server either, since they are
3817# needed to download the devkit.
3818
3819# First are all the simple required tools.
3820
3821    for ac_prog in basename
3822do
3823  # Extract the first word of "$ac_prog", so it can be a program name with args.
3824set dummy $ac_prog; ac_word=$2
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3826$as_echo_n "checking for $ac_word... " >&6; }
3827if test "${ac_cv_path_BASENAME+set}" = set; then :
3828  $as_echo_n "(cached) " >&6
3829else
3830  case $BASENAME in
3831  [\\/]* | ?:[\\/]*)
3832  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3833  ;;
3834  *)
3835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838  IFS=$as_save_IFS
3839  test -z "$as_dir" && as_dir=.
3840    for ac_exec_ext in '' $ac_executable_extensions; do
3841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3842    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3844    break 2
3845  fi
3846done
3847  done
3848IFS=$as_save_IFS
3849
3850  ;;
3851esac
3852fi
3853BASENAME=$ac_cv_path_BASENAME
3854if test -n "$BASENAME"; then
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3856$as_echo "$BASENAME" >&6; }
3857else
3858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
3860fi
3861
3862
3863  test -n "$BASENAME" && break
3864done
3865
3866
3867    if test "x$BASENAME" = x; then
3868        if test "xbasename" = x; then
3869          PROG_NAME=basename
3870        else
3871          PROG_NAME=basename
3872        fi
3873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3875        as_fn_error $? "Cannot continue" "$LINENO" 5
3876    fi
3877
3878
3879
3880    for ac_prog in bash
3881do
3882  # Extract the first word of "$ac_prog", so it can be a program name with args.
3883set dummy $ac_prog; ac_word=$2
3884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3885$as_echo_n "checking for $ac_word... " >&6; }
3886if test "${ac_cv_path_BASH+set}" = set; then :
3887  $as_echo_n "(cached) " >&6
3888else
3889  case $BASH in
3890  [\\/]* | ?:[\\/]*)
3891  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3892  ;;
3893  *)
3894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3895for as_dir in $PATH
3896do
3897  IFS=$as_save_IFS
3898  test -z "$as_dir" && as_dir=.
3899    for ac_exec_ext in '' $ac_executable_extensions; do
3900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3901    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3903    break 2
3904  fi
3905done
3906  done
3907IFS=$as_save_IFS
3908
3909  ;;
3910esac
3911fi
3912BASH=$ac_cv_path_BASH
3913if test -n "$BASH"; then
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3915$as_echo "$BASH" >&6; }
3916else
3917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918$as_echo "no" >&6; }
3919fi
3920
3921
3922  test -n "$BASH" && break
3923done
3924
3925
3926    if test "x$BASH" = x; then
3927        if test "xbash" = x; then
3928          PROG_NAME=bash
3929        else
3930          PROG_NAME=bash
3931        fi
3932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3934        as_fn_error $? "Cannot continue" "$LINENO" 5
3935    fi
3936
3937
3938
3939    for ac_prog in cat
3940do
3941  # Extract the first word of "$ac_prog", so it can be a program name with args.
3942set dummy $ac_prog; ac_word=$2
3943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3944$as_echo_n "checking for $ac_word... " >&6; }
3945if test "${ac_cv_path_CAT+set}" = set; then :
3946  $as_echo_n "(cached) " >&6
3947else
3948  case $CAT in
3949  [\\/]* | ?:[\\/]*)
3950  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3951  ;;
3952  *)
3953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3954for as_dir in $PATH
3955do
3956  IFS=$as_save_IFS
3957  test -z "$as_dir" && as_dir=.
3958    for ac_exec_ext in '' $ac_executable_extensions; do
3959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3960    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3962    break 2
3963  fi
3964done
3965  done
3966IFS=$as_save_IFS
3967
3968  ;;
3969esac
3970fi
3971CAT=$ac_cv_path_CAT
3972if test -n "$CAT"; then
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3974$as_echo "$CAT" >&6; }
3975else
3976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3977$as_echo "no" >&6; }
3978fi
3979
3980
3981  test -n "$CAT" && break
3982done
3983
3984
3985    if test "x$CAT" = x; then
3986        if test "xcat" = x; then
3987          PROG_NAME=cat
3988        else
3989          PROG_NAME=cat
3990        fi
3991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3993        as_fn_error $? "Cannot continue" "$LINENO" 5
3994    fi
3995
3996
3997
3998    for ac_prog in chmod
3999do
4000  # Extract the first word of "$ac_prog", so it can be a program name with args.
4001set dummy $ac_prog; ac_word=$2
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4003$as_echo_n "checking for $ac_word... " >&6; }
4004if test "${ac_cv_path_CHMOD+set}" = set; then :
4005  $as_echo_n "(cached) " >&6
4006else
4007  case $CHMOD in
4008  [\\/]* | ?:[\\/]*)
4009  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4010  ;;
4011  *)
4012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013for as_dir in $PATH
4014do
4015  IFS=$as_save_IFS
4016  test -z "$as_dir" && as_dir=.
4017    for ac_exec_ext in '' $ac_executable_extensions; do
4018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4019    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4021    break 2
4022  fi
4023done
4024  done
4025IFS=$as_save_IFS
4026
4027  ;;
4028esac
4029fi
4030CHMOD=$ac_cv_path_CHMOD
4031if test -n "$CHMOD"; then
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4033$as_echo "$CHMOD" >&6; }
4034else
4035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4036$as_echo "no" >&6; }
4037fi
4038
4039
4040  test -n "$CHMOD" && break
4041done
4042
4043
4044    if test "x$CHMOD" = x; then
4045        if test "xchmod" = x; then
4046          PROG_NAME=chmod
4047        else
4048          PROG_NAME=chmod
4049        fi
4050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4052        as_fn_error $? "Cannot continue" "$LINENO" 5
4053    fi
4054
4055
4056
4057    for ac_prog in cmp
4058do
4059  # Extract the first word of "$ac_prog", so it can be a program name with args.
4060set dummy $ac_prog; ac_word=$2
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062$as_echo_n "checking for $ac_word... " >&6; }
4063if test "${ac_cv_path_CMP+set}" = set; then :
4064  $as_echo_n "(cached) " >&6
4065else
4066  case $CMP in
4067  [\\/]* | ?:[\\/]*)
4068  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4069  ;;
4070  *)
4071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH
4073do
4074  IFS=$as_save_IFS
4075  test -z "$as_dir" && as_dir=.
4076    for ac_exec_ext in '' $ac_executable_extensions; do
4077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4078    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4080    break 2
4081  fi
4082done
4083  done
4084IFS=$as_save_IFS
4085
4086  ;;
4087esac
4088fi
4089CMP=$ac_cv_path_CMP
4090if test -n "$CMP"; then
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4092$as_echo "$CMP" >&6; }
4093else
4094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4095$as_echo "no" >&6; }
4096fi
4097
4098
4099  test -n "$CMP" && break
4100done
4101
4102
4103    if test "x$CMP" = x; then
4104        if test "xcmp" = x; then
4105          PROG_NAME=cmp
4106        else
4107          PROG_NAME=cmp
4108        fi
4109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4111        as_fn_error $? "Cannot continue" "$LINENO" 5
4112    fi
4113
4114
4115
4116    for ac_prog in comm
4117do
4118  # Extract the first word of "$ac_prog", so it can be a program name with args.
4119set dummy $ac_prog; ac_word=$2
4120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4121$as_echo_n "checking for $ac_word... " >&6; }
4122if test "${ac_cv_path_COMM+set}" = set; then :
4123  $as_echo_n "(cached) " >&6
4124else
4125  case $COMM in
4126  [\\/]* | ?:[\\/]*)
4127  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4128  ;;
4129  *)
4130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4131for as_dir in $PATH
4132do
4133  IFS=$as_save_IFS
4134  test -z "$as_dir" && as_dir=.
4135    for ac_exec_ext in '' $ac_executable_extensions; do
4136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4137    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4139    break 2
4140  fi
4141done
4142  done
4143IFS=$as_save_IFS
4144
4145  ;;
4146esac
4147fi
4148COMM=$ac_cv_path_COMM
4149if test -n "$COMM"; then
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4151$as_echo "$COMM" >&6; }
4152else
4153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
4155fi
4156
4157
4158  test -n "$COMM" && break
4159done
4160
4161
4162    if test "x$COMM" = x; then
4163        if test "xcomm" = x; then
4164          PROG_NAME=comm
4165        else
4166          PROG_NAME=comm
4167        fi
4168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4170        as_fn_error $? "Cannot continue" "$LINENO" 5
4171    fi
4172
4173
4174
4175    for ac_prog in cp
4176do
4177  # Extract the first word of "$ac_prog", so it can be a program name with args.
4178set dummy $ac_prog; ac_word=$2
4179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4180$as_echo_n "checking for $ac_word... " >&6; }
4181if test "${ac_cv_path_CP+set}" = set; then :
4182  $as_echo_n "(cached) " >&6
4183else
4184  case $CP in
4185  [\\/]* | ?:[\\/]*)
4186  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4187  ;;
4188  *)
4189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4190for as_dir in $PATH
4191do
4192  IFS=$as_save_IFS
4193  test -z "$as_dir" && as_dir=.
4194    for ac_exec_ext in '' $ac_executable_extensions; do
4195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4196    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4198    break 2
4199  fi
4200done
4201  done
4202IFS=$as_save_IFS
4203
4204  ;;
4205esac
4206fi
4207CP=$ac_cv_path_CP
4208if test -n "$CP"; then
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4210$as_echo "$CP" >&6; }
4211else
4212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4213$as_echo "no" >&6; }
4214fi
4215
4216
4217  test -n "$CP" && break
4218done
4219
4220
4221    if test "x$CP" = x; then
4222        if test "xcp" = x; then
4223          PROG_NAME=cp
4224        else
4225          PROG_NAME=cp
4226        fi
4227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4229        as_fn_error $? "Cannot continue" "$LINENO" 5
4230    fi
4231
4232
4233
4234    for ac_prog in cpio
4235do
4236  # Extract the first word of "$ac_prog", so it can be a program name with args.
4237set dummy $ac_prog; ac_word=$2
4238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4239$as_echo_n "checking for $ac_word... " >&6; }
4240if test "${ac_cv_path_CPIO+set}" = set; then :
4241  $as_echo_n "(cached) " >&6
4242else
4243  case $CPIO in
4244  [\\/]* | ?:[\\/]*)
4245  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4246  ;;
4247  *)
4248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249for as_dir in $PATH
4250do
4251  IFS=$as_save_IFS
4252  test -z "$as_dir" && as_dir=.
4253    for ac_exec_ext in '' $ac_executable_extensions; do
4254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4255    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4257    break 2
4258  fi
4259done
4260  done
4261IFS=$as_save_IFS
4262
4263  ;;
4264esac
4265fi
4266CPIO=$ac_cv_path_CPIO
4267if test -n "$CPIO"; then
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4269$as_echo "$CPIO" >&6; }
4270else
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4272$as_echo "no" >&6; }
4273fi
4274
4275
4276  test -n "$CPIO" && break
4277done
4278
4279
4280    if test "x$CPIO" = x; then
4281        if test "xcpio" = x; then
4282          PROG_NAME=cpio
4283        else
4284          PROG_NAME=cpio
4285        fi
4286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4288        as_fn_error $? "Cannot continue" "$LINENO" 5
4289    fi
4290
4291
4292
4293    for ac_prog in cut
4294do
4295  # Extract the first word of "$ac_prog", so it can be a program name with args.
4296set dummy $ac_prog; ac_word=$2
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4298$as_echo_n "checking for $ac_word... " >&6; }
4299if test "${ac_cv_path_CUT+set}" = set; then :
4300  $as_echo_n "(cached) " >&6
4301else
4302  case $CUT in
4303  [\\/]* | ?:[\\/]*)
4304  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4305  ;;
4306  *)
4307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4308for as_dir in $PATH
4309do
4310  IFS=$as_save_IFS
4311  test -z "$as_dir" && as_dir=.
4312    for ac_exec_ext in '' $ac_executable_extensions; do
4313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4314    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4316    break 2
4317  fi
4318done
4319  done
4320IFS=$as_save_IFS
4321
4322  ;;
4323esac
4324fi
4325CUT=$ac_cv_path_CUT
4326if test -n "$CUT"; then
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4328$as_echo "$CUT" >&6; }
4329else
4330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4331$as_echo "no" >&6; }
4332fi
4333
4334
4335  test -n "$CUT" && break
4336done
4337
4338
4339    if test "x$CUT" = x; then
4340        if test "xcut" = x; then
4341          PROG_NAME=cut
4342        else
4343          PROG_NAME=cut
4344        fi
4345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4347        as_fn_error $? "Cannot continue" "$LINENO" 5
4348    fi
4349
4350
4351
4352    for ac_prog in date
4353do
4354  # Extract the first word of "$ac_prog", so it can be a program name with args.
4355set dummy $ac_prog; ac_word=$2
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4357$as_echo_n "checking for $ac_word... " >&6; }
4358if test "${ac_cv_path_DATE+set}" = set; then :
4359  $as_echo_n "(cached) " >&6
4360else
4361  case $DATE in
4362  [\\/]* | ?:[\\/]*)
4363  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4364  ;;
4365  *)
4366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4367for as_dir in $PATH
4368do
4369  IFS=$as_save_IFS
4370  test -z "$as_dir" && as_dir=.
4371    for ac_exec_ext in '' $ac_executable_extensions; do
4372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4373    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4375    break 2
4376  fi
4377done
4378  done
4379IFS=$as_save_IFS
4380
4381  ;;
4382esac
4383fi
4384DATE=$ac_cv_path_DATE
4385if test -n "$DATE"; then
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4387$as_echo "$DATE" >&6; }
4388else
4389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4390$as_echo "no" >&6; }
4391fi
4392
4393
4394  test -n "$DATE" && break
4395done
4396
4397
4398    if test "x$DATE" = x; then
4399        if test "xdate" = x; then
4400          PROG_NAME=date
4401        else
4402          PROG_NAME=date
4403        fi
4404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4406        as_fn_error $? "Cannot continue" "$LINENO" 5
4407    fi
4408
4409
4410
4411    for ac_prog in gdiff diff
4412do
4413  # Extract the first word of "$ac_prog", so it can be a program name with args.
4414set dummy $ac_prog; ac_word=$2
4415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4416$as_echo_n "checking for $ac_word... " >&6; }
4417if test "${ac_cv_path_DIFF+set}" = set; then :
4418  $as_echo_n "(cached) " >&6
4419else
4420  case $DIFF in
4421  [\\/]* | ?:[\\/]*)
4422  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4423  ;;
4424  *)
4425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426for as_dir in $PATH
4427do
4428  IFS=$as_save_IFS
4429  test -z "$as_dir" && as_dir=.
4430    for ac_exec_ext in '' $ac_executable_extensions; do
4431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4432    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4434    break 2
4435  fi
4436done
4437  done
4438IFS=$as_save_IFS
4439
4440  ;;
4441esac
4442fi
4443DIFF=$ac_cv_path_DIFF
4444if test -n "$DIFF"; then
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4446$as_echo "$DIFF" >&6; }
4447else
4448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4449$as_echo "no" >&6; }
4450fi
4451
4452
4453  test -n "$DIFF" && break
4454done
4455
4456
4457    if test "x$DIFF" = x; then
4458        if test "xgdiff diff" = x; then
4459          PROG_NAME=diff
4460        else
4461          PROG_NAME=gdiff diff
4462        fi
4463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4465        as_fn_error $? "Cannot continue" "$LINENO" 5
4466    fi
4467
4468
4469
4470    for ac_prog in dirname
4471do
4472  # Extract the first word of "$ac_prog", so it can be a program name with args.
4473set dummy $ac_prog; ac_word=$2
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
4476if test "${ac_cv_path_DIRNAME+set}" = set; then :
4477  $as_echo_n "(cached) " >&6
4478else
4479  case $DIRNAME in
4480  [\\/]* | ?:[\\/]*)
4481  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4482  ;;
4483  *)
4484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in $PATH
4486do
4487  IFS=$as_save_IFS
4488  test -z "$as_dir" && as_dir=.
4489    for ac_exec_ext in '' $ac_executable_extensions; do
4490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4491    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493    break 2
4494  fi
4495done
4496  done
4497IFS=$as_save_IFS
4498
4499  ;;
4500esac
4501fi
4502DIRNAME=$ac_cv_path_DIRNAME
4503if test -n "$DIRNAME"; then
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4505$as_echo "$DIRNAME" >&6; }
4506else
4507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509fi
4510
4511
4512  test -n "$DIRNAME" && break
4513done
4514
4515
4516    if test "x$DIRNAME" = x; then
4517        if test "xdirname" = x; then
4518          PROG_NAME=dirname
4519        else
4520          PROG_NAME=dirname
4521        fi
4522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4524        as_fn_error $? "Cannot continue" "$LINENO" 5
4525    fi
4526
4527
4528
4529    for ac_prog in echo
4530do
4531  # Extract the first word of "$ac_prog", so it can be a program name with args.
4532set dummy $ac_prog; ac_word=$2
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
4535if test "${ac_cv_path_ECHO+set}" = set; then :
4536  $as_echo_n "(cached) " >&6
4537else
4538  case $ECHO in
4539  [\\/]* | ?:[\\/]*)
4540  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4541  ;;
4542  *)
4543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in $PATH
4545do
4546  IFS=$as_save_IFS
4547  test -z "$as_dir" && as_dir=.
4548    for ac_exec_ext in '' $ac_executable_extensions; do
4549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4550    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4552    break 2
4553  fi
4554done
4555  done
4556IFS=$as_save_IFS
4557
4558  ;;
4559esac
4560fi
4561ECHO=$ac_cv_path_ECHO
4562if test -n "$ECHO"; then
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4564$as_echo "$ECHO" >&6; }
4565else
4566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
4568fi
4569
4570
4571  test -n "$ECHO" && break
4572done
4573
4574
4575    if test "x$ECHO" = x; then
4576        if test "xecho" = x; then
4577          PROG_NAME=echo
4578        else
4579          PROG_NAME=echo
4580        fi
4581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4583        as_fn_error $? "Cannot continue" "$LINENO" 5
4584    fi
4585
4586
4587
4588    for ac_prog in expr
4589do
4590  # Extract the first word of "$ac_prog", so it can be a program name with args.
4591set dummy $ac_prog; ac_word=$2
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4593$as_echo_n "checking for $ac_word... " >&6; }
4594if test "${ac_cv_path_EXPR+set}" = set; then :
4595  $as_echo_n "(cached) " >&6
4596else
4597  case $EXPR in
4598  [\\/]* | ?:[\\/]*)
4599  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4600  ;;
4601  *)
4602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605  IFS=$as_save_IFS
4606  test -z "$as_dir" && as_dir=.
4607    for ac_exec_ext in '' $ac_executable_extensions; do
4608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4609    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4611    break 2
4612  fi
4613done
4614  done
4615IFS=$as_save_IFS
4616
4617  ;;
4618esac
4619fi
4620EXPR=$ac_cv_path_EXPR
4621if test -n "$EXPR"; then
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4623$as_echo "$EXPR" >&6; }
4624else
4625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4626$as_echo "no" >&6; }
4627fi
4628
4629
4630  test -n "$EXPR" && break
4631done
4632
4633
4634    if test "x$EXPR" = x; then
4635        if test "xexpr" = x; then
4636          PROG_NAME=expr
4637        else
4638          PROG_NAME=expr
4639        fi
4640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4642        as_fn_error $? "Cannot continue" "$LINENO" 5
4643    fi
4644
4645
4646
4647    for ac_prog in file
4648do
4649  # Extract the first word of "$ac_prog", so it can be a program name with args.
4650set dummy $ac_prog; ac_word=$2
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652$as_echo_n "checking for $ac_word... " >&6; }
4653if test "${ac_cv_path_FILE+set}" = set; then :
4654  $as_echo_n "(cached) " >&6
4655else
4656  case $FILE in
4657  [\\/]* | ?:[\\/]*)
4658  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4659  ;;
4660  *)
4661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662for as_dir in $PATH
4663do
4664  IFS=$as_save_IFS
4665  test -z "$as_dir" && as_dir=.
4666    for ac_exec_ext in '' $ac_executable_extensions; do
4667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4668    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4670    break 2
4671  fi
4672done
4673  done
4674IFS=$as_save_IFS
4675
4676  ;;
4677esac
4678fi
4679FILE=$ac_cv_path_FILE
4680if test -n "$FILE"; then
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4682$as_echo "$FILE" >&6; }
4683else
4684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4685$as_echo "no" >&6; }
4686fi
4687
4688
4689  test -n "$FILE" && break
4690done
4691
4692
4693    if test "x$FILE" = x; then
4694        if test "xfile" = x; then
4695          PROG_NAME=file
4696        else
4697          PROG_NAME=file
4698        fi
4699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4701        as_fn_error $? "Cannot continue" "$LINENO" 5
4702    fi
4703
4704
4705
4706    for ac_prog in find
4707do
4708  # Extract the first word of "$ac_prog", so it can be a program name with args.
4709set dummy $ac_prog; ac_word=$2
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
4712if test "${ac_cv_path_FIND+set}" = set; then :
4713  $as_echo_n "(cached) " >&6
4714else
4715  case $FIND in
4716  [\\/]* | ?:[\\/]*)
4717  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4718  ;;
4719  *)
4720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in $PATH
4722do
4723  IFS=$as_save_IFS
4724  test -z "$as_dir" && as_dir=.
4725    for ac_exec_ext in '' $ac_executable_extensions; do
4726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4727    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729    break 2
4730  fi
4731done
4732  done
4733IFS=$as_save_IFS
4734
4735  ;;
4736esac
4737fi
4738FIND=$ac_cv_path_FIND
4739if test -n "$FIND"; then
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4741$as_echo "$FIND" >&6; }
4742else
4743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
4745fi
4746
4747
4748  test -n "$FIND" && break
4749done
4750
4751
4752    if test "x$FIND" = x; then
4753        if test "xfind" = x; then
4754          PROG_NAME=find
4755        else
4756          PROG_NAME=find
4757        fi
4758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4760        as_fn_error $? "Cannot continue" "$LINENO" 5
4761    fi
4762
4763
4764
4765    for ac_prog in head
4766do
4767  # Extract the first word of "$ac_prog", so it can be a program name with args.
4768set dummy $ac_prog; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
4771if test "${ac_cv_path_HEAD+set}" = set; then :
4772  $as_echo_n "(cached) " >&6
4773else
4774  case $HEAD in
4775  [\\/]* | ?:[\\/]*)
4776  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4777  ;;
4778  *)
4779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in $PATH
4781do
4782  IFS=$as_save_IFS
4783  test -z "$as_dir" && as_dir=.
4784    for ac_exec_ext in '' $ac_executable_extensions; do
4785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4786    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788    break 2
4789  fi
4790done
4791  done
4792IFS=$as_save_IFS
4793
4794  ;;
4795esac
4796fi
4797HEAD=$ac_cv_path_HEAD
4798if test -n "$HEAD"; then
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4800$as_echo "$HEAD" >&6; }
4801else
4802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
4804fi
4805
4806
4807  test -n "$HEAD" && break
4808done
4809
4810
4811    if test "x$HEAD" = x; then
4812        if test "xhead" = x; then
4813          PROG_NAME=head
4814        else
4815          PROG_NAME=head
4816        fi
4817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4819        as_fn_error $? "Cannot continue" "$LINENO" 5
4820    fi
4821
4822
4823
4824    for ac_prog in ln
4825do
4826  # Extract the first word of "$ac_prog", so it can be a program name with args.
4827set dummy $ac_prog; ac_word=$2
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
4830if test "${ac_cv_path_LN+set}" = set; then :
4831  $as_echo_n "(cached) " >&6
4832else
4833  case $LN in
4834  [\\/]* | ?:[\\/]*)
4835  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4836  ;;
4837  *)
4838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in $PATH
4840do
4841  IFS=$as_save_IFS
4842  test -z "$as_dir" && as_dir=.
4843    for ac_exec_ext in '' $ac_executable_extensions; do
4844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4845    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4847    break 2
4848  fi
4849done
4850  done
4851IFS=$as_save_IFS
4852
4853  ;;
4854esac
4855fi
4856LN=$ac_cv_path_LN
4857if test -n "$LN"; then
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4859$as_echo "$LN" >&6; }
4860else
4861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
4865
4866  test -n "$LN" && break
4867done
4868
4869
4870    if test "x$LN" = x; then
4871        if test "xln" = x; then
4872          PROG_NAME=ln
4873        else
4874          PROG_NAME=ln
4875        fi
4876        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4877$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4878        as_fn_error $? "Cannot continue" "$LINENO" 5
4879    fi
4880
4881
4882
4883    for ac_prog in ls
4884do
4885  # Extract the first word of "$ac_prog", so it can be a program name with args.
4886set dummy $ac_prog; ac_word=$2
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4888$as_echo_n "checking for $ac_word... " >&6; }
4889if test "${ac_cv_path_LS+set}" = set; then :
4890  $as_echo_n "(cached) " >&6
4891else
4892  case $LS in
4893  [\\/]* | ?:[\\/]*)
4894  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4895  ;;
4896  *)
4897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4898for as_dir in $PATH
4899do
4900  IFS=$as_save_IFS
4901  test -z "$as_dir" && as_dir=.
4902    for ac_exec_ext in '' $ac_executable_extensions; do
4903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4904    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4906    break 2
4907  fi
4908done
4909  done
4910IFS=$as_save_IFS
4911
4912  ;;
4913esac
4914fi
4915LS=$ac_cv_path_LS
4916if test -n "$LS"; then
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4918$as_echo "$LS" >&6; }
4919else
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4921$as_echo "no" >&6; }
4922fi
4923
4924
4925  test -n "$LS" && break
4926done
4927
4928
4929    if test "x$LS" = x; then
4930        if test "xls" = x; then
4931          PROG_NAME=ls
4932        else
4933          PROG_NAME=ls
4934        fi
4935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4937        as_fn_error $? "Cannot continue" "$LINENO" 5
4938    fi
4939
4940
4941
4942    for ac_prog in mkdir
4943do
4944  # Extract the first word of "$ac_prog", so it can be a program name with args.
4945set dummy $ac_prog; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if test "${ac_cv_path_MKDIR+set}" = set; then :
4949  $as_echo_n "(cached) " >&6
4950else
4951  case $MKDIR in
4952  [\\/]* | ?:[\\/]*)
4953  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4954  ;;
4955  *)
4956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in $PATH
4958do
4959  IFS=$as_save_IFS
4960  test -z "$as_dir" && as_dir=.
4961    for ac_exec_ext in '' $ac_executable_extensions; do
4962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4963    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965    break 2
4966  fi
4967done
4968  done
4969IFS=$as_save_IFS
4970
4971  ;;
4972esac
4973fi
4974MKDIR=$ac_cv_path_MKDIR
4975if test -n "$MKDIR"; then
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4977$as_echo "$MKDIR" >&6; }
4978else
4979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
4981fi
4982
4983
4984  test -n "$MKDIR" && break
4985done
4986
4987
4988    if test "x$MKDIR" = x; then
4989        if test "xmkdir" = x; then
4990          PROG_NAME=mkdir
4991        else
4992          PROG_NAME=mkdir
4993        fi
4994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4995$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4996        as_fn_error $? "Cannot continue" "$LINENO" 5
4997    fi
4998
4999
5000
5001    for ac_prog in mktemp
5002do
5003  # Extract the first word of "$ac_prog", so it can be a program name with args.
5004set dummy $ac_prog; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if test "${ac_cv_path_MKTEMP+set}" = set; then :
5008  $as_echo_n "(cached) " >&6
5009else
5010  case $MKTEMP in
5011  [\\/]* | ?:[\\/]*)
5012  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5013  ;;
5014  *)
5015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018  IFS=$as_save_IFS
5019  test -z "$as_dir" && as_dir=.
5020    for ac_exec_ext in '' $ac_executable_extensions; do
5021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5022    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024    break 2
5025  fi
5026done
5027  done
5028IFS=$as_save_IFS
5029
5030  ;;
5031esac
5032fi
5033MKTEMP=$ac_cv_path_MKTEMP
5034if test -n "$MKTEMP"; then
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5036$as_echo "$MKTEMP" >&6; }
5037else
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042
5043  test -n "$MKTEMP" && break
5044done
5045
5046
5047    if test "x$MKTEMP" = x; then
5048        if test "xmktemp" = x; then
5049          PROG_NAME=mktemp
5050        else
5051          PROG_NAME=mktemp
5052        fi
5053        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5054$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5055        as_fn_error $? "Cannot continue" "$LINENO" 5
5056    fi
5057
5058
5059
5060    for ac_prog in mv
5061do
5062  # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if test "${ac_cv_path_MV+set}" = set; then :
5067  $as_echo_n "(cached) " >&6
5068else
5069  case $MV in
5070  [\\/]* | ?:[\\/]*)
5071  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5072  ;;
5073  *)
5074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077  IFS=$as_save_IFS
5078  test -z "$as_dir" && as_dir=.
5079    for ac_exec_ext in '' $ac_executable_extensions; do
5080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5081    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5083    break 2
5084  fi
5085done
5086  done
5087IFS=$as_save_IFS
5088
5089  ;;
5090esac
5091fi
5092MV=$ac_cv_path_MV
5093if test -n "$MV"; then
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5095$as_echo "$MV" >&6; }
5096else
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
5099fi
5100
5101
5102  test -n "$MV" && break
5103done
5104
5105
5106    if test "x$MV" = x; then
5107        if test "xmv" = x; then
5108          PROG_NAME=mv
5109        else
5110          PROG_NAME=mv
5111        fi
5112        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5113$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5114        as_fn_error $? "Cannot continue" "$LINENO" 5
5115    fi
5116
5117
5118
5119    for ac_prog in printf
5120do
5121  # Extract the first word of "$ac_prog", so it can be a program name with args.
5122set dummy $ac_prog; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if test "${ac_cv_path_PRINTF+set}" = set; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $PRINTF in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5140    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151PRINTF=$ac_cv_path_PRINTF
5152if test -n "$PRINTF"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5154$as_echo "$PRINTF" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161  test -n "$PRINTF" && break
5162done
5163
5164
5165    if test "x$PRINTF" = x; then
5166        if test "xprintf" = x; then
5167          PROG_NAME=printf
5168        else
5169          PROG_NAME=printf
5170        fi
5171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5172$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5173        as_fn_error $? "Cannot continue" "$LINENO" 5
5174    fi
5175
5176
5177
5178    for ac_prog in rm
5179do
5180  # Extract the first word of "$ac_prog", so it can be a program name with args.
5181set dummy $ac_prog; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
5184if test "${ac_cv_path_RM+set}" = set; then :
5185  $as_echo_n "(cached) " >&6
5186else
5187  case $RM in
5188  [\\/]* | ?:[\\/]*)
5189  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5190  ;;
5191  *)
5192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5193for as_dir in $PATH
5194do
5195  IFS=$as_save_IFS
5196  test -z "$as_dir" && as_dir=.
5197    for ac_exec_ext in '' $ac_executable_extensions; do
5198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5199    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5201    break 2
5202  fi
5203done
5204  done
5205IFS=$as_save_IFS
5206
5207  ;;
5208esac
5209fi
5210RM=$ac_cv_path_RM
5211if test -n "$RM"; then
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5213$as_echo "$RM" >&6; }
5214else
5215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5216$as_echo "no" >&6; }
5217fi
5218
5219
5220  test -n "$RM" && break
5221done
5222
5223
5224    if test "x$RM" = x; then
5225        if test "xrm" = x; then
5226          PROG_NAME=rm
5227        else
5228          PROG_NAME=rm
5229        fi
5230        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5231$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5232        as_fn_error $? "Cannot continue" "$LINENO" 5
5233    fi
5234
5235
5236
5237    for ac_prog in sh
5238do
5239  # Extract the first word of "$ac_prog", so it can be a program name with args.
5240set dummy $ac_prog; ac_word=$2
5241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5242$as_echo_n "checking for $ac_word... " >&6; }
5243if test "${ac_cv_path_SH+set}" = set; then :
5244  $as_echo_n "(cached) " >&6
5245else
5246  case $SH in
5247  [\\/]* | ?:[\\/]*)
5248  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5249  ;;
5250  *)
5251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254  IFS=$as_save_IFS
5255  test -z "$as_dir" && as_dir=.
5256    for ac_exec_ext in '' $ac_executable_extensions; do
5257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5258    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5260    break 2
5261  fi
5262done
5263  done
5264IFS=$as_save_IFS
5265
5266  ;;
5267esac
5268fi
5269SH=$ac_cv_path_SH
5270if test -n "$SH"; then
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5272$as_echo "$SH" >&6; }
5273else
5274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5275$as_echo "no" >&6; }
5276fi
5277
5278
5279  test -n "$SH" && break
5280done
5281
5282
5283    if test "x$SH" = x; then
5284        if test "xsh" = x; then
5285          PROG_NAME=sh
5286        else
5287          PROG_NAME=sh
5288        fi
5289        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5290$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5291        as_fn_error $? "Cannot continue" "$LINENO" 5
5292    fi
5293
5294
5295
5296    for ac_prog in sort
5297do
5298  # Extract the first word of "$ac_prog", so it can be a program name with args.
5299set dummy $ac_prog; ac_word=$2
5300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5301$as_echo_n "checking for $ac_word... " >&6; }
5302if test "${ac_cv_path_SORT+set}" = set; then :
5303  $as_echo_n "(cached) " >&6
5304else
5305  case $SORT in
5306  [\\/]* | ?:[\\/]*)
5307  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5308  ;;
5309  *)
5310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5311for as_dir in $PATH
5312do
5313  IFS=$as_save_IFS
5314  test -z "$as_dir" && as_dir=.
5315    for ac_exec_ext in '' $ac_executable_extensions; do
5316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5317    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5319    break 2
5320  fi
5321done
5322  done
5323IFS=$as_save_IFS
5324
5325  ;;
5326esac
5327fi
5328SORT=$ac_cv_path_SORT
5329if test -n "$SORT"; then
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5331$as_echo "$SORT" >&6; }
5332else
5333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
5335fi
5336
5337
5338  test -n "$SORT" && break
5339done
5340
5341
5342    if test "x$SORT" = x; then
5343        if test "xsort" = x; then
5344          PROG_NAME=sort
5345        else
5346          PROG_NAME=sort
5347        fi
5348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5349$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5350        as_fn_error $? "Cannot continue" "$LINENO" 5
5351    fi
5352
5353
5354
5355    for ac_prog in tail
5356do
5357  # Extract the first word of "$ac_prog", so it can be a program name with args.
5358set dummy $ac_prog; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if test "${ac_cv_path_TAIL+set}" = set; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $TAIL in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5376    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387TAIL=$ac_cv_path_TAIL
5388if test -n "$TAIL"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5390$as_echo "$TAIL" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397  test -n "$TAIL" && break
5398done
5399
5400
5401    if test "x$TAIL" = x; then
5402        if test "xtail" = x; then
5403          PROG_NAME=tail
5404        else
5405          PROG_NAME=tail
5406        fi
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5408$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5409        as_fn_error $? "Cannot continue" "$LINENO" 5
5410    fi
5411
5412
5413
5414    for ac_prog in tar
5415do
5416  # Extract the first word of "$ac_prog", so it can be a program name with args.
5417set dummy $ac_prog; ac_word=$2
5418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5419$as_echo_n "checking for $ac_word... " >&6; }
5420if test "${ac_cv_path_TAR+set}" = set; then :
5421  $as_echo_n "(cached) " >&6
5422else
5423  case $TAR in
5424  [\\/]* | ?:[\\/]*)
5425  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5426  ;;
5427  *)
5428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5429for as_dir in $PATH
5430do
5431  IFS=$as_save_IFS
5432  test -z "$as_dir" && as_dir=.
5433    for ac_exec_ext in '' $ac_executable_extensions; do
5434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5435    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5437    break 2
5438  fi
5439done
5440  done
5441IFS=$as_save_IFS
5442
5443  ;;
5444esac
5445fi
5446TAR=$ac_cv_path_TAR
5447if test -n "$TAR"; then
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5449$as_echo "$TAR" >&6; }
5450else
5451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5452$as_echo "no" >&6; }
5453fi
5454
5455
5456  test -n "$TAR" && break
5457done
5458
5459
5460    if test "x$TAR" = x; then
5461        if test "xtar" = x; then
5462          PROG_NAME=tar
5463        else
5464          PROG_NAME=tar
5465        fi
5466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5467$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5468        as_fn_error $? "Cannot continue" "$LINENO" 5
5469    fi
5470
5471
5472
5473    for ac_prog in tee
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if test "${ac_cv_path_TEE+set}" = set; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $TEE in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5494    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505TEE=$ac_cv_path_TEE
5506if test -n "$TEE"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5508$as_echo "$TEE" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$TEE" && break
5516done
5517
5518
5519    if test "x$TEE" = x; then
5520        if test "xtee" = x; then
5521          PROG_NAME=tee
5522        else
5523          PROG_NAME=tee
5524        fi
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5526$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5527        as_fn_error $? "Cannot continue" "$LINENO" 5
5528    fi
5529
5530
5531
5532    for ac_prog in touch
5533do
5534  # Extract the first word of "$ac_prog", so it can be a program name with args.
5535set dummy $ac_prog; ac_word=$2
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5537$as_echo_n "checking for $ac_word... " >&6; }
5538if test "${ac_cv_path_TOUCH+set}" = set; then :
5539  $as_echo_n "(cached) " >&6
5540else
5541  case $TOUCH in
5542  [\\/]* | ?:[\\/]*)
5543  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5544  ;;
5545  *)
5546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5547for as_dir in $PATH
5548do
5549  IFS=$as_save_IFS
5550  test -z "$as_dir" && as_dir=.
5551    for ac_exec_ext in '' $ac_executable_extensions; do
5552  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5553    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5555    break 2
5556  fi
5557done
5558  done
5559IFS=$as_save_IFS
5560
5561  ;;
5562esac
5563fi
5564TOUCH=$ac_cv_path_TOUCH
5565if test -n "$TOUCH"; then
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5567$as_echo "$TOUCH" >&6; }
5568else
5569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5570$as_echo "no" >&6; }
5571fi
5572
5573
5574  test -n "$TOUCH" && break
5575done
5576
5577
5578    if test "x$TOUCH" = x; then
5579        if test "xtouch" = x; then
5580          PROG_NAME=touch
5581        else
5582          PROG_NAME=touch
5583        fi
5584        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5585$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5586        as_fn_error $? "Cannot continue" "$LINENO" 5
5587    fi
5588
5589
5590
5591    for ac_prog in tr
5592do
5593  # Extract the first word of "$ac_prog", so it can be a program name with args.
5594set dummy $ac_prog; ac_word=$2
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
5597if test "${ac_cv_path_TR+set}" = set; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  case $TR in
5601  [\\/]* | ?:[\\/]*)
5602  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5603  ;;
5604  *)
5605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608  IFS=$as_save_IFS
5609  test -z "$as_dir" && as_dir=.
5610    for ac_exec_ext in '' $ac_executable_extensions; do
5611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5612    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614    break 2
5615  fi
5616done
5617  done
5618IFS=$as_save_IFS
5619
5620  ;;
5621esac
5622fi
5623TR=$ac_cv_path_TR
5624if test -n "$TR"; then
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5626$as_echo "$TR" >&6; }
5627else
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629$as_echo "no" >&6; }
5630fi
5631
5632
5633  test -n "$TR" && break
5634done
5635
5636
5637    if test "x$TR" = x; then
5638        if test "xtr" = x; then
5639          PROG_NAME=tr
5640        else
5641          PROG_NAME=tr
5642        fi
5643        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5644$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5645        as_fn_error $? "Cannot continue" "$LINENO" 5
5646    fi
5647
5648
5649
5650    for ac_prog in uname
5651do
5652  # Extract the first word of "$ac_prog", so it can be a program name with args.
5653set dummy $ac_prog; ac_word=$2
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655$as_echo_n "checking for $ac_word... " >&6; }
5656if test "${ac_cv_path_UNAME+set}" = set; then :
5657  $as_echo_n "(cached) " >&6
5658else
5659  case $UNAME in
5660  [\\/]* | ?:[\\/]*)
5661  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5662  ;;
5663  *)
5664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5665for as_dir in $PATH
5666do
5667  IFS=$as_save_IFS
5668  test -z "$as_dir" && as_dir=.
5669    for ac_exec_ext in '' $ac_executable_extensions; do
5670  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5671    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5673    break 2
5674  fi
5675done
5676  done
5677IFS=$as_save_IFS
5678
5679  ;;
5680esac
5681fi
5682UNAME=$ac_cv_path_UNAME
5683if test -n "$UNAME"; then
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5685$as_echo "$UNAME" >&6; }
5686else
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5688$as_echo "no" >&6; }
5689fi
5690
5691
5692  test -n "$UNAME" && break
5693done
5694
5695
5696    if test "x$UNAME" = x; then
5697        if test "xuname" = x; then
5698          PROG_NAME=uname
5699        else
5700          PROG_NAME=uname
5701        fi
5702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5703$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5704        as_fn_error $? "Cannot continue" "$LINENO" 5
5705    fi
5706
5707
5708
5709    for ac_prog in uniq
5710do
5711  # Extract the first word of "$ac_prog", so it can be a program name with args.
5712set dummy $ac_prog; ac_word=$2
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5714$as_echo_n "checking for $ac_word... " >&6; }
5715if test "${ac_cv_path_UNIQ+set}" = set; then :
5716  $as_echo_n "(cached) " >&6
5717else
5718  case $UNIQ in
5719  [\\/]* | ?:[\\/]*)
5720  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5721  ;;
5722  *)
5723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5724for as_dir in $PATH
5725do
5726  IFS=$as_save_IFS
5727  test -z "$as_dir" && as_dir=.
5728    for ac_exec_ext in '' $ac_executable_extensions; do
5729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5730    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5732    break 2
5733  fi
5734done
5735  done
5736IFS=$as_save_IFS
5737
5738  ;;
5739esac
5740fi
5741UNIQ=$ac_cv_path_UNIQ
5742if test -n "$UNIQ"; then
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5744$as_echo "$UNIQ" >&6; }
5745else
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747$as_echo "no" >&6; }
5748fi
5749
5750
5751  test -n "$UNIQ" && break
5752done
5753
5754
5755    if test "x$UNIQ" = x; then
5756        if test "xuniq" = x; then
5757          PROG_NAME=uniq
5758        else
5759          PROG_NAME=uniq
5760        fi
5761        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5762$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5763        as_fn_error $? "Cannot continue" "$LINENO" 5
5764    fi
5765
5766
5767
5768    for ac_prog in wc
5769do
5770  # Extract the first word of "$ac_prog", so it can be a program name with args.
5771set dummy $ac_prog; ac_word=$2
5772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5773$as_echo_n "checking for $ac_word... " >&6; }
5774if test "${ac_cv_path_WC+set}" = set; then :
5775  $as_echo_n "(cached) " >&6
5776else
5777  case $WC in
5778  [\\/]* | ?:[\\/]*)
5779  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5780  ;;
5781  *)
5782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5783for as_dir in $PATH
5784do
5785  IFS=$as_save_IFS
5786  test -z "$as_dir" && as_dir=.
5787    for ac_exec_ext in '' $ac_executable_extensions; do
5788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5789    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5791    break 2
5792  fi
5793done
5794  done
5795IFS=$as_save_IFS
5796
5797  ;;
5798esac
5799fi
5800WC=$ac_cv_path_WC
5801if test -n "$WC"; then
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5803$as_echo "$WC" >&6; }
5804else
5805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5806$as_echo "no" >&6; }
5807fi
5808
5809
5810  test -n "$WC" && break
5811done
5812
5813
5814    if test "x$WC" = x; then
5815        if test "xwc" = x; then
5816          PROG_NAME=wc
5817        else
5818          PROG_NAME=wc
5819        fi
5820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5822        as_fn_error $? "Cannot continue" "$LINENO" 5
5823    fi
5824
5825
5826
5827    for ac_prog in which
5828do
5829  # Extract the first word of "$ac_prog", so it can be a program name with args.
5830set dummy $ac_prog; ac_word=$2
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5832$as_echo_n "checking for $ac_word... " >&6; }
5833if test "${ac_cv_path_WHICH+set}" = set; then :
5834  $as_echo_n "(cached) " >&6
5835else
5836  case $WHICH in
5837  [\\/]* | ?:[\\/]*)
5838  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5839  ;;
5840  *)
5841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5842for as_dir in $PATH
5843do
5844  IFS=$as_save_IFS
5845  test -z "$as_dir" && as_dir=.
5846    for ac_exec_ext in '' $ac_executable_extensions; do
5847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5848    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5850    break 2
5851  fi
5852done
5853  done
5854IFS=$as_save_IFS
5855
5856  ;;
5857esac
5858fi
5859WHICH=$ac_cv_path_WHICH
5860if test -n "$WHICH"; then
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5862$as_echo "$WHICH" >&6; }
5863else
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5865$as_echo "no" >&6; }
5866fi
5867
5868
5869  test -n "$WHICH" && break
5870done
5871
5872
5873    if test "x$WHICH" = x; then
5874        if test "xwhich" = x; then
5875          PROG_NAME=which
5876        else
5877          PROG_NAME=which
5878        fi
5879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5881        as_fn_error $? "Cannot continue" "$LINENO" 5
5882    fi
5883
5884
5885
5886    for ac_prog in xargs
5887do
5888  # Extract the first word of "$ac_prog", so it can be a program name with args.
5889set dummy $ac_prog; ac_word=$2
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891$as_echo_n "checking for $ac_word... " >&6; }
5892if test "${ac_cv_path_XARGS+set}" = set; then :
5893  $as_echo_n "(cached) " >&6
5894else
5895  case $XARGS in
5896  [\\/]* | ?:[\\/]*)
5897  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5898  ;;
5899  *)
5900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901for as_dir in $PATH
5902do
5903  IFS=$as_save_IFS
5904  test -z "$as_dir" && as_dir=.
5905    for ac_exec_ext in '' $ac_executable_extensions; do
5906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5907    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5909    break 2
5910  fi
5911done
5912  done
5913IFS=$as_save_IFS
5914
5915  ;;
5916esac
5917fi
5918XARGS=$ac_cv_path_XARGS
5919if test -n "$XARGS"; then
5920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5921$as_echo "$XARGS" >&6; }
5922else
5923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
5925fi
5926
5927
5928  test -n "$XARGS" && break
5929done
5930
5931
5932    if test "x$XARGS" = x; then
5933        if test "xxargs" = x; then
5934          PROG_NAME=xargs
5935        else
5936          PROG_NAME=xargs
5937        fi
5938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5940        as_fn_error $? "Cannot continue" "$LINENO" 5
5941    fi
5942
5943
5944
5945# Then required tools that require some special treatment.
5946for ac_prog in gawk mawk nawk awk
5947do
5948  # Extract the first word of "$ac_prog", so it can be a program name with args.
5949set dummy $ac_prog; ac_word=$2
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5951$as_echo_n "checking for $ac_word... " >&6; }
5952if test "${ac_cv_prog_AWK+set}" = set; then :
5953  $as_echo_n "(cached) " >&6
5954else
5955  if test -n "$AWK"; then
5956  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5957else
5958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5959for as_dir in $PATH
5960do
5961  IFS=$as_save_IFS
5962  test -z "$as_dir" && as_dir=.
5963    for ac_exec_ext in '' $ac_executable_extensions; do
5964  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5965    ac_cv_prog_AWK="$ac_prog"
5966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5967    break 2
5968  fi
5969done
5970  done
5971IFS=$as_save_IFS
5972
5973fi
5974fi
5975AWK=$ac_cv_prog_AWK
5976if test -n "$AWK"; then
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5978$as_echo "$AWK" >&6; }
5979else
5980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
5982fi
5983
5984
5985  test -n "$AWK" && break
5986done
5987
5988
5989    if test "x$AWK" = x; then
5990        if test "x" = x; then
5991          PROG_NAME=awk
5992        else
5993          PROG_NAME=
5994        fi
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5997        as_fn_error $? "Cannot continue" "$LINENO" 5
5998    fi
5999
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6001$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6002if test "${ac_cv_path_GREP+set}" = set; then :
6003  $as_echo_n "(cached) " >&6
6004else
6005  if test -z "$GREP"; then
6006  ac_path_GREP_found=false
6007  # Loop through the user's path and test for each of PROGNAME-LIST
6008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6009for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6010do
6011  IFS=$as_save_IFS
6012  test -z "$as_dir" && as_dir=.
6013    for ac_prog in grep ggrep; do
6014    for ac_exec_ext in '' $ac_executable_extensions; do
6015      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6016      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6017# Check for GNU ac_path_GREP and select it if it is found.
6018  # Check for GNU $ac_path_GREP
6019case `"$ac_path_GREP" --version 2>&1` in
6020*GNU*)
6021  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6022*)
6023  ac_count=0
6024  $as_echo_n 0123456789 >"conftest.in"
6025  while :
6026  do
6027    cat "conftest.in" "conftest.in" >"conftest.tmp"
6028    mv "conftest.tmp" "conftest.in"
6029    cp "conftest.in" "conftest.nl"
6030    $as_echo 'GREP' >> "conftest.nl"
6031    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6032    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6033    as_fn_arith $ac_count + 1 && ac_count=$as_val
6034    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6035      # Best one so far, save it but keep looking for a better one
6036      ac_cv_path_GREP="$ac_path_GREP"
6037      ac_path_GREP_max=$ac_count
6038    fi
6039    # 10*(2^10) chars as input seems more than enough
6040    test $ac_count -gt 10 && break
6041  done
6042  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6043esac
6044
6045      $ac_path_GREP_found && break 3
6046    done
6047  done
6048  done
6049IFS=$as_save_IFS
6050  if test -z "$ac_cv_path_GREP"; then
6051    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6052  fi
6053else
6054  ac_cv_path_GREP=$GREP
6055fi
6056
6057fi
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6059$as_echo "$ac_cv_path_GREP" >&6; }
6060 GREP="$ac_cv_path_GREP"
6061
6062
6063
6064    if test "x$GREP" = x; then
6065        if test "x" = x; then
6066          PROG_NAME=grep
6067        else
6068          PROG_NAME=
6069        fi
6070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6071$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6072        as_fn_error $? "Cannot continue" "$LINENO" 5
6073    fi
6074
6075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6076$as_echo_n "checking for egrep... " >&6; }
6077if test "${ac_cv_path_EGREP+set}" = set; then :
6078  $as_echo_n "(cached) " >&6
6079else
6080  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6081   then ac_cv_path_EGREP="$GREP -E"
6082   else
6083     if test -z "$EGREP"; then
6084  ac_path_EGREP_found=false
6085  # Loop through the user's path and test for each of PROGNAME-LIST
6086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6087for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6088do
6089  IFS=$as_save_IFS
6090  test -z "$as_dir" && as_dir=.
6091    for ac_prog in egrep; do
6092    for ac_exec_ext in '' $ac_executable_extensions; do
6093      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6094      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6095# Check for GNU ac_path_EGREP and select it if it is found.
6096  # Check for GNU $ac_path_EGREP
6097case `"$ac_path_EGREP" --version 2>&1` in
6098*GNU*)
6099  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6100*)
6101  ac_count=0
6102  $as_echo_n 0123456789 >"conftest.in"
6103  while :
6104  do
6105    cat "conftest.in" "conftest.in" >"conftest.tmp"
6106    mv "conftest.tmp" "conftest.in"
6107    cp "conftest.in" "conftest.nl"
6108    $as_echo 'EGREP' >> "conftest.nl"
6109    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6110    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6111    as_fn_arith $ac_count + 1 && ac_count=$as_val
6112    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6113      # Best one so far, save it but keep looking for a better one
6114      ac_cv_path_EGREP="$ac_path_EGREP"
6115      ac_path_EGREP_max=$ac_count
6116    fi
6117    # 10*(2^10) chars as input seems more than enough
6118    test $ac_count -gt 10 && break
6119  done
6120  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6121esac
6122
6123      $ac_path_EGREP_found && break 3
6124    done
6125  done
6126  done
6127IFS=$as_save_IFS
6128  if test -z "$ac_cv_path_EGREP"; then
6129    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6130  fi
6131else
6132  ac_cv_path_EGREP=$EGREP
6133fi
6134
6135   fi
6136fi
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6138$as_echo "$ac_cv_path_EGREP" >&6; }
6139 EGREP="$ac_cv_path_EGREP"
6140
6141
6142
6143    if test "x$EGREP" = x; then
6144        if test "x" = x; then
6145          PROG_NAME=egrep
6146        else
6147          PROG_NAME=
6148        fi
6149        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6151        as_fn_error $? "Cannot continue" "$LINENO" 5
6152    fi
6153
6154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6155$as_echo_n "checking for fgrep... " >&6; }
6156if test "${ac_cv_path_FGREP+set}" = set; then :
6157  $as_echo_n "(cached) " >&6
6158else
6159  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6160   then ac_cv_path_FGREP="$GREP -F"
6161   else
6162     if test -z "$FGREP"; then
6163  ac_path_FGREP_found=false
6164  # Loop through the user's path and test for each of PROGNAME-LIST
6165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6167do
6168  IFS=$as_save_IFS
6169  test -z "$as_dir" && as_dir=.
6170    for ac_prog in fgrep; do
6171    for ac_exec_ext in '' $ac_executable_extensions; do
6172      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6173      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6174# Check for GNU ac_path_FGREP and select it if it is found.
6175  # Check for GNU $ac_path_FGREP
6176case `"$ac_path_FGREP" --version 2>&1` in
6177*GNU*)
6178  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6179*)
6180  ac_count=0
6181  $as_echo_n 0123456789 >"conftest.in"
6182  while :
6183  do
6184    cat "conftest.in" "conftest.in" >"conftest.tmp"
6185    mv "conftest.tmp" "conftest.in"
6186    cp "conftest.in" "conftest.nl"
6187    $as_echo 'FGREP' >> "conftest.nl"
6188    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6189    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6190    as_fn_arith $ac_count + 1 && ac_count=$as_val
6191    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6192      # Best one so far, save it but keep looking for a better one
6193      ac_cv_path_FGREP="$ac_path_FGREP"
6194      ac_path_FGREP_max=$ac_count
6195    fi
6196    # 10*(2^10) chars as input seems more than enough
6197    test $ac_count -gt 10 && break
6198  done
6199  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6200esac
6201
6202      $ac_path_FGREP_found && break 3
6203    done
6204  done
6205  done
6206IFS=$as_save_IFS
6207  if test -z "$ac_cv_path_FGREP"; then
6208    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6209  fi
6210else
6211  ac_cv_path_FGREP=$FGREP
6212fi
6213
6214   fi
6215fi
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6217$as_echo "$ac_cv_path_FGREP" >&6; }
6218 FGREP="$ac_cv_path_FGREP"
6219
6220
6221
6222    if test "x$FGREP" = x; then
6223        if test "x" = x; then
6224          PROG_NAME=fgrep
6225        else
6226          PROG_NAME=
6227        fi
6228        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6230        as_fn_error $? "Cannot continue" "$LINENO" 5
6231    fi
6232
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6234$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6235if test "${ac_cv_path_SED+set}" = set; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6239     for ac_i in 1 2 3 4 5 6 7; do
6240       ac_script="$ac_script$as_nl$ac_script"
6241     done
6242     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6243     { ac_script=; unset ac_script;}
6244     if test -z "$SED"; then
6245  ac_path_SED_found=false
6246  # Loop through the user's path and test for each of PROGNAME-LIST
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_prog in sed gsed; do
6253    for ac_exec_ext in '' $ac_executable_extensions; do
6254      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6255      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6256# Check for GNU ac_path_SED and select it if it is found.
6257  # Check for GNU $ac_path_SED
6258case `"$ac_path_SED" --version 2>&1` in
6259*GNU*)
6260  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6261*)
6262  ac_count=0
6263  $as_echo_n 0123456789 >"conftest.in"
6264  while :
6265  do
6266    cat "conftest.in" "conftest.in" >"conftest.tmp"
6267    mv "conftest.tmp" "conftest.in"
6268    cp "conftest.in" "conftest.nl"
6269    $as_echo '' >> "conftest.nl"
6270    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6272    as_fn_arith $ac_count + 1 && ac_count=$as_val
6273    if test $ac_count -gt ${ac_path_SED_max-0}; then
6274      # Best one so far, save it but keep looking for a better one
6275      ac_cv_path_SED="$ac_path_SED"
6276      ac_path_SED_max=$ac_count
6277    fi
6278    # 10*(2^10) chars as input seems more than enough
6279    test $ac_count -gt 10 && break
6280  done
6281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6282esac
6283
6284      $ac_path_SED_found && break 3
6285    done
6286  done
6287  done
6288IFS=$as_save_IFS
6289  if test -z "$ac_cv_path_SED"; then
6290    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6291  fi
6292else
6293  ac_cv_path_SED=$SED
6294fi
6295
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6298$as_echo "$ac_cv_path_SED" >&6; }
6299 SED="$ac_cv_path_SED"
6300  rm -f conftest.sed
6301
6302
6303    if test "x$SED" = x; then
6304        if test "x" = x; then
6305          PROG_NAME=sed
6306        else
6307          PROG_NAME=
6308        fi
6309        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6311        as_fn_error $? "Cannot continue" "$LINENO" 5
6312    fi
6313
6314
6315for ac_prog in nawk gawk awk
6316do
6317  # Extract the first word of "$ac_prog", so it can be a program name with args.
6318set dummy $ac_prog; ac_word=$2
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
6321if test "${ac_cv_path_NAWK+set}" = set; then :
6322  $as_echo_n "(cached) " >&6
6323else
6324  case $NAWK in
6325  [\\/]* | ?:[\\/]*)
6326  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6327  ;;
6328  *)
6329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332  IFS=$as_save_IFS
6333  test -z "$as_dir" && as_dir=.
6334    for ac_exec_ext in '' $ac_executable_extensions; do
6335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6336    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338    break 2
6339  fi
6340done
6341  done
6342IFS=$as_save_IFS
6343
6344  ;;
6345esac
6346fi
6347NAWK=$ac_cv_path_NAWK
6348if test -n "$NAWK"; then
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6350$as_echo "$NAWK" >&6; }
6351else
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356
6357  test -n "$NAWK" && break
6358done
6359
6360
6361    if test "x$NAWK" = x; then
6362        if test "x" = x; then
6363          PROG_NAME=nawk
6364        else
6365          PROG_NAME=
6366        fi
6367        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6369        as_fn_error $? "Cannot continue" "$LINENO" 5
6370    fi
6371
6372
6373# Always force rm.
6374RM="$RM -f"
6375
6376# pwd behaves differently on various platforms and some don't support the -L flag.
6377# Always use the bash builtin pwd to get uniform behavior.
6378THEPWDCMD=pwd
6379
6380# These are not required on all platforms
6381# Extract the first word of "cygpath", so it can be a program name with args.
6382set dummy cygpath; ac_word=$2
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384$as_echo_n "checking for $ac_word... " >&6; }
6385if test "${ac_cv_path_CYGPATH+set}" = set; then :
6386  $as_echo_n "(cached) " >&6
6387else
6388  case $CYGPATH in
6389  [\\/]* | ?:[\\/]*)
6390  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6391  ;;
6392  *)
6393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396  IFS=$as_save_IFS
6397  test -z "$as_dir" && as_dir=.
6398    for ac_exec_ext in '' $ac_executable_extensions; do
6399  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6400    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402    break 2
6403  fi
6404done
6405  done
6406IFS=$as_save_IFS
6407
6408  ;;
6409esac
6410fi
6411CYGPATH=$ac_cv_path_CYGPATH
6412if test -n "$CYGPATH"; then
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6414$as_echo "$CYGPATH" >&6; }
6415else
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421# Extract the first word of "readlink", so it can be a program name with args.
6422set dummy readlink; ac_word=$2
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6424$as_echo_n "checking for $ac_word... " >&6; }
6425if test "${ac_cv_path_READLINK+set}" = set; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  case $READLINK in
6429  [\\/]* | ?:[\\/]*)
6430  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6431  ;;
6432  *)
6433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436  IFS=$as_save_IFS
6437  test -z "$as_dir" && as_dir=.
6438    for ac_exec_ext in '' $ac_executable_extensions; do
6439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6440    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442    break 2
6443  fi
6444done
6445  done
6446IFS=$as_save_IFS
6447
6448  ;;
6449esac
6450fi
6451READLINK=$ac_cv_path_READLINK
6452if test -n "$READLINK"; then
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6454$as_echo "$READLINK" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461# Extract the first word of "df", so it can be a program name with args.
6462set dummy df; ac_word=$2
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464$as_echo_n "checking for $ac_word... " >&6; }
6465if test "${ac_cv_path_DF+set}" = set; then :
6466  $as_echo_n "(cached) " >&6
6467else
6468  case $DF in
6469  [\\/]* | ?:[\\/]*)
6470  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6471  ;;
6472  *)
6473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474for as_dir in $PATH
6475do
6476  IFS=$as_save_IFS
6477  test -z "$as_dir" && as_dir=.
6478    for ac_exec_ext in '' $ac_executable_extensions; do
6479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6480    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482    break 2
6483  fi
6484done
6485  done
6486IFS=$as_save_IFS
6487
6488  ;;
6489esac
6490fi
6491DF=$ac_cv_path_DF
6492if test -n "$DF"; then
6493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6494$as_echo "$DF" >&6; }
6495else
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500
6501# Extract the first word of "SetFile", so it can be a program name with args.
6502set dummy SetFile; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if test "${ac_cv_path_SETFILE+set}" = set; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $SETFILE in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6520    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531SETFILE=$ac_cv_path_SETFILE
6532if test -n "$SETFILE"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6534$as_echo "$SETFILE" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541
6542
6543# Now we can determine OpenJDK build and target platforms. This is required to
6544# have early on.
6545# Make sure we can run config.sub.
6546$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6547  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6548
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6550$as_echo_n "checking build system type... " >&6; }
6551if test "${ac_cv_build+set}" = set; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  ac_build_alias=$build_alias
6555test "x$ac_build_alias" = x &&
6556  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6557test "x$ac_build_alias" = x &&
6558  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6559ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6560  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6561
6562fi
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6564$as_echo "$ac_cv_build" >&6; }
6565case $ac_cv_build in
6566*-*-*) ;;
6567*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6568esac
6569build=$ac_cv_build
6570ac_save_IFS=$IFS; IFS='-'
6571set x $ac_cv_build
6572shift
6573build_cpu=$1
6574build_vendor=$2
6575shift; shift
6576# Remember, the first character of IFS is used to create $*,
6577# except with old shells:
6578build_os=$*
6579IFS=$ac_save_IFS
6580case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6581
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6584$as_echo_n "checking host system type... " >&6; }
6585if test "${ac_cv_host+set}" = set; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  if test "x$host_alias" = x; then
6589  ac_cv_host=$ac_cv_build
6590else
6591  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6592    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6597$as_echo "$ac_cv_host" >&6; }
6598case $ac_cv_host in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6601esac
6602host=$ac_cv_host
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_host
6605shift
6606host_cpu=$1
6607host_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611host_os=$*
6612IFS=$ac_save_IFS
6613case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6617$as_echo_n "checking target system type... " >&6; }
6618if test "${ac_cv_target+set}" = set; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  if test "x$target_alias" = x; then
6622  ac_cv_target=$ac_cv_host
6623else
6624  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6625    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6626fi
6627
6628fi
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6630$as_echo "$ac_cv_target" >&6; }
6631case $ac_cv_target in
6632*-*-*) ;;
6633*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6634esac
6635target=$ac_cv_target
6636ac_save_IFS=$IFS; IFS='-'
6637set x $ac_cv_target
6638shift
6639target_cpu=$1
6640target_vendor=$2
6641shift; shift
6642# Remember, the first character of IFS is used to create $*,
6643# except with old shells:
6644target_os=$*
6645IFS=$ac_save_IFS
6646case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6647
6648
6649# The aliases save the names the user supplied, while $host etc.
6650# will get canonicalized.
6651test -n "$target_alias" &&
6652  test "$program_prefix$program_suffix$program_transform_name" = \
6653    NONENONEs,x,x, &&
6654  program_prefix=${target_alias}-
6655
6656# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6657# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6658# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6659# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6660# to use the configure naming style.
6661
6662
6663
6664
6665
6666    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6667    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6668    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6669    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6670    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6671    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6672
6673
6674
6675    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6676
6677  case "$build_os" in
6678    *linux*)
6679      VAR_OS=linux
6680      VAR_OS_API=posix
6681      VAR_OS_ENV=linux
6682      ;;
6683    *solaris*)
6684      VAR_OS=solaris
6685      VAR_OS_API=posix
6686      VAR_OS_ENV=solaris
6687      ;;
6688    *darwin*)
6689      VAR_OS=macosx
6690      VAR_OS_API=posix
6691      VAR_OS_ENV=macosx
6692      ;;
6693    *bsd*)
6694      VAR_OS=bsd
6695      VAR_OS_API=posix
6696      VAR_OS_ENV=bsd
6697      ;;
6698    *cygwin*)
6699      VAR_OS=windows
6700      VAR_OS_API=winapi
6701      VAR_OS_ENV=windows.cygwin
6702      ;;
6703    *mingw*)
6704      VAR_OS=windows
6705      VAR_OS_API=winapi
6706      VAR_OS_ENV=windows.msys
6707      ;;
6708    *)
6709      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6710      ;;
6711  esac
6712
6713
6714  # First argument is the cpu name from the trip/quad
6715  case "$build_cpu" in
6716    x86_64)
6717      VAR_CPU=x86_64
6718      VAR_CPU_ARCH=x86
6719      VAR_CPU_BITS=64
6720      VAR_CPU_ENDIAN=little
6721      ;;
6722    i?86)
6723      VAR_CPU=x86
6724      VAR_CPU_ARCH=x86
6725      VAR_CPU_BITS=32
6726      VAR_CPU_ENDIAN=little
6727      ;;
6728    arm*)
6729      VAR_CPU=arm
6730      VAR_CPU_ARCH=arm
6731      VAR_CPU_BITS=32
6732      VAR_CPU_ENDIAN=little
6733      ;;
6734    powerpc)
6735      VAR_CPU=ppc
6736      VAR_CPU_ARCH=ppc
6737      VAR_CPU_BITS=32
6738      VAR_CPU_ENDIAN=big
6739       ;;
6740    powerpc64)
6741      VAR_CPU=ppc64
6742      VAR_CPU_ARCH=ppc
6743      VAR_CPU_BITS=64
6744      VAR_CPU_ENDIAN=big
6745       ;;
6746    sparc)
6747      VAR_CPU=sparc
6748      VAR_CPU_ARCH=sparc
6749      VAR_CPU_BITS=32
6750      VAR_CPU_ENDIAN=big
6751       ;;
6752    sparcv9)
6753      VAR_CPU=sparcv9
6754      VAR_CPU_ARCH=sparc
6755      VAR_CPU_BITS=64
6756      VAR_CPU_ENDIAN=big
6757       ;;
6758    *)
6759      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6760      ;;
6761  esac
6762
6763    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6764    OPENJDK_BUILD_OS="$VAR_OS"
6765    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6766    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6767    OPENJDK_BUILD_CPU="$VAR_CPU"
6768    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6769    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6770    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6771
6772
6773
6774
6775
6776
6777
6778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6779$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6781$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6782
6783    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6784
6785  case "$host_os" in
6786    *linux*)
6787      VAR_OS=linux
6788      VAR_OS_API=posix
6789      VAR_OS_ENV=linux
6790      ;;
6791    *solaris*)
6792      VAR_OS=solaris
6793      VAR_OS_API=posix
6794      VAR_OS_ENV=solaris
6795      ;;
6796    *darwin*)
6797      VAR_OS=macosx
6798      VAR_OS_API=posix
6799      VAR_OS_ENV=macosx
6800      ;;
6801    *bsd*)
6802      VAR_OS=bsd
6803      VAR_OS_API=posix
6804      VAR_OS_ENV=bsd
6805      ;;
6806    *cygwin*)
6807      VAR_OS=windows
6808      VAR_OS_API=winapi
6809      VAR_OS_ENV=windows.cygwin
6810      ;;
6811    *mingw*)
6812      VAR_OS=windows
6813      VAR_OS_API=winapi
6814      VAR_OS_ENV=windows.msys
6815      ;;
6816    *)
6817      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6818      ;;
6819  esac
6820
6821
6822  # First argument is the cpu name from the trip/quad
6823  case "$host_cpu" in
6824    x86_64)
6825      VAR_CPU=x86_64
6826      VAR_CPU_ARCH=x86
6827      VAR_CPU_BITS=64
6828      VAR_CPU_ENDIAN=little
6829      ;;
6830    i?86)
6831      VAR_CPU=x86
6832      VAR_CPU_ARCH=x86
6833      VAR_CPU_BITS=32
6834      VAR_CPU_ENDIAN=little
6835      ;;
6836    arm*)
6837      VAR_CPU=arm
6838      VAR_CPU_ARCH=arm
6839      VAR_CPU_BITS=32
6840      VAR_CPU_ENDIAN=little
6841      ;;
6842    powerpc)
6843      VAR_CPU=ppc
6844      VAR_CPU_ARCH=ppc
6845      VAR_CPU_BITS=32
6846      VAR_CPU_ENDIAN=big
6847       ;;
6848    powerpc64)
6849      VAR_CPU=ppc64
6850      VAR_CPU_ARCH=ppc
6851      VAR_CPU_BITS=64
6852      VAR_CPU_ENDIAN=big
6853       ;;
6854    sparc)
6855      VAR_CPU=sparc
6856      VAR_CPU_ARCH=sparc
6857      VAR_CPU_BITS=32
6858      VAR_CPU_ENDIAN=big
6859       ;;
6860    sparcv9)
6861      VAR_CPU=sparcv9
6862      VAR_CPU_ARCH=sparc
6863      VAR_CPU_BITS=64
6864      VAR_CPU_ENDIAN=big
6865       ;;
6866    *)
6867      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6868      ;;
6869  esac
6870
6871    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6872    OPENJDK_TARGET_OS="$VAR_OS"
6873    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6874    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6875    OPENJDK_TARGET_CPU="$VAR_CPU"
6876    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6877    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6878    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6879
6880
6881
6882
6883
6884
6885
6886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6887$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6889$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6890
6891
6892
6893# Check whether --with-target-bits was given.
6894if test "${with_target_bits+set}" = set; then :
6895  withval=$with_target_bits;
6896fi
6897
6898
6899  # We have three types of compiles:
6900  # native  == normal compilation, target system == build system
6901  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6902  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6903  #
6904  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6905    # We're doing a proper cross-compilation
6906    COMPILE_TYPE="cross"
6907  else
6908    COMPILE_TYPE="native"
6909  fi
6910
6911  if test "x$with_target_bits" != x; then
6912    if test "x$COMPILE_TYPE" = "xcross"; then
6913      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6914    fi
6915
6916    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6917      # A reduced build is requested
6918      COMPILE_TYPE="reduced"
6919      OPENJDK_TARGET_CPU_BITS=32
6920      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6921        OPENJDK_TARGET_CPU=x86
6922      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6923        OPENJDK_TARGET_CPU=sparc
6924      else
6925        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6926      fi
6927    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6928      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
6929    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6930      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6931$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6932    else
6933      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6934    fi
6935  fi
6936
6937
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6939$as_echo_n "checking compilation type... " >&6; }
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6941$as_echo "$COMPILE_TYPE" >&6; }
6942
6943
6944    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6945       REQUIRED_OS_NAME=SunOS
6946       REQUIRED_OS_VERSION=5.10
6947    fi
6948    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6949       REQUIRED_OS_NAME=Linux
6950       REQUIRED_OS_VERSION=2.6
6951    fi
6952    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6953        REQUIRED_OS_NAME=Windows
6954        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6955            REQUIRED_OS_VERSION=5.2
6956        else
6957            REQUIRED_OS_VERSION=5.1
6958        fi
6959    fi
6960    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6961        REQUIRED_OS_NAME=Darwin
6962        REQUIRED_OS_VERSION=11.2
6963    fi
6964
6965
6966
6967
6968
6969    # Also store the legacy naming of the cpu.
6970    # Ie i586 and amd64 instead of x86 and x86_64
6971    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6972    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6973      OPENJDK_TARGET_CPU_LEGACY="i586"
6974    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6975      # On all platforms except MacOSX replace x86_64 with amd64.
6976      OPENJDK_TARGET_CPU_LEGACY="amd64"
6977    fi
6978
6979
6980    # And the second legacy naming of the cpu.
6981    # Ie i386 and amd64 instead of x86 and x86_64.
6982    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6983    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6984      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6985    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6986      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6987    fi
6988
6989
6990    # This is the name of the cpu (but using i386 and amd64 instead of
6991    # x86 and x86_64, respectively), preceeded by a /, to be used when
6992    # locating libraries. On macosx, it's empty, though.
6993    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6994    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6995        OPENJDK_TARGET_CPU_LIBDIR=""
6996    fi
6997
6998
6999    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7000    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7001    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7002    OPENJDK_TARGET_CPU_ISADIR=""
7003    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7004      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7005          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7006      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7007          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7008      fi
7009    fi
7010
7011
7012    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7013    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7014    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7015      # On linux only, we replace x86 with i386.
7016      OPENJDK_TARGET_CPU_OSARCH="i386"
7017    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7018      # On all platforms except macosx, we replace x86_64 with amd64.
7019      OPENJDK_TARGET_CPU_OSARCH="amd64"
7020    fi
7021
7022
7023    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7024    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7025      OPENJDK_TARGET_CPU_JLI="i386"
7026    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7027      # On all platforms except macosx, we replace x86_64 with amd64.
7028      OPENJDK_TARGET_CPU_JLI="amd64"
7029    fi
7030    # Now setup the -D flags for building libjli.
7031    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7032    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7033      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7034        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7035      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7036        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7037      fi
7038    fi
7039
7040
7041    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7042    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7043        OPENJDK_TARGET_OS_API_DIR="solaris"
7044    fi
7045    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7046        OPENJDK_TARGET_OS_API_DIR="windows"
7047    fi
7048
7049
7050    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7051        A_LP64="LP64:="
7052        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7053        # unpack200.exe
7054        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7055            ADD_LP64="-D_LP64=1"
7056        fi
7057    fi
7058    LP64=$A_LP64
7059
7060
7061    if test "x$COMPILE_TYPE" = "xcross"; then
7062      # FIXME: ... or should this include reduced builds..?
7063      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7064    else
7065      DEFINE_CROSS_COMPILE_ARCH=""
7066    fi
7067
7068
7069    # ZERO_ARCHDEF is used to enable architecture-specific code
7070    case "${OPENJDK_TARGET_CPU}" in
7071      ppc*)    ZERO_ARCHDEF=PPC   ;;
7072      s390*)   ZERO_ARCHDEF=S390  ;;
7073      sparc*)  ZERO_ARCHDEF=SPARC ;;
7074      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7075      x86)     ZERO_ARCHDEF=IA32  ;;
7076      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7077    esac
7078
7079
7080
7081
7082
7083# Continue setting up basic stuff. Most remaining code require fundamental tools.
7084
7085# Locate the directory of this script.
7086SCRIPT="$0"
7087AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7088
7089# Where is the source? It is located two levels above the configure script.
7090CURDIR="$PWD"
7091cd "$AUTOCONF_DIR/../.."
7092SRC_ROOT="`$THEPWDCMD -L`"
7093
7094if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7095  PATH_SEP=";"
7096
7097  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7098  if test $SRC_ROOT_LENGTH -gt 100; then
7099      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7100  fi
7101
7102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7104$as_echo_n "checking cygwin release... " >&6; }
7105    CYGWIN_VERSION=`$UNAME -r`
7106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7107$as_echo "$CYGWIN_VERSION" >&6; }
7108    WINDOWS_ENV_VENDOR='cygwin'
7109    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7110
7111    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7112    if test "x$CYGWIN_VERSION_OK" = x; then
7113      { $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
7114$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;}
7115      as_fn_error $? "Cannot continue" "$LINENO" 5
7116    fi
7117    if test "x$CYGPATH" = x; then
7118        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7119    fi
7120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7121$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7122    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7123    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7124    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7125    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7127$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7128    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7129    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7130    if test "x$test_cygdrive_prefix" = x; then
7131        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7132    fi
7133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7135$as_echo_n "checking msys release... " >&6; }
7136    MSYS_VERSION=`$UNAME -r`
7137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7138$as_echo "$MSYS_VERSION" >&6; }
7139
7140    WINDOWS_ENV_VENDOR='msys'
7141    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7142
7143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7144$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7145    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7146    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7147
7148  windows_path="$MSYS_ROOT_PATH"
7149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7150    unix_path=`$CYGPATH -u "$windows_path"`
7151    MSYS_ROOT_PATH="$unix_path"
7152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7154    MSYS_ROOT_PATH="$unix_path"
7155  fi
7156
7157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7158$as_echo "$MSYS_ROOT_PATH" >&6; }
7159    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7160  else
7161    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7162  fi
7163
7164  # Test if windows or unix (cygwin/msys) find is first in path.
7165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7166$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7167  FIND_BINARY_OUTPUT=`find --version 2>&1`
7168  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7170$as_echo "unix style" >&6; }
7171  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7173$as_echo "Windows" >&6; }
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7175$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7176    { $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
7177$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7178    as_fn_error $? "Cannot continue" "$LINENO" 5
7179  else
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7181$as_echo "unknown" >&6; }
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7183$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7184  fi
7185
7186else
7187  PATH_SEP=":"
7188fi
7189
7190
7191
7192cd "$CURDIR"
7193
7194
7195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7196
7197  # Input might be given as Windows format, start by converting to
7198  # unix format.
7199  path="$SRC_ROOT"
7200  new_path=`$CYGPATH -u "$path"`
7201
7202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7205  # "foo.exe" is OK but "foo" is an error.
7206  #
7207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7208  # It is also a way to make sure we got the proper file name for the real test later on.
7209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7210  if test "x$test_shortpath" = x; then
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7212$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7213    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7214  fi
7215
7216  # Call helper function which possibly converts this using DOS-style short mode.
7217  # If so, the updated path is stored in $new_path.
7218
7219  input_path="$new_path"
7220  # Check if we need to convert this using DOS-style short mode. If the path
7221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7222  # take no chances and rewrite it.
7223  # Note: m4 eats our [], so we need to use [ and ] instead.
7224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7225  if test "x$has_forbidden_chars" != x; then
7226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7230      # Going to short mode and back again did indeed matter. Since short mode is
7231      # case insensitive, let's make it lowercase to improve readability.
7232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7233      # Now convert it back to Unix-stile (cygpath)
7234      input_path=`$CYGPATH -u "$shortmode_path"`
7235      new_path="$input_path"
7236    fi
7237  fi
7238
7239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7240  if test "x$test_cygdrive_prefix" = x; then
7241    # As a simple fix, exclude /usr/bin since it's not a real path.
7242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7244      # a path prefixed by /cygdrive for fixpath to work.
7245      new_path="$CYGWIN_ROOT_PATH$input_path"
7246    fi
7247  fi
7248
7249
7250  if test "x$path" != "x$new_path"; then
7251    SRC_ROOT="$new_path"
7252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7253$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7254  fi
7255
7256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7257
7258  path="$SRC_ROOT"
7259  has_colon=`$ECHO $path | $GREP ^.:`
7260  new_path="$path"
7261  if test "x$has_colon" = x; then
7262    # Not in mixed or Windows style, start by that.
7263    new_path=`cmd //c echo $path`
7264  fi
7265
7266
7267  input_path="$new_path"
7268  # Check if we need to convert this using DOS-style short mode. If the path
7269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7270  # take no chances and rewrite it.
7271  # Note: m4 eats our [], so we need to use [ and ] instead.
7272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7273  if test "x$has_forbidden_chars" != x; then
7274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7276  fi
7277
7278
7279  windows_path="$new_path"
7280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7281    unix_path=`$CYGPATH -u "$windows_path"`
7282    new_path="$unix_path"
7283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7285    new_path="$unix_path"
7286  fi
7287
7288  if test "x$path" != "x$new_path"; then
7289    SRC_ROOT="$new_path"
7290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7291$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7292  fi
7293
7294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7296
7297  else
7298    # We're on a posix platform. Hooray! :)
7299    path="$SRC_ROOT"
7300    has_space=`$ECHO "$path" | $GREP " "`
7301    if test "x$has_space" != x; then
7302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7303$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7304      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7305    fi
7306
7307    # Use eval to expand a potential ~
7308    eval path="$path"
7309    if test ! -f "$path" && test ! -d "$path"; then
7310      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7311    fi
7312
7313    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7314  fi
7315
7316
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318
7319  # Input might be given as Windows format, start by converting to
7320  # unix format.
7321  path="$CURDIR"
7322  new_path=`$CYGPATH -u "$path"`
7323
7324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327  # "foo.exe" is OK but "foo" is an error.
7328  #
7329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330  # It is also a way to make sure we got the proper file name for the real test later on.
7331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332  if test "x$test_shortpath" = x; then
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7334$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7335    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7336  fi
7337
7338  # Call helper function which possibly converts this using DOS-style short mode.
7339  # If so, the updated path is stored in $new_path.
7340
7341  input_path="$new_path"
7342  # Check if we need to convert this using DOS-style short mode. If the path
7343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344  # take no chances and rewrite it.
7345  # Note: m4 eats our [], so we need to use [ and ] instead.
7346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347  if test "x$has_forbidden_chars" != x; then
7348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352      # Going to short mode and back again did indeed matter. Since short mode is
7353      # case insensitive, let's make it lowercase to improve readability.
7354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355      # Now convert it back to Unix-stile (cygpath)
7356      input_path=`$CYGPATH -u "$shortmode_path"`
7357      new_path="$input_path"
7358    fi
7359  fi
7360
7361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362  if test "x$test_cygdrive_prefix" = x; then
7363    # As a simple fix, exclude /usr/bin since it's not a real path.
7364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366      # a path prefixed by /cygdrive for fixpath to work.
7367      new_path="$CYGWIN_ROOT_PATH$input_path"
7368    fi
7369  fi
7370
7371
7372  if test "x$path" != "x$new_path"; then
7373    CURDIR="$new_path"
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7375$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7376  fi
7377
7378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379
7380  path="$CURDIR"
7381  has_colon=`$ECHO $path | $GREP ^.:`
7382  new_path="$path"
7383  if test "x$has_colon" = x; then
7384    # Not in mixed or Windows style, start by that.
7385    new_path=`cmd //c echo $path`
7386  fi
7387
7388
7389  input_path="$new_path"
7390  # Check if we need to convert this using DOS-style short mode. If the path
7391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392  # take no chances and rewrite it.
7393  # Note: m4 eats our [], so we need to use [ and ] instead.
7394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395  if test "x$has_forbidden_chars" != x; then
7396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398  fi
7399
7400
7401  windows_path="$new_path"
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403    unix_path=`$CYGPATH -u "$windows_path"`
7404    new_path="$unix_path"
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407    new_path="$unix_path"
7408  fi
7409
7410  if test "x$path" != "x$new_path"; then
7411    CURDIR="$new_path"
7412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7413$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7414  fi
7415
7416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418
7419  else
7420    # We're on a posix platform. Hooray! :)
7421    path="$CURDIR"
7422    has_space=`$ECHO "$path" | $GREP " "`
7423    if test "x$has_space" != x; then
7424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7425$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7427    fi
7428
7429    # Use eval to expand a potential ~
7430    eval path="$path"
7431    if test ! -f "$path" && test ! -d "$path"; then
7432      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7433    fi
7434
7435    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7436  fi
7437
7438
7439if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7440    # Add extra search paths on solaris for utilities like ar and as etc...
7441    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7442fi
7443
7444# You can force the sys-root if the sys-root encoded into the cross compiler tools
7445# is not correct.
7446
7447# Check whether --with-sys-root was given.
7448if test "${with_sys_root+set}" = set; then :
7449  withval=$with_sys_root;
7450fi
7451
7452
7453if test "x$with_sys_root" != x; then
7454  SYS_ROOT=$with_sys_root
7455else
7456  SYS_ROOT=/
7457fi
7458
7459
7460
7461# Check whether --with-tools-dir was given.
7462if test "${with_tools_dir+set}" = set; then :
7463  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7464
7465fi
7466
7467
7468
7469# Check whether --with-devkit was given.
7470if test "${with_devkit+set}" = set; then :
7471  withval=$with_devkit;
7472    if test "x$with_sys_root" != x; then
7473      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7474    fi
7475
7476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7477
7478  # Input might be given as Windows format, start by converting to
7479  # unix format.
7480  path="$with_devkit"
7481  new_path=`$CYGPATH -u "$path"`
7482
7483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7486  # "foo.exe" is OK but "foo" is an error.
7487  #
7488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7489  # It is also a way to make sure we got the proper file name for the real test later on.
7490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7491  if test "x$test_shortpath" = x; then
7492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7493$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7494    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7495  fi
7496
7497  # Call helper function which possibly converts this using DOS-style short mode.
7498  # If so, the updated path is stored in $new_path.
7499
7500  input_path="$new_path"
7501  # Check if we need to convert this using DOS-style short mode. If the path
7502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7503  # take no chances and rewrite it.
7504  # Note: m4 eats our [], so we need to use [ and ] instead.
7505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7506  if test "x$has_forbidden_chars" != x; then
7507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7511      # Going to short mode and back again did indeed matter. Since short mode is
7512      # case insensitive, let's make it lowercase to improve readability.
7513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7514      # Now convert it back to Unix-stile (cygpath)
7515      input_path=`$CYGPATH -u "$shortmode_path"`
7516      new_path="$input_path"
7517    fi
7518  fi
7519
7520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7521  if test "x$test_cygdrive_prefix" = x; then
7522    # As a simple fix, exclude /usr/bin since it's not a real path.
7523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7525      # a path prefixed by /cygdrive for fixpath to work.
7526      new_path="$CYGWIN_ROOT_PATH$input_path"
7527    fi
7528  fi
7529
7530
7531  if test "x$path" != "x$new_path"; then
7532    with_devkit="$new_path"
7533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7534$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7535  fi
7536
7537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7538
7539  path="$with_devkit"
7540  has_colon=`$ECHO $path | $GREP ^.:`
7541  new_path="$path"
7542  if test "x$has_colon" = x; then
7543    # Not in mixed or Windows style, start by that.
7544    new_path=`cmd //c echo $path`
7545  fi
7546
7547
7548  input_path="$new_path"
7549  # Check if we need to convert this using DOS-style short mode. If the path
7550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7551  # take no chances and rewrite it.
7552  # Note: m4 eats our [], so we need to use [ and ] instead.
7553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7554  if test "x$has_forbidden_chars" != x; then
7555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7557  fi
7558
7559
7560  windows_path="$new_path"
7561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7562    unix_path=`$CYGPATH -u "$windows_path"`
7563    new_path="$unix_path"
7564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7566    new_path="$unix_path"
7567  fi
7568
7569  if test "x$path" != "x$new_path"; then
7570    with_devkit="$new_path"
7571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7572$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7573  fi
7574
7575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7577
7578  else
7579    # We're on a posix platform. Hooray! :)
7580    path="$with_devkit"
7581    has_space=`$ECHO "$path" | $GREP " "`
7582    if test "x$has_space" != x; then
7583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7584$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7586    fi
7587
7588    # Use eval to expand a potential ~
7589    eval path="$path"
7590    if test ! -f "$path" && test ! -d "$path"; then
7591      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7592    fi
7593
7594    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7595  fi
7596
7597
7598  if test "x$TOOLS_DIR" = x; then
7599    TOOLS_DIR="$with_devkit/bin"
7600  else
7601    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7602  fi
7603
7604    if test -d "$with_devkit/$host_alias/libc"; then
7605      SYS_ROOT=$with_devkit/$host_alias/libc
7606    elif test -d "$with_devkit/$host/sys-root"; then
7607      SYS_ROOT=$with_devkit/$host/sys-root
7608    fi
7609
7610fi
7611
7612
7613
7614# Setup default logging of stdout and stderr to build.log in the output root.
7615BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7616BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7617BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7618
7619
7620
7621
7622
7623# Check if it's a pure open build or if custom sources are to be used.
7624
7625  # Check whether --enable-openjdk-only was given.
7626if test "${enable_openjdk_only+set}" = set; then :
7627  enableval=$enable_openjdk_only;
7628else
7629  enable_openjdk_only="no"
7630fi
7631
7632
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7634$as_echo_n "checking for presence of closed sources... " >&6; }
7635  if test -d "$SRC_ROOT/jdk/src/closed"; then
7636    CLOSED_SOURCE_PRESENT=yes
7637  else
7638    CLOSED_SOURCE_PRESENT=no
7639  fi
7640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7641$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7642
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7644$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7645  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7647$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7648
7649  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7650    OPENJDK=true
7651    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7652      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7653$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7654    fi
7655  else
7656    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7657      OPENJDK=true
7658    else
7659      OPENJDK=false
7660    fi
7661  fi
7662
7663  if test "x$OPENJDK" = "xtrue"; then
7664    SET_OPENJDK="OPENJDK=true"
7665  fi
7666
7667
7668
7669
7670# These are needed to be able to create a configuration name (and thus the output directory)
7671
7672###############################################################################
7673#
7674# Check which variant of the JDK that we want to build.
7675# Currently we have:
7676#    normal:   standard edition
7677# but the custom make system may add other variants
7678#
7679# Effectively the JDK variant gives a name to a specific set of
7680# modules to compile into the JDK. In the future, these modules
7681# might even be Jigsaw modules.
7682#
7683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7684$as_echo_n "checking which variant of the JDK to build... " >&6; }
7685
7686# Check whether --with-jdk-variant was given.
7687if test "${with_jdk_variant+set}" = set; then :
7688  withval=$with_jdk_variant;
7689fi
7690
7691
7692if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7693    JDK_VARIANT="normal"
7694else
7695    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7696fi
7697
7698
7699
7700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7701$as_echo "$JDK_VARIANT" >&6; }
7702
7703
7704
7705###############################################################################
7706#
7707# Check which variants of the JVM that we want to build.
7708# Currently we have:
7709#    server: normal interpreter and a tiered C1/C2 compiler
7710#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7711#    minimal1: reduced form of client with optional VM services and features stripped out
7712#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7713#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7714#    zero: no machine code interpreter, no compiler
7715#    zeroshark: zero interpreter and shark/llvm compiler backend
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7717$as_echo_n "checking which variants of the JVM to build... " >&6; }
7718
7719# Check whether --with-jvm-variants was given.
7720if test "${with_jvm_variants+set}" = set; then :
7721  withval=$with_jvm_variants;
7722fi
7723
7724
7725if test "x$with_jvm_variants" = x; then
7726     with_jvm_variants="server"
7727fi
7728
7729JVM_VARIANTS=",$with_jvm_variants,"
7730TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7731
7732if test "x$TEST_VARIANTS" != "x,"; then
7733   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7734fi
7735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7736$as_echo "$with_jvm_variants" >&6; }
7737
7738JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7739JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7740JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7741JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7742JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7743JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7744
7745if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7746    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7747        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7748    fi
7749fi
7750if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7751    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7752        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7753    fi
7754fi
7755if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7756    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7757        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7758    fi
7759fi
7760
7761# Replace the commas with AND for use in the build directory name.
7762ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7763COUNT_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/'`
7764if test "x$COUNT_VARIANTS" != "x,1"; then
7765    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7766else
7767    BUILDING_MULTIPLE_JVM_VARIANTS=no
7768fi
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778INCLUDE_SA=true
7779if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7780    INCLUDE_SA=false
7781fi
7782if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7783    INCLUDE_SA=false
7784fi
7785
7786
7787if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7788   MACOSX_UNIVERSAL="true"
7789fi
7790
7791
7792
7793
7794
7795###############################################################################
7796#
7797# Set the debug level
7798#    release: no debug information, all optimizations, no asserts.
7799#    fastdebug: debug information (-g), all optimizations, all asserts
7800#    slowdebug: debug information (-g), no optimizations, all asserts
7801#
7802DEBUG_LEVEL="release"
7803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7804$as_echo_n "checking which debug level to use... " >&6; }
7805# Check whether --enable-debug was given.
7806if test "${enable_debug+set}" = set; then :
7807  enableval=$enable_debug;
7808        ENABLE_DEBUG="${enableval}"
7809        DEBUG_LEVEL="fastdebug"
7810
7811else
7812  ENABLE_DEBUG="no"
7813fi
7814
7815
7816
7817# Check whether --with-debug-level was given.
7818if test "${with_debug_level+set}" = set; then :
7819  withval=$with_debug_level;
7820        DEBUG_LEVEL="${withval}"
7821        if test "x$ENABLE_DEBUG" = xyes; then
7822			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7823        fi
7824
7825fi
7826
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7828$as_echo "$DEBUG_LEVEL" >&6; }
7829
7830if test "x$DEBUG_LEVEL" != xrelease && \
7831   test "x$DEBUG_LEVEL" != xfastdebug && \
7832   test "x$DEBUG_LEVEL" != xslowdebug; then
7833   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7834fi
7835
7836
7837###############################################################################
7838#
7839# Setup legacy vars/targets and new vars to deal with different debug levels.
7840#
7841
7842case $DEBUG_LEVEL in
7843      release )
7844          VARIANT="OPT"
7845          FASTDEBUG="false"
7846          DEBUG_CLASSFILES="false"
7847          BUILD_VARIANT_RELEASE=""
7848          HOTSPOT_DEBUG_LEVEL="product"
7849          HOTSPOT_EXPORT="product"
7850           ;;
7851      fastdebug )
7852          VARIANT="DBG"
7853          FASTDEBUG="true"
7854          DEBUG_CLASSFILES="true"
7855          BUILD_VARIANT_RELEASE="-fastdebug"
7856          HOTSPOT_DEBUG_LEVEL="fastdebug"
7857          HOTSPOT_EXPORT="fastdebug"
7858           ;;
7859      slowdebug )
7860          VARIANT="DBG"
7861          FASTDEBUG="false"
7862          DEBUG_CLASSFILES="true"
7863          BUILD_VARIANT_RELEASE="-debug"
7864          HOTSPOT_DEBUG_LEVEL="jvmg"
7865          HOTSPOT_EXPORT="debug"
7866           ;;
7867esac
7868
7869#####
7870# Generate the legacy makefile targets for hotspot.
7871# The hotspot api for selecting the build artifacts, really, needs to be improved.
7872# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7873# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7874# But until then ...
7875HOTSPOT_TARGET=""
7876
7877if test "x$JVM_VARIANT_SERVER" = xtrue; then
7878    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7879fi
7880
7881if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7882    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7883fi
7884
7885if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7886    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7887fi
7888
7889if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7890    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7891fi
7892
7893if test "x$JVM_VARIANT_ZERO" = xtrue; then
7894    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7895fi
7896
7897if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7898    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7899fi
7900
7901HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7902
7903# On Macosx universal binaries are produced, but they only contain
7904# 64 bit intel. This invalidates control of which jvms are built
7905# from configure, but only server is valid anyway. Fix this
7906# when hotspot makefiles are rewritten.
7907if test "x$MACOSX_UNIVERSAL" = xtrue; then
7908    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7909fi
7910
7911#####
7912
7913
7914
7915
7916
7917
7918
7919
7920# With basic setup done, call the custom early hook.
7921
7922
7923# To properly create a configuration name, we need to have the OpenJDK target
7924# and options (variants and debug level) parsed.
7925
7926
7927
7928# Check whether --with-conf-name was given.
7929if test "${with_conf_name+set}" = set; then :
7930  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7931fi
7932
7933
7934# Test from where we are running configure, in or outside of src root.
7935if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7936        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7937        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7938    # We are running configure from the src root.
7939    # Create a default ./build/target-variant-debuglevel output root.
7940    if test "x${CONF_NAME}" = x; then
7941        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7942    fi
7943    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7944    $MKDIR -p "$OUTPUT_ROOT"
7945    if test ! -d "$OUTPUT_ROOT"; then
7946        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7947    fi
7948else
7949    # We are running configure from outside of the src dir.
7950    # Then use the current directory as output dir!
7951    # If configuration is situated in normal build directory, just use the build
7952    # directory name as configuration name, otherwise use the complete path.
7953    if test "x${CONF_NAME}" = x; then
7954        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7955    fi
7956    OUTPUT_ROOT="$CURDIR"
7957
7958    # WARNING: This might be a bad thing to do. You need to be sure you want to
7959    # have a configuration in this directory. Do some sanity checks!
7960
7961    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7962      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7963      # other files
7964      files_present=`$LS $OUTPUT_ROOT`
7965      # Configure has already touched config.log and confdefs.h in the current dir when this check
7966      # is performed.
7967      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7968                                             | $TR -d '\n'`
7969      if test "x$filtered_files" != x; then
7970        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7971$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7972        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7973$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7974        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7975$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7976        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7977$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7978        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7979$as_echo "$as_me: seriously mess up just about everything." >&6;}
7980        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7981$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7983$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7984        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7985      fi
7986    fi
7987fi
7988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7989$as_echo_n "checking what configuration name to use... " >&6; }
7990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7991$as_echo "$CONF_NAME" >&6; }
7992
7993
7994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7995
7996  # Input might be given as Windows format, start by converting to
7997  # unix format.
7998  path="$OUTPUT_ROOT"
7999  new_path=`$CYGPATH -u "$path"`
8000
8001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8004  # "foo.exe" is OK but "foo" is an error.
8005  #
8006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8007  # It is also a way to make sure we got the proper file name for the real test later on.
8008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8009  if test "x$test_shortpath" = x; then
8010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8011$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8012    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8013  fi
8014
8015  # Call helper function which possibly converts this using DOS-style short mode.
8016  # If so, the updated path is stored in $new_path.
8017
8018  input_path="$new_path"
8019  # Check if we need to convert this using DOS-style short mode. If the path
8020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8021  # take no chances and rewrite it.
8022  # Note: m4 eats our [], so we need to use [ and ] instead.
8023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8024  if test "x$has_forbidden_chars" != x; then
8025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8029      # Going to short mode and back again did indeed matter. Since short mode is
8030      # case insensitive, let's make it lowercase to improve readability.
8031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8032      # Now convert it back to Unix-stile (cygpath)
8033      input_path=`$CYGPATH -u "$shortmode_path"`
8034      new_path="$input_path"
8035    fi
8036  fi
8037
8038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8039  if test "x$test_cygdrive_prefix" = x; then
8040    # As a simple fix, exclude /usr/bin since it's not a real path.
8041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8043      # a path prefixed by /cygdrive for fixpath to work.
8044      new_path="$CYGWIN_ROOT_PATH$input_path"
8045    fi
8046  fi
8047
8048
8049  if test "x$path" != "x$new_path"; then
8050    OUTPUT_ROOT="$new_path"
8051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8052$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8053  fi
8054
8055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8056
8057  path="$OUTPUT_ROOT"
8058  has_colon=`$ECHO $path | $GREP ^.:`
8059  new_path="$path"
8060  if test "x$has_colon" = x; then
8061    # Not in mixed or Windows style, start by that.
8062    new_path=`cmd //c echo $path`
8063  fi
8064
8065
8066  input_path="$new_path"
8067  # Check if we need to convert this using DOS-style short mode. If the path
8068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8069  # take no chances and rewrite it.
8070  # Note: m4 eats our [], so we need to use [ and ] instead.
8071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8072  if test "x$has_forbidden_chars" != x; then
8073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8075  fi
8076
8077
8078  windows_path="$new_path"
8079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8080    unix_path=`$CYGPATH -u "$windows_path"`
8081    new_path="$unix_path"
8082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8084    new_path="$unix_path"
8085  fi
8086
8087  if test "x$path" != "x$new_path"; then
8088    OUTPUT_ROOT="$new_path"
8089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8090$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8091  fi
8092
8093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8095
8096  else
8097    # We're on a posix platform. Hooray! :)
8098    path="$OUTPUT_ROOT"
8099    has_space=`$ECHO "$path" | $GREP " "`
8100    if test "x$has_space" != x; then
8101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8102$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8103      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8104    fi
8105
8106    # Use eval to expand a potential ~
8107    eval path="$path"
8108    if test ! -f "$path" && test ! -d "$path"; then
8109      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8110    fi
8111
8112    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8113  fi
8114
8115
8116SPEC=$OUTPUT_ROOT/spec.gmk
8117
8118CONF_NAME=$CONF_NAME
8119
8120OUTPUT_ROOT=$OUTPUT_ROOT
8121
8122
8123# Most of the probed defines are put into config.h
8124ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8125
8126# The spec.gmk file contains all variables for the make system.
8127ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8128
8129# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8130ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8131
8132# The bootcycle-spec.gmk file contains support for boot cycle builds.
8133ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8134
8135# The compare.sh is used to compare the build output to other builds.
8136ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8137
8138# Spec.sh is currently used by compare-objects.sh
8139ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8140
8141# The generated Makefile knows where the spec.gmk is and where the source is.
8142# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8143# which will look for generated configurations
8144ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8145
8146
8147# Save the arguments given to us
8148echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8149
8150
8151# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8152
8153    for ac_prog in apt-get yum port pkgutil pkgadd
8154do
8155  # Extract the first word of "$ac_prog", so it can be a program name with args.
8156set dummy $ac_prog; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  if test -n "$PKGHANDLER"; then
8163  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8164else
8165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8166for as_dir in $PATH
8167do
8168  IFS=$as_save_IFS
8169  test -z "$as_dir" && as_dir=.
8170    for ac_exec_ext in '' $ac_executable_extensions; do
8171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8172    ac_cv_prog_PKGHANDLER="$ac_prog"
8173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8174    break 2
8175  fi
8176done
8177  done
8178IFS=$as_save_IFS
8179
8180fi
8181fi
8182PKGHANDLER=$ac_cv_prog_PKGHANDLER
8183if test -n "$PKGHANDLER"; then
8184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8185$as_echo "$PKGHANDLER" >&6; }
8186else
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192  test -n "$PKGHANDLER" && break
8193done
8194
8195
8196
8197# Setup tools that requires more complex handling, or that is not needed by the configure script.
8198
8199
8200  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8201  if test "x$MAKE" != x; then
8202    # User has supplied a make, test it.
8203    if test ! -f "$MAKE"; then
8204      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8205    fi
8206
8207  MAKE_CANDIDATE=""$MAKE""
8208  DESCRIPTION="user supplied MAKE=$MAKE"
8209  if test "x$MAKE_CANDIDATE" != x; then
8210    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8211$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8212    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8213    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8214    if test "x$IS_GNU_MAKE" = x; then
8215      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8216$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8217    else
8218      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8219      if test "x$IS_MODERN_MAKE" = x; then
8220        { $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
8221$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;}
8222      else
8223        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8224          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8225            MAKE_EXPECTED_ENV='cygwin'
8226          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8227            MAKE_EXPECTED_ENV='msys'
8228          else
8229            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8230          fi
8231          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8232          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8233        else
8234          # Not relevant for non-Windows
8235          IS_MAKE_CORRECT_ENV=true
8236        fi
8237        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8238          { $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
8239$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;}
8240        else
8241          FOUND_MAKE=$MAKE_CANDIDATE
8242
8243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8244
8245  # First separate the path from the arguments. This will split at the first
8246  # space.
8247  complete="$FOUND_MAKE"
8248  path="${complete%% *}"
8249  tmp="$complete EOL"
8250  arguments="${tmp#* }"
8251
8252  # Input might be given as Windows format, start by converting to
8253  # unix format.
8254  new_path=`$CYGPATH -u "$path"`
8255
8256  # Now try to locate executable using which
8257  new_path=`$WHICH "$new_path" 2> /dev/null`
8258  # bat and cmd files are not always considered executable in cygwin causing which
8259  # to not find them
8260  if test "x$new_path" = x \
8261           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8262           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8263    new_path=`$CYGPATH -u "$path"`
8264  fi
8265  if test "x$new_path" = x; then
8266    # Oops. Which didn't find the executable.
8267    # The splitting of arguments from the executable at a space might have been incorrect,
8268    # since paths with space are more likely in Windows. Give it another try with the whole
8269    # argument.
8270    path="$complete"
8271    arguments="EOL"
8272    new_path=`$CYGPATH -u "$path"`
8273    new_path=`$WHICH "$new_path" 2> /dev/null`
8274    # bat and cmd files are not always considered executable in cygwin causing which
8275    # to not find them
8276    if test "x$new_path" = x \
8277             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8278             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8279      new_path=`$CYGPATH -u "$path"`
8280    fi
8281    if test "x$new_path" = x; then
8282      # It's still not found. Now this is an unrecoverable error.
8283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8284$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8285      has_space=`$ECHO "$complete" | $GREP " "`
8286      if test "x$has_space" != x; then
8287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8289      fi
8290      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8291    fi
8292  fi
8293
8294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8297  # "foo.exe" is OK but "foo" is an error.
8298  #
8299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8300  # It is also a way to make sure we got the proper file name for the real test later on.
8301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8302  if test "x$test_shortpath" = x; then
8303    # Short path failed, file does not exist as specified.
8304    # Try adding .exe or .cmd
8305    if test -f "${new_path}.exe"; then
8306       input_to_shortpath="${new_path}.exe"
8307    elif test -f "${new_path}.cmd"; then
8308       input_to_shortpath="${new_path}.cmd"
8309    else
8310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8311$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8314      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8315    fi
8316  else
8317    input_to_shortpath="$new_path"
8318  fi
8319
8320  # Call helper function which possibly converts this using DOS-style short mode.
8321  # If so, the updated path is stored in $new_path.
8322  new_path="$input_to_shortpath"
8323
8324  input_path="$input_to_shortpath"
8325  # Check if we need to convert this using DOS-style short mode. If the path
8326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8327  # take no chances and rewrite it.
8328  # Note: m4 eats our [], so we need to use [ and ] instead.
8329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8330  if test "x$has_forbidden_chars" != x; then
8331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8335      # Going to short mode and back again did indeed matter. Since short mode is
8336      # case insensitive, let's make it lowercase to improve readability.
8337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8338      # Now convert it back to Unix-stile (cygpath)
8339      input_path=`$CYGPATH -u "$shortmode_path"`
8340      new_path="$input_path"
8341    fi
8342  fi
8343
8344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8345  if test "x$test_cygdrive_prefix" = x; then
8346    # As a simple fix, exclude /usr/bin since it's not a real path.
8347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8349      # a path prefixed by /cygdrive for fixpath to work.
8350      new_path="$CYGWIN_ROOT_PATH$input_path"
8351    fi
8352  fi
8353
8354  # remove trailing .exe if any
8355  new_path="${new_path/%.exe/}"
8356
8357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8358
8359  # First separate the path from the arguments. This will split at the first
8360  # space.
8361  complete="$FOUND_MAKE"
8362  path="${complete%% *}"
8363  tmp="$complete EOL"
8364  arguments="${tmp#* }"
8365
8366  # Input might be given as Windows format, start by converting to
8367  # unix format.
8368  new_path="$path"
8369
8370  windows_path="$new_path"
8371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8372    unix_path=`$CYGPATH -u "$windows_path"`
8373    new_path="$unix_path"
8374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8376    new_path="$unix_path"
8377  fi
8378
8379
8380  # Now try to locate executable using which
8381  new_path=`$WHICH "$new_path" 2> /dev/null`
8382
8383  if test "x$new_path" = x; then
8384    # Oops. Which didn't find the executable.
8385    # The splitting of arguments from the executable at a space might have been incorrect,
8386    # since paths with space are more likely in Windows. Give it another try with the whole
8387    # argument.
8388    path="$complete"
8389    arguments="EOL"
8390    new_path="$path"
8391
8392  windows_path="$new_path"
8393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8394    unix_path=`$CYGPATH -u "$windows_path"`
8395    new_path="$unix_path"
8396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8398    new_path="$unix_path"
8399  fi
8400
8401
8402    new_path=`$WHICH "$new_path" 2> /dev/null`
8403
8404    if test "x$new_path" = x; then
8405      # It's still not found. Now this is an unrecoverable error.
8406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8407$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8408      has_space=`$ECHO "$complete" | $GREP " "`
8409      if test "x$has_space" != x; then
8410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8412      fi
8413      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8414    fi
8415  fi
8416
8417  # Now new_path has a complete unix path to the binary
8418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8419    # Keep paths in /bin as-is, but remove trailing .exe if any
8420    new_path="${new_path/%.exe/}"
8421    # Do not save /bin paths to all_fixpath_prefixes!
8422  else
8423    # Not in mixed or Windows style, start by that.
8424    new_path=`cmd //c echo $new_path`
8425
8426  input_path="$new_path"
8427  # Check if we need to convert this using DOS-style short mode. If the path
8428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8429  # take no chances and rewrite it.
8430  # Note: m4 eats our [], so we need to use [ and ] instead.
8431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8432  if test "x$has_forbidden_chars" != x; then
8433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8435  fi
8436
8437    # Output is in $new_path
8438
8439  windows_path="$new_path"
8440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8441    unix_path=`$CYGPATH -u "$windows_path"`
8442    new_path="$unix_path"
8443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8445    new_path="$unix_path"
8446  fi
8447
8448    # remove trailing .exe if any
8449    new_path="${new_path/%.exe/}"
8450
8451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8453  fi
8454
8455  else
8456    # We're on a posix platform. Hooray! :)
8457    # First separate the path from the arguments. This will split at the first
8458    # space.
8459    complete="$FOUND_MAKE"
8460    path="${complete%% *}"
8461    tmp="$complete EOL"
8462    arguments="${tmp#* }"
8463
8464    # Cannot rely on the command "which" here since it doesn't always work.
8465    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8466    if test -z "$is_absolute_path"; then
8467      # Path to executable is not absolute. Find it.
8468      IFS_save="$IFS"
8469      IFS=:
8470      for p in $PATH; do
8471        if test -f "$p/$path" && test -x "$p/$path"; then
8472          new_path="$p/$path"
8473          break
8474        fi
8475      done
8476      IFS="$IFS_save"
8477    else
8478      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8479$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8480      new_path="$path"
8481    fi
8482
8483    if test "x$new_path" = x; then
8484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8485$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8486        has_space=`$ECHO "$complete" | $GREP " "`
8487        if test "x$has_space" != x; then
8488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8490        fi
8491        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8492      fi
8493  fi
8494
8495      # Now join together the path and the arguments once again
8496      if test "x$arguments" != xEOL; then
8497        new_complete="$new_path ${arguments% *}"
8498      else
8499        new_complete="$new_path"
8500      fi
8501
8502  if test "x$complete" != "x$new_complete"; then
8503      FOUND_MAKE="$new_complete"
8504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8505$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8506    fi
8507
8508        fi
8509      fi
8510    fi
8511  fi
8512
8513    if test "x$FOUND_MAKE" = x; then
8514      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8515    fi
8516  else
8517    # Try our hardest to locate a correct version of GNU make
8518    for ac_prog in gmake
8519do
8520  # Extract the first word of "$ac_prog", so it can be a program name with args.
8521set dummy $ac_prog; ac_word=$2
8522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8523$as_echo_n "checking for $ac_word... " >&6; }
8524if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8525  $as_echo_n "(cached) " >&6
8526else
8527  case $CHECK_GMAKE in
8528  [\\/]* | ?:[\\/]*)
8529  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8530  ;;
8531  *)
8532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8533for as_dir in $PATH
8534do
8535  IFS=$as_save_IFS
8536  test -z "$as_dir" && as_dir=.
8537    for ac_exec_ext in '' $ac_executable_extensions; do
8538  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8539    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8541    break 2
8542  fi
8543done
8544  done
8545IFS=$as_save_IFS
8546
8547  ;;
8548esac
8549fi
8550CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8551if test -n "$CHECK_GMAKE"; then
8552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8553$as_echo "$CHECK_GMAKE" >&6; }
8554else
8555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8556$as_echo "no" >&6; }
8557fi
8558
8559
8560  test -n "$CHECK_GMAKE" && break
8561done
8562
8563
8564  MAKE_CANDIDATE=""$CHECK_GMAKE""
8565  DESCRIPTION="gmake in PATH"
8566  if test "x$MAKE_CANDIDATE" != x; then
8567    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8568$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8569    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8570    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8571    if test "x$IS_GNU_MAKE" = x; then
8572      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8573$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8574    else
8575      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8576      if test "x$IS_MODERN_MAKE" = x; then
8577        { $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
8578$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;}
8579      else
8580        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8581          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8582            MAKE_EXPECTED_ENV='cygwin'
8583          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8584            MAKE_EXPECTED_ENV='msys'
8585          else
8586            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8587          fi
8588          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8589          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8590        else
8591          # Not relevant for non-Windows
8592          IS_MAKE_CORRECT_ENV=true
8593        fi
8594        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8595          { $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
8596$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;}
8597        else
8598          FOUND_MAKE=$MAKE_CANDIDATE
8599
8600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8601
8602  # First separate the path from the arguments. This will split at the first
8603  # space.
8604  complete="$FOUND_MAKE"
8605  path="${complete%% *}"
8606  tmp="$complete EOL"
8607  arguments="${tmp#* }"
8608
8609  # Input might be given as Windows format, start by converting to
8610  # unix format.
8611  new_path=`$CYGPATH -u "$path"`
8612
8613  # Now try to locate executable using which
8614  new_path=`$WHICH "$new_path" 2> /dev/null`
8615  # bat and cmd files are not always considered executable in cygwin causing which
8616  # to not find them
8617  if test "x$new_path" = x \
8618           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8619           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8620    new_path=`$CYGPATH -u "$path"`
8621  fi
8622  if test "x$new_path" = x; then
8623    # Oops. Which didn't find the executable.
8624    # The splitting of arguments from the executable at a space might have been incorrect,
8625    # since paths with space are more likely in Windows. Give it another try with the whole
8626    # argument.
8627    path="$complete"
8628    arguments="EOL"
8629    new_path=`$CYGPATH -u "$path"`
8630    new_path=`$WHICH "$new_path" 2> /dev/null`
8631    # bat and cmd files are not always considered executable in cygwin causing which
8632    # to not find them
8633    if test "x$new_path" = x \
8634             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8635             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8636      new_path=`$CYGPATH -u "$path"`
8637    fi
8638    if test "x$new_path" = x; then
8639      # It's still not found. Now this is an unrecoverable error.
8640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8641$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8642      has_space=`$ECHO "$complete" | $GREP " "`
8643      if test "x$has_space" != x; then
8644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8646      fi
8647      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8648    fi
8649  fi
8650
8651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8654  # "foo.exe" is OK but "foo" is an error.
8655  #
8656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8657  # It is also a way to make sure we got the proper file name for the real test later on.
8658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8659  if test "x$test_shortpath" = x; then
8660    # Short path failed, file does not exist as specified.
8661    # Try adding .exe or .cmd
8662    if test -f "${new_path}.exe"; then
8663       input_to_shortpath="${new_path}.exe"
8664    elif test -f "${new_path}.cmd"; then
8665       input_to_shortpath="${new_path}.cmd"
8666    else
8667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8668$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8669      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8670$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8671      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8672    fi
8673  else
8674    input_to_shortpath="$new_path"
8675  fi
8676
8677  # Call helper function which possibly converts this using DOS-style short mode.
8678  # If so, the updated path is stored in $new_path.
8679  new_path="$input_to_shortpath"
8680
8681  input_path="$input_to_shortpath"
8682  # Check if we need to convert this using DOS-style short mode. If the path
8683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8684  # take no chances and rewrite it.
8685  # Note: m4 eats our [], so we need to use [ and ] instead.
8686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8687  if test "x$has_forbidden_chars" != x; then
8688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8692      # Going to short mode and back again did indeed matter. Since short mode is
8693      # case insensitive, let's make it lowercase to improve readability.
8694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8695      # Now convert it back to Unix-stile (cygpath)
8696      input_path=`$CYGPATH -u "$shortmode_path"`
8697      new_path="$input_path"
8698    fi
8699  fi
8700
8701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8702  if test "x$test_cygdrive_prefix" = x; then
8703    # As a simple fix, exclude /usr/bin since it's not a real path.
8704    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8706      # a path prefixed by /cygdrive for fixpath to work.
8707      new_path="$CYGWIN_ROOT_PATH$input_path"
8708    fi
8709  fi
8710
8711  # remove trailing .exe if any
8712  new_path="${new_path/%.exe/}"
8713
8714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8715
8716  # First separate the path from the arguments. This will split at the first
8717  # space.
8718  complete="$FOUND_MAKE"
8719  path="${complete%% *}"
8720  tmp="$complete EOL"
8721  arguments="${tmp#* }"
8722
8723  # Input might be given as Windows format, start by converting to
8724  # unix format.
8725  new_path="$path"
8726
8727  windows_path="$new_path"
8728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8729    unix_path=`$CYGPATH -u "$windows_path"`
8730    new_path="$unix_path"
8731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8733    new_path="$unix_path"
8734  fi
8735
8736
8737  # Now try to locate executable using which
8738  new_path=`$WHICH "$new_path" 2> /dev/null`
8739
8740  if test "x$new_path" = x; then
8741    # Oops. Which didn't find the executable.
8742    # The splitting of arguments from the executable at a space might have been incorrect,
8743    # since paths with space are more likely in Windows. Give it another try with the whole
8744    # argument.
8745    path="$complete"
8746    arguments="EOL"
8747    new_path="$path"
8748
8749  windows_path="$new_path"
8750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8751    unix_path=`$CYGPATH -u "$windows_path"`
8752    new_path="$unix_path"
8753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8755    new_path="$unix_path"
8756  fi
8757
8758
8759    new_path=`$WHICH "$new_path" 2> /dev/null`
8760
8761    if test "x$new_path" = x; then
8762      # It's still not found. Now this is an unrecoverable error.
8763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8764$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8765      has_space=`$ECHO "$complete" | $GREP " "`
8766      if test "x$has_space" != x; then
8767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8769      fi
8770      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8771    fi
8772  fi
8773
8774  # Now new_path has a complete unix path to the binary
8775  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8776    # Keep paths in /bin as-is, but remove trailing .exe if any
8777    new_path="${new_path/%.exe/}"
8778    # Do not save /bin paths to all_fixpath_prefixes!
8779  else
8780    # Not in mixed or Windows style, start by that.
8781    new_path=`cmd //c echo $new_path`
8782
8783  input_path="$new_path"
8784  # Check if we need to convert this using DOS-style short mode. If the path
8785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8786  # take no chances and rewrite it.
8787  # Note: m4 eats our [], so we need to use [ and ] instead.
8788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8789  if test "x$has_forbidden_chars" != x; then
8790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8792  fi
8793
8794    # Output is in $new_path
8795
8796  windows_path="$new_path"
8797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8798    unix_path=`$CYGPATH -u "$windows_path"`
8799    new_path="$unix_path"
8800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8802    new_path="$unix_path"
8803  fi
8804
8805    # remove trailing .exe if any
8806    new_path="${new_path/%.exe/}"
8807
8808    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8809    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8810  fi
8811
8812  else
8813    # We're on a posix platform. Hooray! :)
8814    # First separate the path from the arguments. This will split at the first
8815    # space.
8816    complete="$FOUND_MAKE"
8817    path="${complete%% *}"
8818    tmp="$complete EOL"
8819    arguments="${tmp#* }"
8820
8821    # Cannot rely on the command "which" here since it doesn't always work.
8822    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8823    if test -z "$is_absolute_path"; then
8824      # Path to executable is not absolute. Find it.
8825      IFS_save="$IFS"
8826      IFS=:
8827      for p in $PATH; do
8828        if test -f "$p/$path" && test -x "$p/$path"; then
8829          new_path="$p/$path"
8830          break
8831        fi
8832      done
8833      IFS="$IFS_save"
8834    else
8835      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8836$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8837      new_path="$path"
8838    fi
8839
8840    if test "x$new_path" = x; then
8841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8843        has_space=`$ECHO "$complete" | $GREP " "`
8844        if test "x$has_space" != x; then
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8847        fi
8848        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8849      fi
8850  fi
8851
8852      # Now join together the path and the arguments once again
8853      if test "x$arguments" != xEOL; then
8854        new_complete="$new_path ${arguments% *}"
8855      else
8856        new_complete="$new_path"
8857      fi
8858
8859  if test "x$complete" != "x$new_complete"; then
8860      FOUND_MAKE="$new_complete"
8861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8862$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8863    fi
8864
8865        fi
8866      fi
8867    fi
8868  fi
8869
8870
8871    if test "x$FOUND_MAKE" = x; then
8872      for ac_prog in make
8873do
8874  # Extract the first word of "$ac_prog", so it can be a program name with args.
8875set dummy $ac_prog; ac_word=$2
8876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8877$as_echo_n "checking for $ac_word... " >&6; }
8878if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8879  $as_echo_n "(cached) " >&6
8880else
8881  case $CHECK_MAKE in
8882  [\\/]* | ?:[\\/]*)
8883  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8884  ;;
8885  *)
8886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8887for as_dir in $PATH
8888do
8889  IFS=$as_save_IFS
8890  test -z "$as_dir" && as_dir=.
8891    for ac_exec_ext in '' $ac_executable_extensions; do
8892  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8893    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8895    break 2
8896  fi
8897done
8898  done
8899IFS=$as_save_IFS
8900
8901  ;;
8902esac
8903fi
8904CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8905if test -n "$CHECK_MAKE"; then
8906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8907$as_echo "$CHECK_MAKE" >&6; }
8908else
8909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8910$as_echo "no" >&6; }
8911fi
8912
8913
8914  test -n "$CHECK_MAKE" && break
8915done
8916
8917
8918  MAKE_CANDIDATE=""$CHECK_MAKE""
8919  DESCRIPTION="make in PATH"
8920  if test "x$MAKE_CANDIDATE" != x; then
8921    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8922$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8923    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8924    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8925    if test "x$IS_GNU_MAKE" = x; then
8926      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8927$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8928    else
8929      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8930      if test "x$IS_MODERN_MAKE" = x; then
8931        { $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
8932$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;}
8933      else
8934        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8935          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8936            MAKE_EXPECTED_ENV='cygwin'
8937          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8938            MAKE_EXPECTED_ENV='msys'
8939          else
8940            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8941          fi
8942          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8943          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8944        else
8945          # Not relevant for non-Windows
8946          IS_MAKE_CORRECT_ENV=true
8947        fi
8948        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8949          { $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
8950$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;}
8951        else
8952          FOUND_MAKE=$MAKE_CANDIDATE
8953
8954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8955
8956  # First separate the path from the arguments. This will split at the first
8957  # space.
8958  complete="$FOUND_MAKE"
8959  path="${complete%% *}"
8960  tmp="$complete EOL"
8961  arguments="${tmp#* }"
8962
8963  # Input might be given as Windows format, start by converting to
8964  # unix format.
8965  new_path=`$CYGPATH -u "$path"`
8966
8967  # Now try to locate executable using which
8968  new_path=`$WHICH "$new_path" 2> /dev/null`
8969  # bat and cmd files are not always considered executable in cygwin causing which
8970  # to not find them
8971  if test "x$new_path" = x \
8972           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8973           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8974    new_path=`$CYGPATH -u "$path"`
8975  fi
8976  if test "x$new_path" = x; then
8977    # Oops. Which didn't find the executable.
8978    # The splitting of arguments from the executable at a space might have been incorrect,
8979    # since paths with space are more likely in Windows. Give it another try with the whole
8980    # argument.
8981    path="$complete"
8982    arguments="EOL"
8983    new_path=`$CYGPATH -u "$path"`
8984    new_path=`$WHICH "$new_path" 2> /dev/null`
8985    # bat and cmd files are not always considered executable in cygwin causing which
8986    # to not find them
8987    if test "x$new_path" = x \
8988             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8989             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8990      new_path=`$CYGPATH -u "$path"`
8991    fi
8992    if test "x$new_path" = x; then
8993      # It's still not found. Now this is an unrecoverable error.
8994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8995$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8996      has_space=`$ECHO "$complete" | $GREP " "`
8997      if test "x$has_space" != x; then
8998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9000      fi
9001      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9002    fi
9003  fi
9004
9005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9008  # "foo.exe" is OK but "foo" is an error.
9009  #
9010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9011  # It is also a way to make sure we got the proper file name for the real test later on.
9012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9013  if test "x$test_shortpath" = x; then
9014    # Short path failed, file does not exist as specified.
9015    # Try adding .exe or .cmd
9016    if test -f "${new_path}.exe"; then
9017       input_to_shortpath="${new_path}.exe"
9018    elif test -f "${new_path}.cmd"; then
9019       input_to_shortpath="${new_path}.cmd"
9020    else
9021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9025      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9026    fi
9027  else
9028    input_to_shortpath="$new_path"
9029  fi
9030
9031  # Call helper function which possibly converts this using DOS-style short mode.
9032  # If so, the updated path is stored in $new_path.
9033  new_path="$input_to_shortpath"
9034
9035  input_path="$input_to_shortpath"
9036  # Check if we need to convert this using DOS-style short mode. If the path
9037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9038  # take no chances and rewrite it.
9039  # Note: m4 eats our [], so we need to use [ and ] instead.
9040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9041  if test "x$has_forbidden_chars" != x; then
9042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9046      # Going to short mode and back again did indeed matter. Since short mode is
9047      # case insensitive, let's make it lowercase to improve readability.
9048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9049      # Now convert it back to Unix-stile (cygpath)
9050      input_path=`$CYGPATH -u "$shortmode_path"`
9051      new_path="$input_path"
9052    fi
9053  fi
9054
9055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9056  if test "x$test_cygdrive_prefix" = x; then
9057    # As a simple fix, exclude /usr/bin since it's not a real path.
9058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9060      # a path prefixed by /cygdrive for fixpath to work.
9061      new_path="$CYGWIN_ROOT_PATH$input_path"
9062    fi
9063  fi
9064
9065  # remove trailing .exe if any
9066  new_path="${new_path/%.exe/}"
9067
9068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9069
9070  # First separate the path from the arguments. This will split at the first
9071  # space.
9072  complete="$FOUND_MAKE"
9073  path="${complete%% *}"
9074  tmp="$complete EOL"
9075  arguments="${tmp#* }"
9076
9077  # Input might be given as Windows format, start by converting to
9078  # unix format.
9079  new_path="$path"
9080
9081  windows_path="$new_path"
9082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9083    unix_path=`$CYGPATH -u "$windows_path"`
9084    new_path="$unix_path"
9085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9087    new_path="$unix_path"
9088  fi
9089
9090
9091  # Now try to locate executable using which
9092  new_path=`$WHICH "$new_path" 2> /dev/null`
9093
9094  if test "x$new_path" = x; then
9095    # Oops. Which didn't find the executable.
9096    # The splitting of arguments from the executable at a space might have been incorrect,
9097    # since paths with space are more likely in Windows. Give it another try with the whole
9098    # argument.
9099    path="$complete"
9100    arguments="EOL"
9101    new_path="$path"
9102
9103  windows_path="$new_path"
9104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9105    unix_path=`$CYGPATH -u "$windows_path"`
9106    new_path="$unix_path"
9107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9109    new_path="$unix_path"
9110  fi
9111
9112
9113    new_path=`$WHICH "$new_path" 2> /dev/null`
9114
9115    if test "x$new_path" = x; then
9116      # It's still not found. Now this is an unrecoverable error.
9117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9118$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9119      has_space=`$ECHO "$complete" | $GREP " "`
9120      if test "x$has_space" != x; then
9121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9123      fi
9124      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9125    fi
9126  fi
9127
9128  # Now new_path has a complete unix path to the binary
9129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9130    # Keep paths in /bin as-is, but remove trailing .exe if any
9131    new_path="${new_path/%.exe/}"
9132    # Do not save /bin paths to all_fixpath_prefixes!
9133  else
9134    # Not in mixed or Windows style, start by that.
9135    new_path=`cmd //c echo $new_path`
9136
9137  input_path="$new_path"
9138  # Check if we need to convert this using DOS-style short mode. If the path
9139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9140  # take no chances and rewrite it.
9141  # Note: m4 eats our [], so we need to use [ and ] instead.
9142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9143  if test "x$has_forbidden_chars" != x; then
9144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9146  fi
9147
9148    # Output is in $new_path
9149
9150  windows_path="$new_path"
9151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9152    unix_path=`$CYGPATH -u "$windows_path"`
9153    new_path="$unix_path"
9154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9156    new_path="$unix_path"
9157  fi
9158
9159    # remove trailing .exe if any
9160    new_path="${new_path/%.exe/}"
9161
9162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9164  fi
9165
9166  else
9167    # We're on a posix platform. Hooray! :)
9168    # First separate the path from the arguments. This will split at the first
9169    # space.
9170    complete="$FOUND_MAKE"
9171    path="${complete%% *}"
9172    tmp="$complete EOL"
9173    arguments="${tmp#* }"
9174
9175    # Cannot rely on the command "which" here since it doesn't always work.
9176    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9177    if test -z "$is_absolute_path"; then
9178      # Path to executable is not absolute. Find it.
9179      IFS_save="$IFS"
9180      IFS=:
9181      for p in $PATH; do
9182        if test -f "$p/$path" && test -x "$p/$path"; then
9183          new_path="$p/$path"
9184          break
9185        fi
9186      done
9187      IFS="$IFS_save"
9188    else
9189      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9190$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9191      new_path="$path"
9192    fi
9193
9194    if test "x$new_path" = x; then
9195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9197        has_space=`$ECHO "$complete" | $GREP " "`
9198        if test "x$has_space" != x; then
9199          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9201        fi
9202        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9203      fi
9204  fi
9205
9206      # Now join together the path and the arguments once again
9207      if test "x$arguments" != xEOL; then
9208        new_complete="$new_path ${arguments% *}"
9209      else
9210        new_complete="$new_path"
9211      fi
9212
9213  if test "x$complete" != "x$new_complete"; then
9214      FOUND_MAKE="$new_complete"
9215      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9216$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9217    fi
9218
9219        fi
9220      fi
9221    fi
9222  fi
9223
9224    fi
9225
9226    if test "x$FOUND_MAKE" = x; then
9227      if test "x$TOOLS_DIR" != x; then
9228        # We have a tools-dir, check that as well before giving up.
9229        OLD_PATH=$PATH
9230        PATH=$TOOLS_DIR:$PATH
9231        for ac_prog in gmake
9232do
9233  # Extract the first word of "$ac_prog", so it can be a program name with args.
9234set dummy $ac_prog; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $CHECK_TOOLSDIR_GMAKE in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9252    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9264if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9266$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9274done
9275
9276
9277  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9278  DESCRIPTION="gmake in tools-dir"
9279  if test "x$MAKE_CANDIDATE" != x; then
9280    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9281$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9282    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9283    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9284    if test "x$IS_GNU_MAKE" = x; then
9285      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9286$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9287    else
9288      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9289      if test "x$IS_MODERN_MAKE" = x; then
9290        { $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
9291$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;}
9292      else
9293        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9294          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9295            MAKE_EXPECTED_ENV='cygwin'
9296          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9297            MAKE_EXPECTED_ENV='msys'
9298          else
9299            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9300          fi
9301          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9302          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9303        else
9304          # Not relevant for non-Windows
9305          IS_MAKE_CORRECT_ENV=true
9306        fi
9307        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9308          { $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
9309$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;}
9310        else
9311          FOUND_MAKE=$MAKE_CANDIDATE
9312
9313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9314
9315  # First separate the path from the arguments. This will split at the first
9316  # space.
9317  complete="$FOUND_MAKE"
9318  path="${complete%% *}"
9319  tmp="$complete EOL"
9320  arguments="${tmp#* }"
9321
9322  # Input might be given as Windows format, start by converting to
9323  # unix format.
9324  new_path=`$CYGPATH -u "$path"`
9325
9326  # Now try to locate executable using which
9327  new_path=`$WHICH "$new_path" 2> /dev/null`
9328  # bat and cmd files are not always considered executable in cygwin causing which
9329  # to not find them
9330  if test "x$new_path" = x \
9331           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9332           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9333    new_path=`$CYGPATH -u "$path"`
9334  fi
9335  if test "x$new_path" = x; then
9336    # Oops. Which didn't find the executable.
9337    # The splitting of arguments from the executable at a space might have been incorrect,
9338    # since paths with space are more likely in Windows. Give it another try with the whole
9339    # argument.
9340    path="$complete"
9341    arguments="EOL"
9342    new_path=`$CYGPATH -u "$path"`
9343    new_path=`$WHICH "$new_path" 2> /dev/null`
9344    # bat and cmd files are not always considered executable in cygwin causing which
9345    # to not find them
9346    if test "x$new_path" = x \
9347             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9348             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9349      new_path=`$CYGPATH -u "$path"`
9350    fi
9351    if test "x$new_path" = x; then
9352      # It's still not found. Now this is an unrecoverable error.
9353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9354$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9355      has_space=`$ECHO "$complete" | $GREP " "`
9356      if test "x$has_space" != x; then
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9359      fi
9360      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9361    fi
9362  fi
9363
9364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9367  # "foo.exe" is OK but "foo" is an error.
9368  #
9369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9370  # It is also a way to make sure we got the proper file name for the real test later on.
9371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9372  if test "x$test_shortpath" = x; then
9373    # Short path failed, file does not exist as specified.
9374    # Try adding .exe or .cmd
9375    if test -f "${new_path}.exe"; then
9376       input_to_shortpath="${new_path}.exe"
9377    elif test -f "${new_path}.cmd"; then
9378       input_to_shortpath="${new_path}.cmd"
9379    else
9380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9381$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9384      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9385    fi
9386  else
9387    input_to_shortpath="$new_path"
9388  fi
9389
9390  # Call helper function which possibly converts this using DOS-style short mode.
9391  # If so, the updated path is stored in $new_path.
9392  new_path="$input_to_shortpath"
9393
9394  input_path="$input_to_shortpath"
9395  # Check if we need to convert this using DOS-style short mode. If the path
9396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9397  # take no chances and rewrite it.
9398  # Note: m4 eats our [], so we need to use [ and ] instead.
9399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9400  if test "x$has_forbidden_chars" != x; then
9401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9405      # Going to short mode and back again did indeed matter. Since short mode is
9406      # case insensitive, let's make it lowercase to improve readability.
9407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9408      # Now convert it back to Unix-stile (cygpath)
9409      input_path=`$CYGPATH -u "$shortmode_path"`
9410      new_path="$input_path"
9411    fi
9412  fi
9413
9414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9415  if test "x$test_cygdrive_prefix" = x; then
9416    # As a simple fix, exclude /usr/bin since it's not a real path.
9417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9419      # a path prefixed by /cygdrive for fixpath to work.
9420      new_path="$CYGWIN_ROOT_PATH$input_path"
9421    fi
9422  fi
9423
9424  # remove trailing .exe if any
9425  new_path="${new_path/%.exe/}"
9426
9427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9428
9429  # First separate the path from the arguments. This will split at the first
9430  # space.
9431  complete="$FOUND_MAKE"
9432  path="${complete%% *}"
9433  tmp="$complete EOL"
9434  arguments="${tmp#* }"
9435
9436  # Input might be given as Windows format, start by converting to
9437  # unix format.
9438  new_path="$path"
9439
9440  windows_path="$new_path"
9441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9442    unix_path=`$CYGPATH -u "$windows_path"`
9443    new_path="$unix_path"
9444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9446    new_path="$unix_path"
9447  fi
9448
9449
9450  # Now try to locate executable using which
9451  new_path=`$WHICH "$new_path" 2> /dev/null`
9452
9453  if test "x$new_path" = x; then
9454    # Oops. Which didn't find the executable.
9455    # The splitting of arguments from the executable at a space might have been incorrect,
9456    # since paths with space are more likely in Windows. Give it another try with the whole
9457    # argument.
9458    path="$complete"
9459    arguments="EOL"
9460    new_path="$path"
9461
9462  windows_path="$new_path"
9463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9464    unix_path=`$CYGPATH -u "$windows_path"`
9465    new_path="$unix_path"
9466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9468    new_path="$unix_path"
9469  fi
9470
9471
9472    new_path=`$WHICH "$new_path" 2> /dev/null`
9473
9474    if test "x$new_path" = x; then
9475      # It's still not found. Now this is an unrecoverable error.
9476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9478      has_space=`$ECHO "$complete" | $GREP " "`
9479      if test "x$has_space" != x; then
9480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9482      fi
9483      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9484    fi
9485  fi
9486
9487  # Now new_path has a complete unix path to the binary
9488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9489    # Keep paths in /bin as-is, but remove trailing .exe if any
9490    new_path="${new_path/%.exe/}"
9491    # Do not save /bin paths to all_fixpath_prefixes!
9492  else
9493    # Not in mixed or Windows style, start by that.
9494    new_path=`cmd //c echo $new_path`
9495
9496  input_path="$new_path"
9497  # Check if we need to convert this using DOS-style short mode. If the path
9498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9499  # take no chances and rewrite it.
9500  # Note: m4 eats our [], so we need to use [ and ] instead.
9501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9502  if test "x$has_forbidden_chars" != x; then
9503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9505  fi
9506
9507    # Output is in $new_path
9508
9509  windows_path="$new_path"
9510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9511    unix_path=`$CYGPATH -u "$windows_path"`
9512    new_path="$unix_path"
9513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9515    new_path="$unix_path"
9516  fi
9517
9518    # remove trailing .exe if any
9519    new_path="${new_path/%.exe/}"
9520
9521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9523  fi
9524
9525  else
9526    # We're on a posix platform. Hooray! :)
9527    # First separate the path from the arguments. This will split at the first
9528    # space.
9529    complete="$FOUND_MAKE"
9530    path="${complete%% *}"
9531    tmp="$complete EOL"
9532    arguments="${tmp#* }"
9533
9534    # Cannot rely on the command "which" here since it doesn't always work.
9535    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9536    if test -z "$is_absolute_path"; then
9537      # Path to executable is not absolute. Find it.
9538      IFS_save="$IFS"
9539      IFS=:
9540      for p in $PATH; do
9541        if test -f "$p/$path" && test -x "$p/$path"; then
9542          new_path="$p/$path"
9543          break
9544        fi
9545      done
9546      IFS="$IFS_save"
9547    else
9548      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9549$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9550      new_path="$path"
9551    fi
9552
9553    if test "x$new_path" = x; then
9554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9555$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9556        has_space=`$ECHO "$complete" | $GREP " "`
9557        if test "x$has_space" != x; then
9558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9560        fi
9561        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9562      fi
9563  fi
9564
9565      # Now join together the path and the arguments once again
9566      if test "x$arguments" != xEOL; then
9567        new_complete="$new_path ${arguments% *}"
9568      else
9569        new_complete="$new_path"
9570      fi
9571
9572  if test "x$complete" != "x$new_complete"; then
9573      FOUND_MAKE="$new_complete"
9574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9575$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9576    fi
9577
9578        fi
9579      fi
9580    fi
9581  fi
9582
9583        if test "x$FOUND_MAKE" = x; then
9584          for ac_prog in make
9585do
9586  # Extract the first word of "$ac_prog", so it can be a program name with args.
9587set dummy $ac_prog; ac_word=$2
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9589$as_echo_n "checking for $ac_word... " >&6; }
9590if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9591  $as_echo_n "(cached) " >&6
9592else
9593  case $CHECK_TOOLSDIR_MAKE in
9594  [\\/]* | ?:[\\/]*)
9595  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9596  ;;
9597  *)
9598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9599for as_dir in $PATH
9600do
9601  IFS=$as_save_IFS
9602  test -z "$as_dir" && as_dir=.
9603    for ac_exec_ext in '' $ac_executable_extensions; do
9604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9605    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9607    break 2
9608  fi
9609done
9610  done
9611IFS=$as_save_IFS
9612
9613  ;;
9614esac
9615fi
9616CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9617if test -n "$CHECK_TOOLSDIR_MAKE"; then
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9619$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9620else
9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
9623fi
9624
9625
9626  test -n "$CHECK_TOOLSDIR_MAKE" && break
9627done
9628
9629
9630  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9631  DESCRIPTION="make in tools-dir"
9632  if test "x$MAKE_CANDIDATE" != x; then
9633    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9634$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9635    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9636    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9637    if test "x$IS_GNU_MAKE" = x; then
9638      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9639$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9640    else
9641      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9642      if test "x$IS_MODERN_MAKE" = x; then
9643        { $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
9644$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;}
9645      else
9646        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9647          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9648            MAKE_EXPECTED_ENV='cygwin'
9649          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9650            MAKE_EXPECTED_ENV='msys'
9651          else
9652            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9653          fi
9654          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9655          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9656        else
9657          # Not relevant for non-Windows
9658          IS_MAKE_CORRECT_ENV=true
9659        fi
9660        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9661          { $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
9662$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;}
9663        else
9664          FOUND_MAKE=$MAKE_CANDIDATE
9665
9666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9667
9668  # First separate the path from the arguments. This will split at the first
9669  # space.
9670  complete="$FOUND_MAKE"
9671  path="${complete%% *}"
9672  tmp="$complete EOL"
9673  arguments="${tmp#* }"
9674
9675  # Input might be given as Windows format, start by converting to
9676  # unix format.
9677  new_path=`$CYGPATH -u "$path"`
9678
9679  # Now try to locate executable using which
9680  new_path=`$WHICH "$new_path" 2> /dev/null`
9681  # bat and cmd files are not always considered executable in cygwin causing which
9682  # to not find them
9683  if test "x$new_path" = x \
9684           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9685           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9686    new_path=`$CYGPATH -u "$path"`
9687  fi
9688  if test "x$new_path" = x; then
9689    # Oops. Which didn't find the executable.
9690    # The splitting of arguments from the executable at a space might have been incorrect,
9691    # since paths with space are more likely in Windows. Give it another try with the whole
9692    # argument.
9693    path="$complete"
9694    arguments="EOL"
9695    new_path=`$CYGPATH -u "$path"`
9696    new_path=`$WHICH "$new_path" 2> /dev/null`
9697    # bat and cmd files are not always considered executable in cygwin causing which
9698    # to not find them
9699    if test "x$new_path" = x \
9700             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9701             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9702      new_path=`$CYGPATH -u "$path"`
9703    fi
9704    if test "x$new_path" = x; then
9705      # It's still not found. Now this is an unrecoverable error.
9706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9707$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9708      has_space=`$ECHO "$complete" | $GREP " "`
9709      if test "x$has_space" != x; then
9710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9712      fi
9713      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9714    fi
9715  fi
9716
9717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9720  # "foo.exe" is OK but "foo" is an error.
9721  #
9722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9723  # It is also a way to make sure we got the proper file name for the real test later on.
9724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9725  if test "x$test_shortpath" = x; then
9726    # Short path failed, file does not exist as specified.
9727    # Try adding .exe or .cmd
9728    if test -f "${new_path}.exe"; then
9729       input_to_shortpath="${new_path}.exe"
9730    elif test -f "${new_path}.cmd"; then
9731       input_to_shortpath="${new_path}.cmd"
9732    else
9733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9734$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9738    fi
9739  else
9740    input_to_shortpath="$new_path"
9741  fi
9742
9743  # Call helper function which possibly converts this using DOS-style short mode.
9744  # If so, the updated path is stored in $new_path.
9745  new_path="$input_to_shortpath"
9746
9747  input_path="$input_to_shortpath"
9748  # Check if we need to convert this using DOS-style short mode. If the path
9749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9750  # take no chances and rewrite it.
9751  # Note: m4 eats our [], so we need to use [ and ] instead.
9752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9753  if test "x$has_forbidden_chars" != x; then
9754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9758      # Going to short mode and back again did indeed matter. Since short mode is
9759      # case insensitive, let's make it lowercase to improve readability.
9760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9761      # Now convert it back to Unix-stile (cygpath)
9762      input_path=`$CYGPATH -u "$shortmode_path"`
9763      new_path="$input_path"
9764    fi
9765  fi
9766
9767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9768  if test "x$test_cygdrive_prefix" = x; then
9769    # As a simple fix, exclude /usr/bin since it's not a real path.
9770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9772      # a path prefixed by /cygdrive for fixpath to work.
9773      new_path="$CYGWIN_ROOT_PATH$input_path"
9774    fi
9775  fi
9776
9777  # remove trailing .exe if any
9778  new_path="${new_path/%.exe/}"
9779
9780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9781
9782  # First separate the path from the arguments. This will split at the first
9783  # space.
9784  complete="$FOUND_MAKE"
9785  path="${complete%% *}"
9786  tmp="$complete EOL"
9787  arguments="${tmp#* }"
9788
9789  # Input might be given as Windows format, start by converting to
9790  # unix format.
9791  new_path="$path"
9792
9793  windows_path="$new_path"
9794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9795    unix_path=`$CYGPATH -u "$windows_path"`
9796    new_path="$unix_path"
9797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9799    new_path="$unix_path"
9800  fi
9801
9802
9803  # Now try to locate executable using which
9804  new_path=`$WHICH "$new_path" 2> /dev/null`
9805
9806  if test "x$new_path" = x; then
9807    # Oops. Which didn't find the executable.
9808    # The splitting of arguments from the executable at a space might have been incorrect,
9809    # since paths with space are more likely in Windows. Give it another try with the whole
9810    # argument.
9811    path="$complete"
9812    arguments="EOL"
9813    new_path="$path"
9814
9815  windows_path="$new_path"
9816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9817    unix_path=`$CYGPATH -u "$windows_path"`
9818    new_path="$unix_path"
9819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9821    new_path="$unix_path"
9822  fi
9823
9824
9825    new_path=`$WHICH "$new_path" 2> /dev/null`
9826
9827    if test "x$new_path" = x; then
9828      # It's still not found. Now this is an unrecoverable error.
9829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9831      has_space=`$ECHO "$complete" | $GREP " "`
9832      if test "x$has_space" != x; then
9833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9835      fi
9836      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9837    fi
9838  fi
9839
9840  # Now new_path has a complete unix path to the binary
9841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9842    # Keep paths in /bin as-is, but remove trailing .exe if any
9843    new_path="${new_path/%.exe/}"
9844    # Do not save /bin paths to all_fixpath_prefixes!
9845  else
9846    # Not in mixed or Windows style, start by that.
9847    new_path=`cmd //c echo $new_path`
9848
9849  input_path="$new_path"
9850  # Check if we need to convert this using DOS-style short mode. If the path
9851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9852  # take no chances and rewrite it.
9853  # Note: m4 eats our [], so we need to use [ and ] instead.
9854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9855  if test "x$has_forbidden_chars" != x; then
9856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9858  fi
9859
9860    # Output is in $new_path
9861
9862  windows_path="$new_path"
9863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9864    unix_path=`$CYGPATH -u "$windows_path"`
9865    new_path="$unix_path"
9866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9868    new_path="$unix_path"
9869  fi
9870
9871    # remove trailing .exe if any
9872    new_path="${new_path/%.exe/}"
9873
9874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9876  fi
9877
9878  else
9879    # We're on a posix platform. Hooray! :)
9880    # First separate the path from the arguments. This will split at the first
9881    # space.
9882    complete="$FOUND_MAKE"
9883    path="${complete%% *}"
9884    tmp="$complete EOL"
9885    arguments="${tmp#* }"
9886
9887    # Cannot rely on the command "which" here since it doesn't always work.
9888    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9889    if test -z "$is_absolute_path"; then
9890      # Path to executable is not absolute. Find it.
9891      IFS_save="$IFS"
9892      IFS=:
9893      for p in $PATH; do
9894        if test -f "$p/$path" && test -x "$p/$path"; then
9895          new_path="$p/$path"
9896          break
9897        fi
9898      done
9899      IFS="$IFS_save"
9900    else
9901      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9902$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9903      new_path="$path"
9904    fi
9905
9906    if test "x$new_path" = x; then
9907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9909        has_space=`$ECHO "$complete" | $GREP " "`
9910        if test "x$has_space" != x; then
9911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9913        fi
9914        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9915      fi
9916  fi
9917
9918      # Now join together the path and the arguments once again
9919      if test "x$arguments" != xEOL; then
9920        new_complete="$new_path ${arguments% *}"
9921      else
9922        new_complete="$new_path"
9923      fi
9924
9925  if test "x$complete" != "x$new_complete"; then
9926      FOUND_MAKE="$new_complete"
9927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9928$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9929    fi
9930
9931        fi
9932      fi
9933    fi
9934  fi
9935
9936        fi
9937        PATH=$OLD_PATH
9938      fi
9939    fi
9940
9941    if test "x$FOUND_MAKE" = x; then
9942      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
9943    fi
9944  fi
9945
9946  MAKE=$FOUND_MAKE
9947
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9949$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9950
9951
9952
9953    # Test if find supports -delete
9954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9955$as_echo_n "checking if find supports -delete... " >&6; }
9956    FIND_DELETE="-delete"
9957
9958    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9959
9960    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9961
9962    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9963    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9964        # No, it does not.
9965        rm $DELETEDIR/TestIfFindSupportsDelete
9966        FIND_DELETE="-exec rm \{\} \+"
9967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
9969    else
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9971$as_echo "yes" >&6; }
9972    fi
9973    rmdir $DELETEDIR
9974
9975
9976
9977# These tools might not be installed by default,
9978# need hint on how to install them.
9979
9980    for ac_prog in unzip
9981do
9982  # Extract the first word of "$ac_prog", so it can be a program name with args.
9983set dummy $ac_prog; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if test "${ac_cv_path_UNZIP+set}" = set; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $UNZIP in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10001    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012UNZIP=$ac_cv_path_UNZIP
10013if test -n "$UNZIP"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10015$as_echo "$UNZIP" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022  test -n "$UNZIP" && break
10023done
10024
10025
10026    if test "x$UNZIP" = x; then
10027        if test "xunzip" = x; then
10028          PROG_NAME=unzip
10029        else
10030          PROG_NAME=unzip
10031        fi
10032        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10033$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10034        as_fn_error $? "Cannot continue" "$LINENO" 5
10035    fi
10036
10037
10038
10039    for ac_prog in zip
10040do
10041  # Extract the first word of "$ac_prog", so it can be a program name with args.
10042set dummy $ac_prog; ac_word=$2
10043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10044$as_echo_n "checking for $ac_word... " >&6; }
10045if test "${ac_cv_path_ZIP+set}" = set; then :
10046  $as_echo_n "(cached) " >&6
10047else
10048  case $ZIP in
10049  [\\/]* | ?:[\\/]*)
10050  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10051  ;;
10052  *)
10053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10054for as_dir in $PATH
10055do
10056  IFS=$as_save_IFS
10057  test -z "$as_dir" && as_dir=.
10058    for ac_exec_ext in '' $ac_executable_extensions; do
10059  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10060    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10062    break 2
10063  fi
10064done
10065  done
10066IFS=$as_save_IFS
10067
10068  ;;
10069esac
10070fi
10071ZIP=$ac_cv_path_ZIP
10072if test -n "$ZIP"; then
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10074$as_echo "$ZIP" >&6; }
10075else
10076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077$as_echo "no" >&6; }
10078fi
10079
10080
10081  test -n "$ZIP" && break
10082done
10083
10084
10085    if test "x$ZIP" = x; then
10086        if test "xzip" = x; then
10087          PROG_NAME=zip
10088        else
10089          PROG_NAME=zip
10090        fi
10091        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10092$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10093        as_fn_error $? "Cannot continue" "$LINENO" 5
10094    fi
10095
10096
10097
10098# Non-required basic tools
10099
10100# Extract the first word of "ldd", so it can be a program name with args.
10101set dummy ldd; ac_word=$2
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10103$as_echo_n "checking for $ac_word... " >&6; }
10104if test "${ac_cv_path_LDD+set}" = set; then :
10105  $as_echo_n "(cached) " >&6
10106else
10107  case $LDD in
10108  [\\/]* | ?:[\\/]*)
10109  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10110  ;;
10111  *)
10112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10113for as_dir in $PATH
10114do
10115  IFS=$as_save_IFS
10116  test -z "$as_dir" && as_dir=.
10117    for ac_exec_ext in '' $ac_executable_extensions; do
10118  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10119    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10121    break 2
10122  fi
10123done
10124  done
10125IFS=$as_save_IFS
10126
10127  ;;
10128esac
10129fi
10130LDD=$ac_cv_path_LDD
10131if test -n "$LDD"; then
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10133$as_echo "$LDD" >&6; }
10134else
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136$as_echo "no" >&6; }
10137fi
10138
10139
10140if test "x$LDD" = "x"; then
10141    # List shared lib dependencies is used for
10142    # debug output and checking for forbidden dependencies.
10143    # We can build without it.
10144    LDD="true"
10145fi
10146# Extract the first word of "otool", so it can be a program name with args.
10147set dummy otool; ac_word=$2
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10149$as_echo_n "checking for $ac_word... " >&6; }
10150if test "${ac_cv_path_OTOOL+set}" = set; then :
10151  $as_echo_n "(cached) " >&6
10152else
10153  case $OTOOL in
10154  [\\/]* | ?:[\\/]*)
10155  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10156  ;;
10157  *)
10158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10159for as_dir in $PATH
10160do
10161  IFS=$as_save_IFS
10162  test -z "$as_dir" && as_dir=.
10163    for ac_exec_ext in '' $ac_executable_extensions; do
10164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10165    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10167    break 2
10168  fi
10169done
10170  done
10171IFS=$as_save_IFS
10172
10173  ;;
10174esac
10175fi
10176OTOOL=$ac_cv_path_OTOOL
10177if test -n "$OTOOL"; then
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10179$as_echo "$OTOOL" >&6; }
10180else
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10182$as_echo "no" >&6; }
10183fi
10184
10185
10186if test "x$OTOOL" = "x"; then
10187   OTOOL="true"
10188fi
10189for ac_prog in readelf greadelf
10190do
10191  # Extract the first word of "$ac_prog", so it can be a program name with args.
10192set dummy $ac_prog; ac_word=$2
10193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10194$as_echo_n "checking for $ac_word... " >&6; }
10195if test "${ac_cv_path_READELF+set}" = set; then :
10196  $as_echo_n "(cached) " >&6
10197else
10198  case $READELF in
10199  [\\/]* | ?:[\\/]*)
10200  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10201  ;;
10202  *)
10203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10204for as_dir in $PATH
10205do
10206  IFS=$as_save_IFS
10207  test -z "$as_dir" && as_dir=.
10208    for ac_exec_ext in '' $ac_executable_extensions; do
10209  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10210    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10212    break 2
10213  fi
10214done
10215  done
10216IFS=$as_save_IFS
10217
10218  ;;
10219esac
10220fi
10221READELF=$ac_cv_path_READELF
10222if test -n "$READELF"; then
10223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10224$as_echo "$READELF" >&6; }
10225else
10226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227$as_echo "no" >&6; }
10228fi
10229
10230
10231  test -n "$READELF" && break
10232done
10233
10234# Extract the first word of "hg", so it can be a program name with args.
10235set dummy hg; ac_word=$2
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237$as_echo_n "checking for $ac_word... " >&6; }
10238if test "${ac_cv_path_HG+set}" = set; then :
10239  $as_echo_n "(cached) " >&6
10240else
10241  case $HG in
10242  [\\/]* | ?:[\\/]*)
10243  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10244  ;;
10245  *)
10246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247for as_dir in $PATH
10248do
10249  IFS=$as_save_IFS
10250  test -z "$as_dir" && as_dir=.
10251    for ac_exec_ext in '' $ac_executable_extensions; do
10252  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10253    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255    break 2
10256  fi
10257done
10258  done
10259IFS=$as_save_IFS
10260
10261  ;;
10262esac
10263fi
10264HG=$ac_cv_path_HG
10265if test -n "$HG"; then
10266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10267$as_echo "$HG" >&6; }
10268else
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
10271fi
10272
10273
10274# Extract the first word of "stat", so it can be a program name with args.
10275set dummy stat; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if test "${ac_cv_path_STAT+set}" = set; then :
10279  $as_echo_n "(cached) " >&6
10280else
10281  case $STAT in
10282  [\\/]* | ?:[\\/]*)
10283  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10284  ;;
10285  *)
10286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289  IFS=$as_save_IFS
10290  test -z "$as_dir" && as_dir=.
10291    for ac_exec_ext in '' $ac_executable_extensions; do
10292  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10293    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295    break 2
10296  fi
10297done
10298  done
10299IFS=$as_save_IFS
10300
10301  ;;
10302esac
10303fi
10304STAT=$ac_cv_path_STAT
10305if test -n "$STAT"; then
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10307$as_echo "$STAT" >&6; }
10308else
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
10311fi
10312
10313
10314# Extract the first word of "time", so it can be a program name with args.
10315set dummy time; ac_word=$2
10316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10317$as_echo_n "checking for $ac_word... " >&6; }
10318if test "${ac_cv_path_TIME+set}" = set; then :
10319  $as_echo_n "(cached) " >&6
10320else
10321  case $TIME in
10322  [\\/]* | ?:[\\/]*)
10323  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10324  ;;
10325  *)
10326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10327for as_dir in $PATH
10328do
10329  IFS=$as_save_IFS
10330  test -z "$as_dir" && as_dir=.
10331    for ac_exec_ext in '' $ac_executable_extensions; do
10332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10333    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10335    break 2
10336  fi
10337done
10338  done
10339IFS=$as_save_IFS
10340
10341  ;;
10342esac
10343fi
10344TIME=$ac_cv_path_TIME
10345if test -n "$TIME"; then
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10347$as_echo "$TIME" >&6; }
10348else
10349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10350$as_echo "no" >&6; }
10351fi
10352
10353
10354# Check if it's GNU time
10355IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10356if test "x$IS_GNU_TIME" != x; then
10357  IS_GNU_TIME=yes
10358else
10359  IS_GNU_TIME=no
10360fi
10361
10362
10363if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10364
10365    for ac_prog in comm
10366do
10367  # Extract the first word of "$ac_prog", so it can be a program name with args.
10368set dummy $ac_prog; ac_word=$2
10369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10370$as_echo_n "checking for $ac_word... " >&6; }
10371if test "${ac_cv_path_COMM+set}" = set; then :
10372  $as_echo_n "(cached) " >&6
10373else
10374  case $COMM in
10375  [\\/]* | ?:[\\/]*)
10376  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10377  ;;
10378  *)
10379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10380for as_dir in $PATH
10381do
10382  IFS=$as_save_IFS
10383  test -z "$as_dir" && as_dir=.
10384    for ac_exec_ext in '' $ac_executable_extensions; do
10385  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10386    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10388    break 2
10389  fi
10390done
10391  done
10392IFS=$as_save_IFS
10393
10394  ;;
10395esac
10396fi
10397COMM=$ac_cv_path_COMM
10398if test -n "$COMM"; then
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10400$as_echo "$COMM" >&6; }
10401else
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10403$as_echo "no" >&6; }
10404fi
10405
10406
10407  test -n "$COMM" && break
10408done
10409
10410
10411    if test "x$COMM" = x; then
10412        if test "xcomm" = x; then
10413          PROG_NAME=comm
10414        else
10415          PROG_NAME=comm
10416        fi
10417        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10418$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10419        as_fn_error $? "Cannot continue" "$LINENO" 5
10420    fi
10421
10422
10423fi
10424
10425if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10426
10427    for ac_prog in xattr
10428do
10429  # Extract the first word of "$ac_prog", so it can be a program name with args.
10430set dummy $ac_prog; ac_word=$2
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432$as_echo_n "checking for $ac_word... " >&6; }
10433if test "${ac_cv_path_XATTR+set}" = set; then :
10434  $as_echo_n "(cached) " >&6
10435else
10436  case $XATTR in
10437  [\\/]* | ?:[\\/]*)
10438  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10439  ;;
10440  *)
10441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442for as_dir in $PATH
10443do
10444  IFS=$as_save_IFS
10445  test -z "$as_dir" && as_dir=.
10446    for ac_exec_ext in '' $ac_executable_extensions; do
10447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10448    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10450    break 2
10451  fi
10452done
10453  done
10454IFS=$as_save_IFS
10455
10456  ;;
10457esac
10458fi
10459XATTR=$ac_cv_path_XATTR
10460if test -n "$XATTR"; then
10461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10462$as_echo "$XATTR" >&6; }
10463else
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466fi
10467
10468
10469  test -n "$XATTR" && break
10470done
10471
10472
10473    if test "x$XATTR" = x; then
10474        if test "xxattr" = x; then
10475          PROG_NAME=xattr
10476        else
10477          PROG_NAME=xattr
10478        fi
10479        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10480$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10481        as_fn_error $? "Cannot continue" "$LINENO" 5
10482    fi
10483
10484
10485  # Extract the first word of "codesign", so it can be a program name with args.
10486set dummy codesign; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if test "${ac_cv_path_CODESIGN+set}" = set; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $CODESIGN in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10504    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515CODESIGN=$ac_cv_path_CODESIGN
10516if test -n "$CODESIGN"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10518$as_echo "$CODESIGN" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  if test "x$CODESIGN" != "x"; then
10526    # Verify that the openjdk_codesign certificate is present
10527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10528$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10529    rm -f codesign-testfile
10530    touch codesign-testfile
10531    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10532    rm -f codesign-testfile
10533    if test "x$CODESIGN" = x; then
10534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10535$as_echo "no" >&6; }
10536    else
10537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10538$as_echo "yes" >&6; }
10539    fi
10540  fi
10541fi
10542
10543
10544# Check if pkg-config is available.
10545
10546
10547if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10548	if test -n "$ac_tool_prefix"; then
10549  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10550set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10552$as_echo_n "checking for $ac_word... " >&6; }
10553if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10554  $as_echo_n "(cached) " >&6
10555else
10556  case $PKG_CONFIG in
10557  [\\/]* | ?:[\\/]*)
10558  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10559  ;;
10560  *)
10561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10562for as_dir in $PATH
10563do
10564  IFS=$as_save_IFS
10565  test -z "$as_dir" && as_dir=.
10566    for ac_exec_ext in '' $ac_executable_extensions; do
10567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10568    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10570    break 2
10571  fi
10572done
10573  done
10574IFS=$as_save_IFS
10575
10576  ;;
10577esac
10578fi
10579PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10580if test -n "$PKG_CONFIG"; then
10581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10582$as_echo "$PKG_CONFIG" >&6; }
10583else
10584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10585$as_echo "no" >&6; }
10586fi
10587
10588
10589fi
10590if test -z "$ac_cv_path_PKG_CONFIG"; then
10591  ac_pt_PKG_CONFIG=$PKG_CONFIG
10592  # Extract the first word of "pkg-config", so it can be a program name with args.
10593set dummy pkg-config; ac_word=$2
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10595$as_echo_n "checking for $ac_word... " >&6; }
10596if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10597  $as_echo_n "(cached) " >&6
10598else
10599  case $ac_pt_PKG_CONFIG in
10600  [\\/]* | ?:[\\/]*)
10601  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10602  ;;
10603  *)
10604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10605for as_dir in $PATH
10606do
10607  IFS=$as_save_IFS
10608  test -z "$as_dir" && as_dir=.
10609    for ac_exec_ext in '' $ac_executable_extensions; do
10610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10611    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10613    break 2
10614  fi
10615done
10616  done
10617IFS=$as_save_IFS
10618
10619  ;;
10620esac
10621fi
10622ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10623if test -n "$ac_pt_PKG_CONFIG"; then
10624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10625$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10626else
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628$as_echo "no" >&6; }
10629fi
10630
10631  if test "x$ac_pt_PKG_CONFIG" = x; then
10632    PKG_CONFIG=""
10633  else
10634    case $cross_compiling:$ac_tool_warned in
10635yes:)
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10638ac_tool_warned=yes ;;
10639esac
10640    PKG_CONFIG=$ac_pt_PKG_CONFIG
10641  fi
10642else
10643  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10644fi
10645
10646fi
10647if test -n "$PKG_CONFIG"; then
10648	_pkg_min_version=0.9.0
10649	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10650$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10651	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10652		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10653$as_echo "yes" >&6; }
10654	else
10655		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656$as_echo "no" >&6; }
10657		PKG_CONFIG=""
10658	fi
10659
10660fi
10661
10662# After basic tools have been setup, we can check build os specific details.
10663
10664###############################################################################
10665
10666# Note that this is the build platform OS version!
10667
10668OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10669OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10670OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10671OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10672
10673
10674
10675
10676
10677# Setup builddeps, for automatic downloading of tools we need.
10678# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10679# boot-jdk setup, but we need to have basic tools setup first.
10680
10681
10682# Check whether --with-builddeps-conf was given.
10683if test "${with_builddeps_conf+set}" = set; then :
10684  withval=$with_builddeps_conf;
10685fi
10686
10687
10688
10689# Check whether --with-builddeps-server was given.
10690if test "${with_builddeps_server+set}" = set; then :
10691  withval=$with_builddeps_server;
10692fi
10693
10694
10695
10696# Check whether --with-builddeps-dir was given.
10697if test "${with_builddeps_dir+set}" = set; then :
10698  withval=$with_builddeps_dir;
10699else
10700  with_builddeps_dir=/localhome/builddeps
10701fi
10702
10703
10704
10705# Check whether --with-builddeps-group was given.
10706if test "${with_builddeps_group+set}" = set; then :
10707  withval=$with_builddeps_group;
10708fi
10709
10710
10711
10712
10713    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10714        if test "x$with_builddeps_conf" != x; then
10715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10716$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10717            builddepsfile=$with_builddeps_conf
10718            if test -s $builddepsfile; then
10719                . $builddepsfile
10720                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10721$as_echo "loaded!" >&6; }
10722            else
10723               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10724           fi
10725        else
10726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10727$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10728            builddepsfile=`mktemp`
10729            touch $builddepsfile
10730            # Put all found confs into a single file.
10731            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10732            # Source the file to acquire the variables
10733            if test -s $builddepsfile; then
10734                . $builddepsfile
10735                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10736$as_echo "found at least one!" >&6; }
10737            else
10738               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10739           fi
10740        fi
10741        # Create build and target names that use _ instead of "-" and ".".
10742        # This is necessary to use them in variable names.
10743        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10744        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10745        # Extract rewrite information for build and target
10746        eval rewritten_build=\${REWRITE_${build_var}}
10747        if test "x$rewritten_build" = x; then
10748            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10749            echo Build stays the same $rewritten_build
10750        else
10751            echo Rewriting build for builddeps into $rewritten_build
10752        fi
10753        eval rewritten_target=\${REWRITE_${target_var}}
10754        if test "x$rewritten_target" = x; then
10755            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10756            echo Target stays the same $rewritten_target
10757        else
10758            echo Rewriting target for builddeps into $rewritten_target
10759        fi
10760        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10761        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10762    fi
10763    for ac_prog in 7z unzip
10764do
10765  # Extract the first word of "$ac_prog", so it can be a program name with args.
10766set dummy $ac_prog; ac_word=$2
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10768$as_echo_n "checking for $ac_word... " >&6; }
10769if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10770  $as_echo_n "(cached) " >&6
10771else
10772  if test -n "$BDEPS_UNZIP"; then
10773  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10774else
10775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10776for as_dir in $PATH
10777do
10778  IFS=$as_save_IFS
10779  test -z "$as_dir" && as_dir=.
10780    for ac_exec_ext in '' $ac_executable_extensions; do
10781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10782    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10784    break 2
10785  fi
10786done
10787  done
10788IFS=$as_save_IFS
10789
10790fi
10791fi
10792BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10793if test -n "$BDEPS_UNZIP"; then
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10795$as_echo "$BDEPS_UNZIP" >&6; }
10796else
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798$as_echo "no" >&6; }
10799fi
10800
10801
10802  test -n "$BDEPS_UNZIP" && break
10803done
10804
10805    if test "x$BDEPS_UNZIP" = x7z; then
10806        BDEPS_UNZIP="7z x"
10807    fi
10808
10809    for ac_prog in wget lftp ftp
10810do
10811  # Extract the first word of "$ac_prog", so it can be a program name with args.
10812set dummy $ac_prog; ac_word=$2
10813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10814$as_echo_n "checking for $ac_word... " >&6; }
10815if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10816  $as_echo_n "(cached) " >&6
10817else
10818  if test -n "$BDEPS_FTP"; then
10819  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10820else
10821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10822for as_dir in $PATH
10823do
10824  IFS=$as_save_IFS
10825  test -z "$as_dir" && as_dir=.
10826    for ac_exec_ext in '' $ac_executable_extensions; do
10827  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10828    ac_cv_prog_BDEPS_FTP="$ac_prog"
10829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10830    break 2
10831  fi
10832done
10833  done
10834IFS=$as_save_IFS
10835
10836fi
10837fi
10838BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10839if test -n "$BDEPS_FTP"; then
10840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10841$as_echo "$BDEPS_FTP" >&6; }
10842else
10843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10844$as_echo "no" >&6; }
10845fi
10846
10847
10848  test -n "$BDEPS_FTP" && break
10849done
10850
10851
10852
10853###############################################################################
10854#
10855# Determine OpenJDK variants, options and version numbers.
10856#
10857###############################################################################
10858
10859# We need build & target for this.
10860
10861
10862###############################################################################
10863#
10864# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10865# We always build headless support.
10866#
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10868$as_echo_n "checking headful support... " >&6; }
10869# Check whether --enable-headful was given.
10870if test "${enable_headful+set}" = set; then :
10871  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10872else
10873  SUPPORT_HEADFUL=yes
10874fi
10875
10876
10877SUPPORT_HEADLESS=yes
10878BUILD_HEADLESS="BUILD_HEADLESS:=true"
10879
10880if test "x$SUPPORT_HEADFUL" = xyes; then
10881    # We are building both headful and headless.
10882    headful_msg="inlude support for both headful and headless"
10883fi
10884
10885if test "x$SUPPORT_HEADFUL" = xno; then
10886    # Thus we are building headless only.
10887    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10888    headful_msg="headless only"
10889fi
10890
10891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10892$as_echo "$headful_msg" >&6; }
10893
10894
10895
10896
10897
10898# Control wether Hotspot runs Queens test after build.
10899# Check whether --enable-hotspot-test-in-build was given.
10900if test "${enable_hotspot_test_in_build+set}" = set; then :
10901  enableval=$enable_hotspot_test_in_build;
10902else
10903  enable_hotspot_test_in_build=no
10904fi
10905
10906if test "x$enable_hotspot_test_in_build" = "xyes"; then
10907    TEST_IN_BUILD=true
10908else
10909    TEST_IN_BUILD=false
10910fi
10911
10912
10913###############################################################################
10914#
10915# Choose cacerts source file
10916#
10917
10918# Check whether --with-cacerts-file was given.
10919if test "${with_cacerts_file+set}" = set; then :
10920  withval=$with_cacerts_file;
10921fi
10922
10923if test "x$with_cacerts_file" != x; then
10924    CACERTS_FILE=$with_cacerts_file
10925else
10926    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10927fi
10928
10929
10930###############################################################################
10931#
10932# Enable or disable unlimited crypto
10933#
10934# Check whether --enable-unlimited-crypto was given.
10935if test "${enable_unlimited_crypto+set}" = set; then :
10936  enableval=$enable_unlimited_crypto;
10937else
10938  enable_unlimited_crypto=no
10939fi
10940
10941if test "x$enable_unlimited_crypto" = "xyes"; then
10942    UNLIMITED_CRYPTO=true
10943else
10944    UNLIMITED_CRYPTO=false
10945fi
10946
10947
10948###############################################################################
10949#
10950# Enable or disable the elliptic curve crypto implementation
10951#
10952
10953
10954###############################################################################
10955#
10956# Compress jars
10957#
10958COMPRESS_JARS=false
10959
10960
10961
10962
10963# Source the version numbers
10964. $AUTOCONF_DIR/version-numbers
10965
10966# Get the settings from parameters
10967
10968# Check whether --with-milestone was given.
10969if test "${with_milestone+set}" = set; then :
10970  withval=$with_milestone;
10971fi
10972
10973if test "x$with_milestone" = xyes; then
10974  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10975elif test "x$with_milestone" != x; then
10976    MILESTONE="$with_milestone"
10977fi
10978if test "x$MILESTONE" = x; then
10979  MILESTONE=internal
10980fi
10981
10982
10983# Check whether --with-update-version was given.
10984if test "${with_update_version+set}" = set; then :
10985  withval=$with_update_version;
10986fi
10987
10988if test "x$with_update_version" = xyes; then
10989  as_fn_error $? "Update version must have a value" "$LINENO" 5
10990elif test "x$with_update_version" != x; then
10991  JDK_UPDATE_VERSION="$with_update_version"
10992fi
10993
10994
10995# Check whether --with-build-number was given.
10996if test "${with_build_number+set}" = set; then :
10997  withval=$with_build_number;
10998fi
10999
11000if test "x$with_build_number" = xyes; then
11001  as_fn_error $? "Build number must have a value" "$LINENO" 5
11002elif test "x$with_build_number" != x; then
11003  JDK_BUILD_NUMBER="$with_build_number"
11004fi
11005if test "x$JDK_BUILD_NUMBER" = x; then
11006  JDK_BUILD_NUMBER=b00
11007fi
11008
11009
11010# Check whether --with-user-release-suffix was given.
11011if test "${with_user_release_suffix+set}" = set; then :
11012  withval=$with_user_release_suffix;
11013fi
11014
11015if test "x$with_user_release_suffix" = xyes; then
11016  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11017elif test "x$with_user_release_suffix" != x; then
11018  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11019else
11020  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11021  # Avoid [:alnum:] since it depends on the locale.
11022  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11023  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11024fi
11025
11026
11027# Now set the JDK version, milestone, build number etc.
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042COPYRIGHT_YEAR=`date +'%Y'`
11043
11044
11045if test "x$JDK_UPDATE_VERSION" != x; then
11046  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11047else
11048  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11049fi
11050
11051
11052COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11053
11054
11055
11056###############################################################################
11057#
11058# Setup BootJDK, used to bootstrap the build.
11059#
11060###############################################################################
11061
11062
11063BOOT_JDK_FOUND=no
11064
11065# Check whether --with-boot-jdk was given.
11066if test "${with_boot_jdk+set}" = set; then :
11067  withval=$with_boot_jdk;
11068fi
11069
11070
11071# We look for the Boot JDK through various means, going from more certain to
11072# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11073# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11074# must check if this is indeed valid; otherwise we'll continue looking.
11075
11076# Test: Is bootjdk explicitely set by command line arguments?
11077
11078  if test "x$BOOT_JDK_FOUND" = xno; then
11079    # Now execute the test
11080
11081if test "x$with_boot_jdk" != x; then
11082    BOOT_JDK=$with_boot_jdk
11083    BOOT_JDK_FOUND=maybe
11084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11085$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11086fi
11087
11088
11089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11091      # Do we have a bin/java?
11092      if test ! -x "$BOOT_JDK/bin/java"; then
11093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11095        BOOT_JDK_FOUND=no
11096      else
11097        # Do we have a bin/javac?
11098        if test ! -x "$BOOT_JDK/bin/javac"; then
11099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11103          BOOT_JDK_FOUND=no
11104        else
11105          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11106          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11109            BOOT_JDK_FOUND=no
11110          else
11111            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11113
11114            # Extra M4 quote needed to protect [] in grep expression.
11115            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11116            if test "x$FOUND_VERSION_78" = x; then
11117              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11119              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11120$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11121              BOOT_JDK_FOUND=no
11122            else
11123              # We're done! :-)
11124              BOOT_JDK_FOUND=yes
11125
11126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11127
11128  # Input might be given as Windows format, start by converting to
11129  # unix format.
11130  path="$BOOT_JDK"
11131  new_path=`$CYGPATH -u "$path"`
11132
11133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11136  # "foo.exe" is OK but "foo" is an error.
11137  #
11138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11139  # It is also a way to make sure we got the proper file name for the real test later on.
11140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11141  if test "x$test_shortpath" = x; then
11142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11145  fi
11146
11147  # Call helper function which possibly converts this using DOS-style short mode.
11148  # If so, the updated path is stored in $new_path.
11149
11150  input_path="$new_path"
11151  # Check if we need to convert this using DOS-style short mode. If the path
11152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11153  # take no chances and rewrite it.
11154  # Note: m4 eats our [], so we need to use [ and ] instead.
11155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11156  if test "x$has_forbidden_chars" != x; then
11157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11161      # Going to short mode and back again did indeed matter. Since short mode is
11162      # case insensitive, let's make it lowercase to improve readability.
11163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11164      # Now convert it back to Unix-stile (cygpath)
11165      input_path=`$CYGPATH -u "$shortmode_path"`
11166      new_path="$input_path"
11167    fi
11168  fi
11169
11170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11171  if test "x$test_cygdrive_prefix" = x; then
11172    # As a simple fix, exclude /usr/bin since it's not a real path.
11173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11175      # a path prefixed by /cygdrive for fixpath to work.
11176      new_path="$CYGWIN_ROOT_PATH$input_path"
11177    fi
11178  fi
11179
11180
11181  if test "x$path" != "x$new_path"; then
11182    BOOT_JDK="$new_path"
11183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11185  fi
11186
11187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11188
11189  path="$BOOT_JDK"
11190  has_colon=`$ECHO $path | $GREP ^.:`
11191  new_path="$path"
11192  if test "x$has_colon" = x; then
11193    # Not in mixed or Windows style, start by that.
11194    new_path=`cmd //c echo $path`
11195  fi
11196
11197
11198  input_path="$new_path"
11199  # Check if we need to convert this using DOS-style short mode. If the path
11200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11201  # take no chances and rewrite it.
11202  # Note: m4 eats our [], so we need to use [ and ] instead.
11203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11204  if test "x$has_forbidden_chars" != x; then
11205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11207  fi
11208
11209
11210  windows_path="$new_path"
11211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11212    unix_path=`$CYGPATH -u "$windows_path"`
11213    new_path="$unix_path"
11214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11216    new_path="$unix_path"
11217  fi
11218
11219  if test "x$path" != "x$new_path"; then
11220    BOOT_JDK="$new_path"
11221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11223  fi
11224
11225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11227
11228  else
11229    # We're on a posix platform. Hooray! :)
11230    path="$BOOT_JDK"
11231    has_space=`$ECHO "$path" | $GREP " "`
11232    if test "x$has_space" != x; then
11233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11235      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11236    fi
11237
11238    # Use eval to expand a potential ~
11239    eval path="$path"
11240    if test ! -f "$path" && test ! -d "$path"; then
11241      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11242    fi
11243
11244    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11245  fi
11246
11247              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11248$as_echo_n "checking for Boot JDK... " >&6; }
11249              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11250$as_echo "$BOOT_JDK" >&6; }
11251              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11252$as_echo_n "checking Boot JDK version... " >&6; }
11253              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11255$as_echo "$BOOT_JDK_VERSION" >&6; }
11256            fi # end check jdk version
11257          fi # end check rt.jar
11258        fi # end check javac
11259      fi # end check java
11260    fi # end check boot jdk found
11261  fi
11262
11263if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11264  # Having specified an argument which is incorrect will produce an instant failure;
11265  # we should not go on looking
11266  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11267fi
11268
11269# Test: Is bootjdk available from builddeps?
11270
11271  if test "x$BOOT_JDK_FOUND" = xno; then
11272    # Now execute the test
11273
11274
11275
11276    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11277        # Source the builddeps file again, to make sure it uses the latest variables!
11278        . $builddepsfile
11279        # Look for a target and build machine specific resource!
11280        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11281        if test "x$resource" = x; then
11282            # Ok, lets instead look for a target specific resource
11283            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11284        fi
11285        if test "x$resource" = x; then
11286            # Ok, lets instead look for a build specific resource
11287            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11288        fi
11289        if test "x$resource" = x; then
11290            # Ok, lets instead look for a generic resource
11291            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11292            resource=${builddep_bootjdk}
11293        fi
11294        if test "x$resource" != x; then
11295            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11296$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11297	    # If the resource in the builddeps.conf file is an existing directory,
11298	    # for example /java/linux/cups
11299	    if test -d ${resource}; then
11300	       depdir=${resource}
11301	    else
11302
11303# bootjdk is for example mymodule
11304# $resource is for example libs/general/libmymod_1_2_3.zip
11305# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11306# $with_builddeps_dir is for example /localhome/builddeps
11307# depdir is the name of the variable into which we store the depdir, eg MYMOD
11308# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11309# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11310    filename=`basename $resource`
11311    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11312    filebase=${filename%%.*}
11313    extension=${filename#*.}
11314    installdir=$with_builddeps_dir/$filebase
11315    if test ! -f $installdir/$filename.unpacked; then
11316        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11317$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11318        if test ! -d $installdir; then
11319            mkdir -p $installdir
11320        fi
11321        if test ! -d $installdir; then
11322            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11323        fi
11324        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11325        touch $tmpfile
11326        if test ! -f $tmpfile; then
11327            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11328        fi
11329
11330    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11331    # $tmpfile is the local file name for the downloaded file.
11332    VALID_TOOL=no
11333    if test "x$BDEPS_FTP" = xwget; then
11334       VALID_TOOL=yes
11335       wget -O $tmpfile $with_builddeps_server/$resource
11336    fi
11337    if test "x$BDEPS_FTP" = xlftp; then
11338       VALID_TOOL=yes
11339       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11340    fi
11341    if test "x$BDEPS_FTP" = xftp; then
11342        VALID_TOOL=yes
11343        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11344        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11345        FTPUSERPWD=${FTPSERVER%%@*}
11346        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11347            FTPUSER=${userpwd%%:*}
11348            FTPPWD=${userpwd#*@}
11349            FTPSERVER=${FTPSERVER#*@}
11350        else
11351            FTPUSER=ftp
11352            FTPPWD=ftp
11353        fi
11354        # the "pass" command does not work on some
11355        # ftp clients (read ftp.exe) but if it works,
11356        # passive mode is better!
11357        (\
11358            echo "user $FTPUSER $FTPPWD"        ;\
11359            echo "pass"                         ;\
11360            echo "bin"                          ;\
11361            echo "get $FTPPATH $tmpfile"              ;\
11362        ) | ftp -in $FTPSERVER
11363    fi
11364    if test "x$VALID_TOOL" != xyes; then
11365       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11366    fi
11367
11368        mv $tmpfile $installdir/$filename
11369        if test ! -s $installdir/$filename; then
11370            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11371        fi
11372        case "$extension" in
11373            zip)  echo "Unzipping $installdir/$filename..."
11374               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11375            ;;
11376            tar.gz) echo "Untaring $installdir/$filename..."
11377               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11378            ;;
11379            tgz) echo "Untaring $installdir/$filename..."
11380               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11381            ;;
11382            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11383            ;;
11384        esac
11385    fi
11386    if test -f $installdir/$filename.unpacked; then
11387        depdir=$installdir
11388    fi
11389
11390	    fi
11391            # Source the builddeps file again, because in the previous command, the depdir
11392            # was updated to point at the current build dependency install directory.
11393            . $builddepsfile
11394            # Now extract variables from the builddeps.conf files.
11395            theroot=${builddep_bootjdk_ROOT}
11396            thecflags=${builddep_bootjdk_CFLAGS}
11397            thelibs=${builddep_bootjdk_LIBS}
11398            if test "x$depdir" = x; then
11399                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11400            fi
11401            BOOT_JDK=$depdir
11402            if test "x$theroot" != x; then
11403               BOOT_JDK="$theroot"
11404            fi
11405            if test "x$thecflags" != x; then
11406               BOOT_JDK_CFLAGS="$thecflags"
11407            fi
11408            if test "x$thelibs" != x; then
11409               BOOT_JDK_LIBS="$thelibs"
11410            fi
11411            BOOT_JDK_FOUND=maybe
11412            else BOOT_JDK_FOUND=no
11413
11414        fi
11415        else BOOT_JDK_FOUND=no
11416
11417    fi
11418
11419
11420
11421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11423      # Do we have a bin/java?
11424      if test ! -x "$BOOT_JDK/bin/java"; then
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11427        BOOT_JDK_FOUND=no
11428      else
11429        # Do we have a bin/javac?
11430        if test ! -x "$BOOT_JDK/bin/javac"; then
11431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11435          BOOT_JDK_FOUND=no
11436        else
11437          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11438          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11441            BOOT_JDK_FOUND=no
11442          else
11443            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11445
11446            # Extra M4 quote needed to protect [] in grep expression.
11447            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11448            if test "x$FOUND_VERSION_78" = x; then
11449              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11451              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11452$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11453              BOOT_JDK_FOUND=no
11454            else
11455              # We're done! :-)
11456              BOOT_JDK_FOUND=yes
11457
11458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11459
11460  # Input might be given as Windows format, start by converting to
11461  # unix format.
11462  path="$BOOT_JDK"
11463  new_path=`$CYGPATH -u "$path"`
11464
11465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11468  # "foo.exe" is OK but "foo" is an error.
11469  #
11470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11471  # It is also a way to make sure we got the proper file name for the real test later on.
11472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11473  if test "x$test_shortpath" = x; then
11474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11477  fi
11478
11479  # Call helper function which possibly converts this using DOS-style short mode.
11480  # If so, the updated path is stored in $new_path.
11481
11482  input_path="$new_path"
11483  # Check if we need to convert this using DOS-style short mode. If the path
11484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11485  # take no chances and rewrite it.
11486  # Note: m4 eats our [], so we need to use [ and ] instead.
11487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11488  if test "x$has_forbidden_chars" != x; then
11489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11493      # Going to short mode and back again did indeed matter. Since short mode is
11494      # case insensitive, let's make it lowercase to improve readability.
11495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11496      # Now convert it back to Unix-stile (cygpath)
11497      input_path=`$CYGPATH -u "$shortmode_path"`
11498      new_path="$input_path"
11499    fi
11500  fi
11501
11502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11503  if test "x$test_cygdrive_prefix" = x; then
11504    # As a simple fix, exclude /usr/bin since it's not a real path.
11505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11507      # a path prefixed by /cygdrive for fixpath to work.
11508      new_path="$CYGWIN_ROOT_PATH$input_path"
11509    fi
11510  fi
11511
11512
11513  if test "x$path" != "x$new_path"; then
11514    BOOT_JDK="$new_path"
11515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11517  fi
11518
11519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11520
11521  path="$BOOT_JDK"
11522  has_colon=`$ECHO $path | $GREP ^.:`
11523  new_path="$path"
11524  if test "x$has_colon" = x; then
11525    # Not in mixed or Windows style, start by that.
11526    new_path=`cmd //c echo $path`
11527  fi
11528
11529
11530  input_path="$new_path"
11531  # Check if we need to convert this using DOS-style short mode. If the path
11532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11533  # take no chances and rewrite it.
11534  # Note: m4 eats our [], so we need to use [ and ] instead.
11535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11536  if test "x$has_forbidden_chars" != x; then
11537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11539  fi
11540
11541
11542  windows_path="$new_path"
11543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11544    unix_path=`$CYGPATH -u "$windows_path"`
11545    new_path="$unix_path"
11546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11548    new_path="$unix_path"
11549  fi
11550
11551  if test "x$path" != "x$new_path"; then
11552    BOOT_JDK="$new_path"
11553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11555  fi
11556
11557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11559
11560  else
11561    # We're on a posix platform. Hooray! :)
11562    path="$BOOT_JDK"
11563    has_space=`$ECHO "$path" | $GREP " "`
11564    if test "x$has_space" != x; then
11565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11567      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11568    fi
11569
11570    # Use eval to expand a potential ~
11571    eval path="$path"
11572    if test ! -f "$path" && test ! -d "$path"; then
11573      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11574    fi
11575
11576    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11577  fi
11578
11579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11580$as_echo_n "checking for Boot JDK... " >&6; }
11581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11582$as_echo "$BOOT_JDK" >&6; }
11583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11584$as_echo_n "checking Boot JDK version... " >&6; }
11585              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11587$as_echo "$BOOT_JDK_VERSION" >&6; }
11588            fi # end check jdk version
11589          fi # end check rt.jar
11590        fi # end check javac
11591      fi # end check java
11592    fi # end check boot jdk found
11593  fi
11594
11595
11596# Test: Is $JAVA_HOME set?
11597
11598  if test "x$BOOT_JDK_FOUND" = xno; then
11599    # Now execute the test
11600
11601    if test "x$JAVA_HOME" != x; then
11602        JAVA_HOME_PROCESSED="$JAVA_HOME"
11603
11604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11605
11606  # Input might be given as Windows format, start by converting to
11607  # unix format.
11608  path="$JAVA_HOME_PROCESSED"
11609  new_path=`$CYGPATH -u "$path"`
11610
11611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11614  # "foo.exe" is OK but "foo" is an error.
11615  #
11616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11617  # It is also a way to make sure we got the proper file name for the real test later on.
11618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11619  if test "x$test_shortpath" = x; then
11620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11621$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11622    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11623  fi
11624
11625  # Call helper function which possibly converts this using DOS-style short mode.
11626  # If so, the updated path is stored in $new_path.
11627
11628  input_path="$new_path"
11629  # Check if we need to convert this using DOS-style short mode. If the path
11630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11631  # take no chances and rewrite it.
11632  # Note: m4 eats our [], so we need to use [ and ] instead.
11633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11634  if test "x$has_forbidden_chars" != x; then
11635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11639      # Going to short mode and back again did indeed matter. Since short mode is
11640      # case insensitive, let's make it lowercase to improve readability.
11641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11642      # Now convert it back to Unix-stile (cygpath)
11643      input_path=`$CYGPATH -u "$shortmode_path"`
11644      new_path="$input_path"
11645    fi
11646  fi
11647
11648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11649  if test "x$test_cygdrive_prefix" = x; then
11650    # As a simple fix, exclude /usr/bin since it's not a real path.
11651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11653      # a path prefixed by /cygdrive for fixpath to work.
11654      new_path="$CYGWIN_ROOT_PATH$input_path"
11655    fi
11656  fi
11657
11658
11659  if test "x$path" != "x$new_path"; then
11660    JAVA_HOME_PROCESSED="$new_path"
11661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11662$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11663  fi
11664
11665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11666
11667  path="$JAVA_HOME_PROCESSED"
11668  has_colon=`$ECHO $path | $GREP ^.:`
11669  new_path="$path"
11670  if test "x$has_colon" = x; then
11671    # Not in mixed or Windows style, start by that.
11672    new_path=`cmd //c echo $path`
11673  fi
11674
11675
11676  input_path="$new_path"
11677  # Check if we need to convert this using DOS-style short mode. If the path
11678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11679  # take no chances and rewrite it.
11680  # Note: m4 eats our [], so we need to use [ and ] instead.
11681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11682  if test "x$has_forbidden_chars" != x; then
11683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11685  fi
11686
11687
11688  windows_path="$new_path"
11689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11690    unix_path=`$CYGPATH -u "$windows_path"`
11691    new_path="$unix_path"
11692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11694    new_path="$unix_path"
11695  fi
11696
11697  if test "x$path" != "x$new_path"; then
11698    JAVA_HOME_PROCESSED="$new_path"
11699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11700$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11701  fi
11702
11703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11705
11706  else
11707    # We're on a posix platform. Hooray! :)
11708    path="$JAVA_HOME_PROCESSED"
11709    has_space=`$ECHO "$path" | $GREP " "`
11710    if test "x$has_space" != x; then
11711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11712$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11713      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11714    fi
11715
11716    # Use eval to expand a potential ~
11717    eval path="$path"
11718    if test ! -f "$path" && test ! -d "$path"; then
11719      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11720    fi
11721
11722    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11723  fi
11724
11725        if test ! -d "$JAVA_HOME_PROCESSED"; then
11726            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11727$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11728        else
11729          # Aha, the user has set a JAVA_HOME
11730          # let us use that as the Boot JDK.
11731          BOOT_JDK="$JAVA_HOME_PROCESSED"
11732          BOOT_JDK_FOUND=maybe
11733          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11734$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11735        fi
11736    fi
11737
11738
11739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11741      # Do we have a bin/java?
11742      if test ! -x "$BOOT_JDK/bin/java"; then
11743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11745        BOOT_JDK_FOUND=no
11746      else
11747        # Do we have a bin/javac?
11748        if test ! -x "$BOOT_JDK/bin/javac"; then
11749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11753          BOOT_JDK_FOUND=no
11754        else
11755          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11756          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11757            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11759            BOOT_JDK_FOUND=no
11760          else
11761            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11763
11764            # Extra M4 quote needed to protect [] in grep expression.
11765            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11766            if test "x$FOUND_VERSION_78" = x; then
11767              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11769              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11770$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11771              BOOT_JDK_FOUND=no
11772            else
11773              # We're done! :-)
11774              BOOT_JDK_FOUND=yes
11775
11776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11777
11778  # Input might be given as Windows format, start by converting to
11779  # unix format.
11780  path="$BOOT_JDK"
11781  new_path=`$CYGPATH -u "$path"`
11782
11783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11786  # "foo.exe" is OK but "foo" is an error.
11787  #
11788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11789  # It is also a way to make sure we got the proper file name for the real test later on.
11790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11791  if test "x$test_shortpath" = x; then
11792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11795  fi
11796
11797  # Call helper function which possibly converts this using DOS-style short mode.
11798  # If so, the updated path is stored in $new_path.
11799
11800  input_path="$new_path"
11801  # Check if we need to convert this using DOS-style short mode. If the path
11802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11803  # take no chances and rewrite it.
11804  # Note: m4 eats our [], so we need to use [ and ] instead.
11805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11806  if test "x$has_forbidden_chars" != x; then
11807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11811      # Going to short mode and back again did indeed matter. Since short mode is
11812      # case insensitive, let's make it lowercase to improve readability.
11813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11814      # Now convert it back to Unix-stile (cygpath)
11815      input_path=`$CYGPATH -u "$shortmode_path"`
11816      new_path="$input_path"
11817    fi
11818  fi
11819
11820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11821  if test "x$test_cygdrive_prefix" = x; then
11822    # As a simple fix, exclude /usr/bin since it's not a real path.
11823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11825      # a path prefixed by /cygdrive for fixpath to work.
11826      new_path="$CYGWIN_ROOT_PATH$input_path"
11827    fi
11828  fi
11829
11830
11831  if test "x$path" != "x$new_path"; then
11832    BOOT_JDK="$new_path"
11833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11835  fi
11836
11837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11838
11839  path="$BOOT_JDK"
11840  has_colon=`$ECHO $path | $GREP ^.:`
11841  new_path="$path"
11842  if test "x$has_colon" = x; then
11843    # Not in mixed or Windows style, start by that.
11844    new_path=`cmd //c echo $path`
11845  fi
11846
11847
11848  input_path="$new_path"
11849  # Check if we need to convert this using DOS-style short mode. If the path
11850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11851  # take no chances and rewrite it.
11852  # Note: m4 eats our [], so we need to use [ and ] instead.
11853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11854  if test "x$has_forbidden_chars" != x; then
11855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11857  fi
11858
11859
11860  windows_path="$new_path"
11861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11862    unix_path=`$CYGPATH -u "$windows_path"`
11863    new_path="$unix_path"
11864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11866    new_path="$unix_path"
11867  fi
11868
11869  if test "x$path" != "x$new_path"; then
11870    BOOT_JDK="$new_path"
11871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11873  fi
11874
11875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11877
11878  else
11879    # We're on a posix platform. Hooray! :)
11880    path="$BOOT_JDK"
11881    has_space=`$ECHO "$path" | $GREP " "`
11882    if test "x$has_space" != x; then
11883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11885      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11886    fi
11887
11888    # Use eval to expand a potential ~
11889    eval path="$path"
11890    if test ! -f "$path" && test ! -d "$path"; then
11891      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11892    fi
11893
11894    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11895  fi
11896
11897              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11898$as_echo_n "checking for Boot JDK... " >&6; }
11899              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11900$as_echo "$BOOT_JDK" >&6; }
11901              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11902$as_echo_n "checking Boot JDK version... " >&6; }
11903              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11904              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11905$as_echo "$BOOT_JDK_VERSION" >&6; }
11906            fi # end check jdk version
11907          fi # end check rt.jar
11908        fi # end check javac
11909      fi # end check java
11910    fi # end check boot jdk found
11911  fi
11912
11913
11914# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11915
11916  if test "x$BOOT_JDK_FOUND" = xno; then
11917    # Now execute the test
11918
11919    if test -x /usr/libexec/java_home; then
11920        BOOT_JDK=`/usr/libexec/java_home`
11921        BOOT_JDK_FOUND=maybe
11922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11923$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11924    fi
11925
11926
11927    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11928    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11929      # Do we have a bin/java?
11930      if test ! -x "$BOOT_JDK/bin/java"; then
11931        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11933        BOOT_JDK_FOUND=no
11934      else
11935        # Do we have a bin/javac?
11936        if test ! -x "$BOOT_JDK/bin/javac"; then
11937          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11940$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11941          BOOT_JDK_FOUND=no
11942        else
11943          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11944          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11945            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11947            BOOT_JDK_FOUND=no
11948          else
11949            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11950            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11951
11952            # Extra M4 quote needed to protect [] in grep expression.
11953            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11954            if test "x$FOUND_VERSION_78" = x; then
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11958$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11959              BOOT_JDK_FOUND=no
11960            else
11961              # We're done! :-)
11962              BOOT_JDK_FOUND=yes
11963
11964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11965
11966  # Input might be given as Windows format, start by converting to
11967  # unix format.
11968  path="$BOOT_JDK"
11969  new_path=`$CYGPATH -u "$path"`
11970
11971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11974  # "foo.exe" is OK but "foo" is an error.
11975  #
11976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11977  # It is also a way to make sure we got the proper file name for the real test later on.
11978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11979  if test "x$test_shortpath" = x; then
11980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11983  fi
11984
11985  # Call helper function which possibly converts this using DOS-style short mode.
11986  # If so, the updated path is stored in $new_path.
11987
11988  input_path="$new_path"
11989  # Check if we need to convert this using DOS-style short mode. If the path
11990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11991  # take no chances and rewrite it.
11992  # Note: m4 eats our [], so we need to use [ and ] instead.
11993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11994  if test "x$has_forbidden_chars" != x; then
11995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11999      # Going to short mode and back again did indeed matter. Since short mode is
12000      # case insensitive, let's make it lowercase to improve readability.
12001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12002      # Now convert it back to Unix-stile (cygpath)
12003      input_path=`$CYGPATH -u "$shortmode_path"`
12004      new_path="$input_path"
12005    fi
12006  fi
12007
12008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12009  if test "x$test_cygdrive_prefix" = x; then
12010    # As a simple fix, exclude /usr/bin since it's not a real path.
12011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12013      # a path prefixed by /cygdrive for fixpath to work.
12014      new_path="$CYGWIN_ROOT_PATH$input_path"
12015    fi
12016  fi
12017
12018
12019  if test "x$path" != "x$new_path"; then
12020    BOOT_JDK="$new_path"
12021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12023  fi
12024
12025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12026
12027  path="$BOOT_JDK"
12028  has_colon=`$ECHO $path | $GREP ^.:`
12029  new_path="$path"
12030  if test "x$has_colon" = x; then
12031    # Not in mixed or Windows style, start by that.
12032    new_path=`cmd //c echo $path`
12033  fi
12034
12035
12036  input_path="$new_path"
12037  # Check if we need to convert this using DOS-style short mode. If the path
12038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12039  # take no chances and rewrite it.
12040  # Note: m4 eats our [], so we need to use [ and ] instead.
12041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12042  if test "x$has_forbidden_chars" != x; then
12043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12045  fi
12046
12047
12048  windows_path="$new_path"
12049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12050    unix_path=`$CYGPATH -u "$windows_path"`
12051    new_path="$unix_path"
12052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12054    new_path="$unix_path"
12055  fi
12056
12057  if test "x$path" != "x$new_path"; then
12058    BOOT_JDK="$new_path"
12059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12061  fi
12062
12063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12065
12066  else
12067    # We're on a posix platform. Hooray! :)
12068    path="$BOOT_JDK"
12069    has_space=`$ECHO "$path" | $GREP " "`
12070    if test "x$has_space" != x; then
12071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12073      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12074    fi
12075
12076    # Use eval to expand a potential ~
12077    eval path="$path"
12078    if test ! -f "$path" && test ! -d "$path"; then
12079      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12080    fi
12081
12082    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12083  fi
12084
12085              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12086$as_echo_n "checking for Boot JDK... " >&6; }
12087              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12088$as_echo "$BOOT_JDK" >&6; }
12089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12090$as_echo_n "checking Boot JDK version... " >&6; }
12091              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12092              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12093$as_echo "$BOOT_JDK_VERSION" >&6; }
12094            fi # end check jdk version
12095          fi # end check rt.jar
12096        fi # end check javac
12097      fi # end check java
12098    fi # end check boot jdk found
12099  fi
12100
12101
12102# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12103
12104  if test "x$BOOT_JDK_FOUND" = xno; then
12105    # Now execute the test
12106
12107    # Extract the first word of "javac", so it can be a program name with args.
12108set dummy javac; ac_word=$2
12109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12110$as_echo_n "checking for $ac_word... " >&6; }
12111if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12112  $as_echo_n "(cached) " >&6
12113else
12114  case $JAVAC_CHECK in
12115  [\\/]* | ?:[\\/]*)
12116  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12117  ;;
12118  *)
12119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12120for as_dir in $PATH
12121do
12122  IFS=$as_save_IFS
12123  test -z "$as_dir" && as_dir=.
12124    for ac_exec_ext in '' $ac_executable_extensions; do
12125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12126    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12128    break 2
12129  fi
12130done
12131  done
12132IFS=$as_save_IFS
12133
12134  ;;
12135esac
12136fi
12137JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12138if test -n "$JAVAC_CHECK"; then
12139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12140$as_echo "$JAVAC_CHECK" >&6; }
12141else
12142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12143$as_echo "no" >&6; }
12144fi
12145
12146
12147    # Extract the first word of "java", so it can be a program name with args.
12148set dummy java; ac_word=$2
12149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12150$as_echo_n "checking for $ac_word... " >&6; }
12151if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154  case $JAVA_CHECK in
12155  [\\/]* | ?:[\\/]*)
12156  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12157  ;;
12158  *)
12159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160for as_dir in $PATH
12161do
12162  IFS=$as_save_IFS
12163  test -z "$as_dir" && as_dir=.
12164    for ac_exec_ext in '' $ac_executable_extensions; do
12165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12166    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12168    break 2
12169  fi
12170done
12171  done
12172IFS=$as_save_IFS
12173
12174  ;;
12175esac
12176fi
12177JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12178if test -n "$JAVA_CHECK"; then
12179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12180$as_echo "$JAVA_CHECK" >&6; }
12181else
12182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12183$as_echo "no" >&6; }
12184fi
12185
12186
12187    BINARY="$JAVAC_CHECK"
12188    if test "x$JAVAC_CHECK" = x; then
12189        BINARY="$JAVA_CHECK"
12190    fi
12191    if test "x$BINARY" != x; then
12192        # So there is a java(c) binary, it might be part of a JDK.
12193        # Lets find the JDK/JRE directory by following symbolic links.
12194        # Linux/GNU systems often have links from /usr/bin/java to
12195        # /etc/alternatives/java to the real JDK binary.
12196
12197    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12198        # Follow a chain of symbolic links. Use readlink
12199        # where it exists, else fall back to horribly
12200        # complicated shell code.
12201        if test "x$READLINK_TESTED" != yes; then
12202            # On MacOSX there is a readlink tool with a different
12203            # purpose than the GNU readlink tool. Check the found readlink.
12204            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12205            if test "x$ISGNU" = x; then
12206                 # A readlink that we do not know how to use.
12207                 # Are there other non-GNU readlinks out there?
12208                 READLINK_TESTED=yes
12209                 READLINK=
12210            fi
12211        fi
12212
12213        if test "x$READLINK" != x; then
12214            BINARY=`$READLINK -f $BINARY`
12215        else
12216            # Save the current directory for restoring afterwards
12217            STARTDIR=$PWD
12218            COUNTER=0
12219            sym_link_dir=`$DIRNAME $BINARY`
12220            sym_link_file=`$BASENAME $BINARY`
12221            cd $sym_link_dir
12222            # Use -P flag to resolve symlinks in directories.
12223            cd `$THEPWDCMD -P`
12224            sym_link_dir=`$THEPWDCMD -P`
12225            # Resolve file symlinks
12226            while test $COUNTER -lt 20; do
12227                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12228                if test "x$ISLINK" == x; then
12229                    # This is not a symbolic link! We are done!
12230                    break
12231                fi
12232                # Again resolve directory symlinks since the target of the just found
12233                # link could be in a different directory
12234                cd `$DIRNAME $ISLINK`
12235                sym_link_dir=`$THEPWDCMD -P`
12236                sym_link_file=`$BASENAME $ISLINK`
12237                let COUNTER=COUNTER+1
12238            done
12239            cd $STARTDIR
12240            BINARY=$sym_link_dir/$sym_link_file
12241        fi
12242    fi
12243
12244        BOOT_JDK=`dirname "$BINARY"`
12245        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12246        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12247            # Looks like we found ourselves an JDK
12248            BOOT_JDK_FOUND=maybe
12249            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12250$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12251        fi
12252    fi
12253
12254
12255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12256    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12257      # Do we have a bin/java?
12258      if test ! -x "$BOOT_JDK/bin/java"; then
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12261        BOOT_JDK_FOUND=no
12262      else
12263        # Do we have a bin/javac?
12264        if test ! -x "$BOOT_JDK/bin/javac"; then
12265          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12267          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12268$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12269          BOOT_JDK_FOUND=no
12270        else
12271          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12272          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12273            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12275            BOOT_JDK_FOUND=no
12276          else
12277            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12278            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12279
12280            # Extra M4 quote needed to protect [] in grep expression.
12281            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12282            if test "x$FOUND_VERSION_78" = x; then
12283              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12285              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12286$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12287              BOOT_JDK_FOUND=no
12288            else
12289              # We're done! :-)
12290              BOOT_JDK_FOUND=yes
12291
12292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12293
12294  # Input might be given as Windows format, start by converting to
12295  # unix format.
12296  path="$BOOT_JDK"
12297  new_path=`$CYGPATH -u "$path"`
12298
12299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12302  # "foo.exe" is OK but "foo" is an error.
12303  #
12304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12305  # It is also a way to make sure we got the proper file name for the real test later on.
12306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12307  if test "x$test_shortpath" = x; then
12308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12310    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12311  fi
12312
12313  # Call helper function which possibly converts this using DOS-style short mode.
12314  # If so, the updated path is stored in $new_path.
12315
12316  input_path="$new_path"
12317  # Check if we need to convert this using DOS-style short mode. If the path
12318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12319  # take no chances and rewrite it.
12320  # Note: m4 eats our [], so we need to use [ and ] instead.
12321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12322  if test "x$has_forbidden_chars" != x; then
12323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12327      # Going to short mode and back again did indeed matter. Since short mode is
12328      # case insensitive, let's make it lowercase to improve readability.
12329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12330      # Now convert it back to Unix-stile (cygpath)
12331      input_path=`$CYGPATH -u "$shortmode_path"`
12332      new_path="$input_path"
12333    fi
12334  fi
12335
12336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12337  if test "x$test_cygdrive_prefix" = x; then
12338    # As a simple fix, exclude /usr/bin since it's not a real path.
12339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12341      # a path prefixed by /cygdrive for fixpath to work.
12342      new_path="$CYGWIN_ROOT_PATH$input_path"
12343    fi
12344  fi
12345
12346
12347  if test "x$path" != "x$new_path"; then
12348    BOOT_JDK="$new_path"
12349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12351  fi
12352
12353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12354
12355  path="$BOOT_JDK"
12356  has_colon=`$ECHO $path | $GREP ^.:`
12357  new_path="$path"
12358  if test "x$has_colon" = x; then
12359    # Not in mixed or Windows style, start by that.
12360    new_path=`cmd //c echo $path`
12361  fi
12362
12363
12364  input_path="$new_path"
12365  # Check if we need to convert this using DOS-style short mode. If the path
12366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12367  # take no chances and rewrite it.
12368  # Note: m4 eats our [], so we need to use [ and ] instead.
12369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12370  if test "x$has_forbidden_chars" != x; then
12371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12373  fi
12374
12375
12376  windows_path="$new_path"
12377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12378    unix_path=`$CYGPATH -u "$windows_path"`
12379    new_path="$unix_path"
12380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12382    new_path="$unix_path"
12383  fi
12384
12385  if test "x$path" != "x$new_path"; then
12386    BOOT_JDK="$new_path"
12387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12389  fi
12390
12391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12393
12394  else
12395    # We're on a posix platform. Hooray! :)
12396    path="$BOOT_JDK"
12397    has_space=`$ECHO "$path" | $GREP " "`
12398    if test "x$has_space" != x; then
12399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12402    fi
12403
12404    # Use eval to expand a potential ~
12405    eval path="$path"
12406    if test ! -f "$path" && test ! -d "$path"; then
12407      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12408    fi
12409
12410    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12411  fi
12412
12413              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12414$as_echo_n "checking for Boot JDK... " >&6; }
12415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12416$as_echo "$BOOT_JDK" >&6; }
12417              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12418$as_echo_n "checking Boot JDK version... " >&6; }
12419              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12420              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12421$as_echo "$BOOT_JDK_VERSION" >&6; }
12422            fi # end check jdk version
12423          fi # end check rt.jar
12424        fi # end check javac
12425      fi # end check java
12426    fi # end check boot jdk found
12427  fi
12428
12429
12430# Test: Is there a JDK installed in default, well-known locations?
12431
12432  if test "x$BOOT_JDK_FOUND" = xno; then
12433    # Now execute the test
12434
12435  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12436
12437  if test "x$BOOT_JDK_FOUND" = xno; then
12438    # Now execute the test
12439
12440  if test "x$ProgramW6432" != x; then
12441    VIRTUAL_DIR="$ProgramW6432/Java"
12442
12443  windows_path="$VIRTUAL_DIR"
12444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12445    unix_path=`$CYGPATH -u "$windows_path"`
12446    VIRTUAL_DIR="$unix_path"
12447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12449    VIRTUAL_DIR="$unix_path"
12450  fi
12451
12452
12453  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12454  BOOT_JDK_SUFFIX=""
12455  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12456  if test "x$ALL_JDKS_FOUND" != x; then
12457    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12458
12459  if test "x$BOOT_JDK_FOUND" = xno; then
12460    # Now execute the test
12461
12462        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12463        if test -d "$BOOT_JDK"; then
12464          BOOT_JDK_FOUND=maybe
12465          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12466$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12467        fi
12468
12469
12470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12472      # Do we have a bin/java?
12473      if test ! -x "$BOOT_JDK/bin/java"; then
12474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12476        BOOT_JDK_FOUND=no
12477      else
12478        # Do we have a bin/javac?
12479        if test ! -x "$BOOT_JDK/bin/javac"; then
12480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12484          BOOT_JDK_FOUND=no
12485        else
12486          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12487          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12488            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12490            BOOT_JDK_FOUND=no
12491          else
12492            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12493            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12494
12495            # Extra M4 quote needed to protect [] in grep expression.
12496            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12497            if test "x$FOUND_VERSION_78" = x; then
12498              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12500              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12501$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12502              BOOT_JDK_FOUND=no
12503            else
12504              # We're done! :-)
12505              BOOT_JDK_FOUND=yes
12506
12507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12508
12509  # Input might be given as Windows format, start by converting to
12510  # unix format.
12511  path="$BOOT_JDK"
12512  new_path=`$CYGPATH -u "$path"`
12513
12514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12517  # "foo.exe" is OK but "foo" is an error.
12518  #
12519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12520  # It is also a way to make sure we got the proper file name for the real test later on.
12521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12522  if test "x$test_shortpath" = x; then
12523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12525    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12526  fi
12527
12528  # Call helper function which possibly converts this using DOS-style short mode.
12529  # If so, the updated path is stored in $new_path.
12530
12531  input_path="$new_path"
12532  # Check if we need to convert this using DOS-style short mode. If the path
12533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12534  # take no chances and rewrite it.
12535  # Note: m4 eats our [], so we need to use [ and ] instead.
12536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12537  if test "x$has_forbidden_chars" != x; then
12538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12542      # Going to short mode and back again did indeed matter. Since short mode is
12543      # case insensitive, let's make it lowercase to improve readability.
12544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12545      # Now convert it back to Unix-stile (cygpath)
12546      input_path=`$CYGPATH -u "$shortmode_path"`
12547      new_path="$input_path"
12548    fi
12549  fi
12550
12551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12552  if test "x$test_cygdrive_prefix" = x; then
12553    # As a simple fix, exclude /usr/bin since it's not a real path.
12554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12556      # a path prefixed by /cygdrive for fixpath to work.
12557      new_path="$CYGWIN_ROOT_PATH$input_path"
12558    fi
12559  fi
12560
12561
12562  if test "x$path" != "x$new_path"; then
12563    BOOT_JDK="$new_path"
12564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12566  fi
12567
12568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12569
12570  path="$BOOT_JDK"
12571  has_colon=`$ECHO $path | $GREP ^.:`
12572  new_path="$path"
12573  if test "x$has_colon" = x; then
12574    # Not in mixed or Windows style, start by that.
12575    new_path=`cmd //c echo $path`
12576  fi
12577
12578
12579  input_path="$new_path"
12580  # Check if we need to convert this using DOS-style short mode. If the path
12581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12582  # take no chances and rewrite it.
12583  # Note: m4 eats our [], so we need to use [ and ] instead.
12584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12585  if test "x$has_forbidden_chars" != x; then
12586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588  fi
12589
12590
12591  windows_path="$new_path"
12592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12593    unix_path=`$CYGPATH -u "$windows_path"`
12594    new_path="$unix_path"
12595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12597    new_path="$unix_path"
12598  fi
12599
12600  if test "x$path" != "x$new_path"; then
12601    BOOT_JDK="$new_path"
12602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12604  fi
12605
12606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12608
12609  else
12610    # We're on a posix platform. Hooray! :)
12611    path="$BOOT_JDK"
12612    has_space=`$ECHO "$path" | $GREP " "`
12613    if test "x$has_space" != x; then
12614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12616      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12617    fi
12618
12619    # Use eval to expand a potential ~
12620    eval path="$path"
12621    if test ! -f "$path" && test ! -d "$path"; then
12622      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12623    fi
12624
12625    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12626  fi
12627
12628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12629$as_echo_n "checking for Boot JDK... " >&6; }
12630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12631$as_echo "$BOOT_JDK" >&6; }
12632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12633$as_echo_n "checking Boot JDK version... " >&6; }
12634              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12636$as_echo "$BOOT_JDK_VERSION" >&6; }
12637            fi # end check jdk version
12638          fi # end check rt.jar
12639        fi # end check javac
12640      fi # end check java
12641    fi # end check boot jdk found
12642  fi
12643
12644    done
12645  fi
12646
12647  fi
12648
12649
12650    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12651    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12652      # Do we have a bin/java?
12653      if test ! -x "$BOOT_JDK/bin/java"; then
12654        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12656        BOOT_JDK_FOUND=no
12657      else
12658        # Do we have a bin/javac?
12659        if test ! -x "$BOOT_JDK/bin/javac"; then
12660          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12662          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12663$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12664          BOOT_JDK_FOUND=no
12665        else
12666          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12667          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12668            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12670            BOOT_JDK_FOUND=no
12671          else
12672            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12674
12675            # Extra M4 quote needed to protect [] in grep expression.
12676            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12677            if test "x$FOUND_VERSION_78" = x; then
12678              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12680              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12681$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12682              BOOT_JDK_FOUND=no
12683            else
12684              # We're done! :-)
12685              BOOT_JDK_FOUND=yes
12686
12687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12688
12689  # Input might be given as Windows format, start by converting to
12690  # unix format.
12691  path="$BOOT_JDK"
12692  new_path=`$CYGPATH -u "$path"`
12693
12694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12697  # "foo.exe" is OK but "foo" is an error.
12698  #
12699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12700  # It is also a way to make sure we got the proper file name for the real test later on.
12701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12702  if test "x$test_shortpath" = x; then
12703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12705    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12706  fi
12707
12708  # Call helper function which possibly converts this using DOS-style short mode.
12709  # If so, the updated path is stored in $new_path.
12710
12711  input_path="$new_path"
12712  # Check if we need to convert this using DOS-style short mode. If the path
12713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12714  # take no chances and rewrite it.
12715  # Note: m4 eats our [], so we need to use [ and ] instead.
12716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12717  if test "x$has_forbidden_chars" != x; then
12718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12722      # Going to short mode and back again did indeed matter. Since short mode is
12723      # case insensitive, let's make it lowercase to improve readability.
12724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12725      # Now convert it back to Unix-stile (cygpath)
12726      input_path=`$CYGPATH -u "$shortmode_path"`
12727      new_path="$input_path"
12728    fi
12729  fi
12730
12731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12732  if test "x$test_cygdrive_prefix" = x; then
12733    # As a simple fix, exclude /usr/bin since it's not a real path.
12734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12736      # a path prefixed by /cygdrive for fixpath to work.
12737      new_path="$CYGWIN_ROOT_PATH$input_path"
12738    fi
12739  fi
12740
12741
12742  if test "x$path" != "x$new_path"; then
12743    BOOT_JDK="$new_path"
12744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12746  fi
12747
12748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12749
12750  path="$BOOT_JDK"
12751  has_colon=`$ECHO $path | $GREP ^.:`
12752  new_path="$path"
12753  if test "x$has_colon" = x; then
12754    # Not in mixed or Windows style, start by that.
12755    new_path=`cmd //c echo $path`
12756  fi
12757
12758
12759  input_path="$new_path"
12760  # Check if we need to convert this using DOS-style short mode. If the path
12761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12762  # take no chances and rewrite it.
12763  # Note: m4 eats our [], so we need to use [ and ] instead.
12764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12765  if test "x$has_forbidden_chars" != x; then
12766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12768  fi
12769
12770
12771  windows_path="$new_path"
12772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12773    unix_path=`$CYGPATH -u "$windows_path"`
12774    new_path="$unix_path"
12775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12777    new_path="$unix_path"
12778  fi
12779
12780  if test "x$path" != "x$new_path"; then
12781    BOOT_JDK="$new_path"
12782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12784  fi
12785
12786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12788
12789  else
12790    # We're on a posix platform. Hooray! :)
12791    path="$BOOT_JDK"
12792    has_space=`$ECHO "$path" | $GREP " "`
12793    if test "x$has_space" != x; then
12794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12796      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12797    fi
12798
12799    # Use eval to expand a potential ~
12800    eval path="$path"
12801    if test ! -f "$path" && test ! -d "$path"; then
12802      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12803    fi
12804
12805    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12806  fi
12807
12808              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12809$as_echo_n "checking for Boot JDK... " >&6; }
12810              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12811$as_echo "$BOOT_JDK" >&6; }
12812              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12813$as_echo_n "checking Boot JDK version... " >&6; }
12814              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12815              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12816$as_echo "$BOOT_JDK_VERSION" >&6; }
12817            fi # end check jdk version
12818          fi # end check rt.jar
12819        fi # end check javac
12820      fi # end check java
12821    fi # end check boot jdk found
12822  fi
12823
12824
12825  if test "x$BOOT_JDK_FOUND" = xno; then
12826    # Now execute the test
12827
12828  if test "x$PROGRAMW6432" != x; then
12829    VIRTUAL_DIR="$PROGRAMW6432/Java"
12830
12831  windows_path="$VIRTUAL_DIR"
12832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12833    unix_path=`$CYGPATH -u "$windows_path"`
12834    VIRTUAL_DIR="$unix_path"
12835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12837    VIRTUAL_DIR="$unix_path"
12838  fi
12839
12840
12841  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12842  BOOT_JDK_SUFFIX=""
12843  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12844  if test "x$ALL_JDKS_FOUND" != x; then
12845    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12846
12847  if test "x$BOOT_JDK_FOUND" = xno; then
12848    # Now execute the test
12849
12850        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12851        if test -d "$BOOT_JDK"; then
12852          BOOT_JDK_FOUND=maybe
12853          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12854$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12855        fi
12856
12857
12858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12860      # Do we have a bin/java?
12861      if test ! -x "$BOOT_JDK/bin/java"; then
12862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12864        BOOT_JDK_FOUND=no
12865      else
12866        # Do we have a bin/javac?
12867        if test ! -x "$BOOT_JDK/bin/javac"; then
12868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12872          BOOT_JDK_FOUND=no
12873        else
12874          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12875          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12876            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12878            BOOT_JDK_FOUND=no
12879          else
12880            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12881            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12882
12883            # Extra M4 quote needed to protect [] in grep expression.
12884            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12885            if test "x$FOUND_VERSION_78" = x; then
12886              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12888              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12889$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12890              BOOT_JDK_FOUND=no
12891            else
12892              # We're done! :-)
12893              BOOT_JDK_FOUND=yes
12894
12895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12896
12897  # Input might be given as Windows format, start by converting to
12898  # unix format.
12899  path="$BOOT_JDK"
12900  new_path=`$CYGPATH -u "$path"`
12901
12902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12905  # "foo.exe" is OK but "foo" is an error.
12906  #
12907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12908  # It is also a way to make sure we got the proper file name for the real test later on.
12909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12910  if test "x$test_shortpath" = x; then
12911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12913    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12914  fi
12915
12916  # Call helper function which possibly converts this using DOS-style short mode.
12917  # If so, the updated path is stored in $new_path.
12918
12919  input_path="$new_path"
12920  # Check if we need to convert this using DOS-style short mode. If the path
12921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12922  # take no chances and rewrite it.
12923  # Note: m4 eats our [], so we need to use [ and ] instead.
12924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12925  if test "x$has_forbidden_chars" != x; then
12926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12930      # Going to short mode and back again did indeed matter. Since short mode is
12931      # case insensitive, let's make it lowercase to improve readability.
12932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12933      # Now convert it back to Unix-stile (cygpath)
12934      input_path=`$CYGPATH -u "$shortmode_path"`
12935      new_path="$input_path"
12936    fi
12937  fi
12938
12939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12940  if test "x$test_cygdrive_prefix" = x; then
12941    # As a simple fix, exclude /usr/bin since it's not a real path.
12942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12944      # a path prefixed by /cygdrive for fixpath to work.
12945      new_path="$CYGWIN_ROOT_PATH$input_path"
12946    fi
12947  fi
12948
12949
12950  if test "x$path" != "x$new_path"; then
12951    BOOT_JDK="$new_path"
12952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12954  fi
12955
12956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12957
12958  path="$BOOT_JDK"
12959  has_colon=`$ECHO $path | $GREP ^.:`
12960  new_path="$path"
12961  if test "x$has_colon" = x; then
12962    # Not in mixed or Windows style, start by that.
12963    new_path=`cmd //c echo $path`
12964  fi
12965
12966
12967  input_path="$new_path"
12968  # Check if we need to convert this using DOS-style short mode. If the path
12969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12970  # take no chances and rewrite it.
12971  # Note: m4 eats our [], so we need to use [ and ] instead.
12972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12973  if test "x$has_forbidden_chars" != x; then
12974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976  fi
12977
12978
12979  windows_path="$new_path"
12980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12981    unix_path=`$CYGPATH -u "$windows_path"`
12982    new_path="$unix_path"
12983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12985    new_path="$unix_path"
12986  fi
12987
12988  if test "x$path" != "x$new_path"; then
12989    BOOT_JDK="$new_path"
12990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12992  fi
12993
12994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12996
12997  else
12998    # We're on a posix platform. Hooray! :)
12999    path="$BOOT_JDK"
13000    has_space=`$ECHO "$path" | $GREP " "`
13001    if test "x$has_space" != x; then
13002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13004      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13005    fi
13006
13007    # Use eval to expand a potential ~
13008    eval path="$path"
13009    if test ! -f "$path" && test ! -d "$path"; then
13010      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13011    fi
13012
13013    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13014  fi
13015
13016              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13017$as_echo_n "checking for Boot JDK... " >&6; }
13018              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13019$as_echo "$BOOT_JDK" >&6; }
13020              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13021$as_echo_n "checking Boot JDK version... " >&6; }
13022              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13024$as_echo "$BOOT_JDK_VERSION" >&6; }
13025            fi # end check jdk version
13026          fi # end check rt.jar
13027        fi # end check javac
13028      fi # end check java
13029    fi # end check boot jdk found
13030  fi
13031
13032    done
13033  fi
13034
13035  fi
13036
13037
13038    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13039    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13040      # Do we have a bin/java?
13041      if test ! -x "$BOOT_JDK/bin/java"; then
13042        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13044        BOOT_JDK_FOUND=no
13045      else
13046        # Do we have a bin/javac?
13047        if test ! -x "$BOOT_JDK/bin/javac"; then
13048          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13050          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13051$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13052          BOOT_JDK_FOUND=no
13053        else
13054          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13055          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13056            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13058            BOOT_JDK_FOUND=no
13059          else
13060            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13062
13063            # Extra M4 quote needed to protect [] in grep expression.
13064            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13065            if test "x$FOUND_VERSION_78" = x; then
13066              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13068              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13069$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13070              BOOT_JDK_FOUND=no
13071            else
13072              # We're done! :-)
13073              BOOT_JDK_FOUND=yes
13074
13075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13076
13077  # Input might be given as Windows format, start by converting to
13078  # unix format.
13079  path="$BOOT_JDK"
13080  new_path=`$CYGPATH -u "$path"`
13081
13082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13085  # "foo.exe" is OK but "foo" is an error.
13086  #
13087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13088  # It is also a way to make sure we got the proper file name for the real test later on.
13089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13090  if test "x$test_shortpath" = x; then
13091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13093    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13094  fi
13095
13096  # Call helper function which possibly converts this using DOS-style short mode.
13097  # If so, the updated path is stored in $new_path.
13098
13099  input_path="$new_path"
13100  # Check if we need to convert this using DOS-style short mode. If the path
13101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13102  # take no chances and rewrite it.
13103  # Note: m4 eats our [], so we need to use [ and ] instead.
13104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13105  if test "x$has_forbidden_chars" != x; then
13106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13110      # Going to short mode and back again did indeed matter. Since short mode is
13111      # case insensitive, let's make it lowercase to improve readability.
13112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13113      # Now convert it back to Unix-stile (cygpath)
13114      input_path=`$CYGPATH -u "$shortmode_path"`
13115      new_path="$input_path"
13116    fi
13117  fi
13118
13119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13120  if test "x$test_cygdrive_prefix" = x; then
13121    # As a simple fix, exclude /usr/bin since it's not a real path.
13122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13124      # a path prefixed by /cygdrive for fixpath to work.
13125      new_path="$CYGWIN_ROOT_PATH$input_path"
13126    fi
13127  fi
13128
13129
13130  if test "x$path" != "x$new_path"; then
13131    BOOT_JDK="$new_path"
13132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13134  fi
13135
13136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13137
13138  path="$BOOT_JDK"
13139  has_colon=`$ECHO $path | $GREP ^.:`
13140  new_path="$path"
13141  if test "x$has_colon" = x; then
13142    # Not in mixed or Windows style, start by that.
13143    new_path=`cmd //c echo $path`
13144  fi
13145
13146
13147  input_path="$new_path"
13148  # Check if we need to convert this using DOS-style short mode. If the path
13149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13150  # take no chances and rewrite it.
13151  # Note: m4 eats our [], so we need to use [ and ] instead.
13152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13153  if test "x$has_forbidden_chars" != x; then
13154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13156  fi
13157
13158
13159  windows_path="$new_path"
13160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13161    unix_path=`$CYGPATH -u "$windows_path"`
13162    new_path="$unix_path"
13163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13165    new_path="$unix_path"
13166  fi
13167
13168  if test "x$path" != "x$new_path"; then
13169    BOOT_JDK="$new_path"
13170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13172  fi
13173
13174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13176
13177  else
13178    # We're on a posix platform. Hooray! :)
13179    path="$BOOT_JDK"
13180    has_space=`$ECHO "$path" | $GREP " "`
13181    if test "x$has_space" != x; then
13182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13183$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13184      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13185    fi
13186
13187    # Use eval to expand a potential ~
13188    eval path="$path"
13189    if test ! -f "$path" && test ! -d "$path"; then
13190      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13191    fi
13192
13193    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13194  fi
13195
13196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13197$as_echo_n "checking for Boot JDK... " >&6; }
13198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13199$as_echo "$BOOT_JDK" >&6; }
13200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13201$as_echo_n "checking Boot JDK version... " >&6; }
13202              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13204$as_echo "$BOOT_JDK_VERSION" >&6; }
13205            fi # end check jdk version
13206          fi # end check rt.jar
13207        fi # end check javac
13208      fi # end check java
13209    fi # end check boot jdk found
13210  fi
13211
13212
13213  if test "x$BOOT_JDK_FOUND" = xno; then
13214    # Now execute the test
13215
13216  if test "x$PROGRAMFILES" != x; then
13217    VIRTUAL_DIR="$PROGRAMFILES/Java"
13218
13219  windows_path="$VIRTUAL_DIR"
13220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13221    unix_path=`$CYGPATH -u "$windows_path"`
13222    VIRTUAL_DIR="$unix_path"
13223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13225    VIRTUAL_DIR="$unix_path"
13226  fi
13227
13228
13229  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13230  BOOT_JDK_SUFFIX=""
13231  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13232  if test "x$ALL_JDKS_FOUND" != x; then
13233    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13234
13235  if test "x$BOOT_JDK_FOUND" = xno; then
13236    # Now execute the test
13237
13238        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13239        if test -d "$BOOT_JDK"; then
13240          BOOT_JDK_FOUND=maybe
13241          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13242$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13243        fi
13244
13245
13246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13248      # Do we have a bin/java?
13249      if test ! -x "$BOOT_JDK/bin/java"; then
13250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13252        BOOT_JDK_FOUND=no
13253      else
13254        # Do we have a bin/javac?
13255        if test ! -x "$BOOT_JDK/bin/javac"; then
13256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13260          BOOT_JDK_FOUND=no
13261        else
13262          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13263          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13266            BOOT_JDK_FOUND=no
13267          else
13268            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13269            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13270
13271            # Extra M4 quote needed to protect [] in grep expression.
13272            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13273            if test "x$FOUND_VERSION_78" = x; then
13274              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13276              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13277$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13278              BOOT_JDK_FOUND=no
13279            else
13280              # We're done! :-)
13281              BOOT_JDK_FOUND=yes
13282
13283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13284
13285  # Input might be given as Windows format, start by converting to
13286  # unix format.
13287  path="$BOOT_JDK"
13288  new_path=`$CYGPATH -u "$path"`
13289
13290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13293  # "foo.exe" is OK but "foo" is an error.
13294  #
13295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13296  # It is also a way to make sure we got the proper file name for the real test later on.
13297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13298  if test "x$test_shortpath" = x; then
13299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13301    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13302  fi
13303
13304  # Call helper function which possibly converts this using DOS-style short mode.
13305  # If so, the updated path is stored in $new_path.
13306
13307  input_path="$new_path"
13308  # Check if we need to convert this using DOS-style short mode. If the path
13309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13310  # take no chances and rewrite it.
13311  # Note: m4 eats our [], so we need to use [ and ] instead.
13312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13313  if test "x$has_forbidden_chars" != x; then
13314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13318      # Going to short mode and back again did indeed matter. Since short mode is
13319      # case insensitive, let's make it lowercase to improve readability.
13320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13321      # Now convert it back to Unix-stile (cygpath)
13322      input_path=`$CYGPATH -u "$shortmode_path"`
13323      new_path="$input_path"
13324    fi
13325  fi
13326
13327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13328  if test "x$test_cygdrive_prefix" = x; then
13329    # As a simple fix, exclude /usr/bin since it's not a real path.
13330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13332      # a path prefixed by /cygdrive for fixpath to work.
13333      new_path="$CYGWIN_ROOT_PATH$input_path"
13334    fi
13335  fi
13336
13337
13338  if test "x$path" != "x$new_path"; then
13339    BOOT_JDK="$new_path"
13340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13342  fi
13343
13344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13345
13346  path="$BOOT_JDK"
13347  has_colon=`$ECHO $path | $GREP ^.:`
13348  new_path="$path"
13349  if test "x$has_colon" = x; then
13350    # Not in mixed or Windows style, start by that.
13351    new_path=`cmd //c echo $path`
13352  fi
13353
13354
13355  input_path="$new_path"
13356  # Check if we need to convert this using DOS-style short mode. If the path
13357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13358  # take no chances and rewrite it.
13359  # Note: m4 eats our [], so we need to use [ and ] instead.
13360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13361  if test "x$has_forbidden_chars" != x; then
13362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364  fi
13365
13366
13367  windows_path="$new_path"
13368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13369    unix_path=`$CYGPATH -u "$windows_path"`
13370    new_path="$unix_path"
13371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13373    new_path="$unix_path"
13374  fi
13375
13376  if test "x$path" != "x$new_path"; then
13377    BOOT_JDK="$new_path"
13378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13380  fi
13381
13382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13384
13385  else
13386    # We're on a posix platform. Hooray! :)
13387    path="$BOOT_JDK"
13388    has_space=`$ECHO "$path" | $GREP " "`
13389    if test "x$has_space" != x; then
13390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13392      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13393    fi
13394
13395    # Use eval to expand a potential ~
13396    eval path="$path"
13397    if test ! -f "$path" && test ! -d "$path"; then
13398      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13399    fi
13400
13401    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13402  fi
13403
13404              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13405$as_echo_n "checking for Boot JDK... " >&6; }
13406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13407$as_echo "$BOOT_JDK" >&6; }
13408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13409$as_echo_n "checking Boot JDK version... " >&6; }
13410              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13411              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13412$as_echo "$BOOT_JDK_VERSION" >&6; }
13413            fi # end check jdk version
13414          fi # end check rt.jar
13415        fi # end check javac
13416      fi # end check java
13417    fi # end check boot jdk found
13418  fi
13419
13420    done
13421  fi
13422
13423  fi
13424
13425
13426    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13427    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13428      # Do we have a bin/java?
13429      if test ! -x "$BOOT_JDK/bin/java"; then
13430        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13432        BOOT_JDK_FOUND=no
13433      else
13434        # Do we have a bin/javac?
13435        if test ! -x "$BOOT_JDK/bin/javac"; then
13436          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13438          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13439$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13440          BOOT_JDK_FOUND=no
13441        else
13442          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13443          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13446            BOOT_JDK_FOUND=no
13447          else
13448            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13449            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13450
13451            # Extra M4 quote needed to protect [] in grep expression.
13452            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13453            if test "x$FOUND_VERSION_78" = x; then
13454              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13456              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13457$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13458              BOOT_JDK_FOUND=no
13459            else
13460              # We're done! :-)
13461              BOOT_JDK_FOUND=yes
13462
13463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13464
13465  # Input might be given as Windows format, start by converting to
13466  # unix format.
13467  path="$BOOT_JDK"
13468  new_path=`$CYGPATH -u "$path"`
13469
13470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13473  # "foo.exe" is OK but "foo" is an error.
13474  #
13475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13476  # It is also a way to make sure we got the proper file name for the real test later on.
13477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13478  if test "x$test_shortpath" = x; then
13479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13482  fi
13483
13484  # Call helper function which possibly converts this using DOS-style short mode.
13485  # If so, the updated path is stored in $new_path.
13486
13487  input_path="$new_path"
13488  # Check if we need to convert this using DOS-style short mode. If the path
13489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13490  # take no chances and rewrite it.
13491  # Note: m4 eats our [], so we need to use [ and ] instead.
13492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13493  if test "x$has_forbidden_chars" != x; then
13494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13498      # Going to short mode and back again did indeed matter. Since short mode is
13499      # case insensitive, let's make it lowercase to improve readability.
13500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13501      # Now convert it back to Unix-stile (cygpath)
13502      input_path=`$CYGPATH -u "$shortmode_path"`
13503      new_path="$input_path"
13504    fi
13505  fi
13506
13507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13508  if test "x$test_cygdrive_prefix" = x; then
13509    # As a simple fix, exclude /usr/bin since it's not a real path.
13510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13512      # a path prefixed by /cygdrive for fixpath to work.
13513      new_path="$CYGWIN_ROOT_PATH$input_path"
13514    fi
13515  fi
13516
13517
13518  if test "x$path" != "x$new_path"; then
13519    BOOT_JDK="$new_path"
13520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13522  fi
13523
13524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13525
13526  path="$BOOT_JDK"
13527  has_colon=`$ECHO $path | $GREP ^.:`
13528  new_path="$path"
13529  if test "x$has_colon" = x; then
13530    # Not in mixed or Windows style, start by that.
13531    new_path=`cmd //c echo $path`
13532  fi
13533
13534
13535  input_path="$new_path"
13536  # Check if we need to convert this using DOS-style short mode. If the path
13537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13538  # take no chances and rewrite it.
13539  # Note: m4 eats our [], so we need to use [ and ] instead.
13540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13541  if test "x$has_forbidden_chars" != x; then
13542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13544  fi
13545
13546
13547  windows_path="$new_path"
13548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13549    unix_path=`$CYGPATH -u "$windows_path"`
13550    new_path="$unix_path"
13551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13553    new_path="$unix_path"
13554  fi
13555
13556  if test "x$path" != "x$new_path"; then
13557    BOOT_JDK="$new_path"
13558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13560  fi
13561
13562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13564
13565  else
13566    # We're on a posix platform. Hooray! :)
13567    path="$BOOT_JDK"
13568    has_space=`$ECHO "$path" | $GREP " "`
13569    if test "x$has_space" != x; then
13570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13573    fi
13574
13575    # Use eval to expand a potential ~
13576    eval path="$path"
13577    if test ! -f "$path" && test ! -d "$path"; then
13578      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13579    fi
13580
13581    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13582  fi
13583
13584              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13585$as_echo_n "checking for Boot JDK... " >&6; }
13586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13587$as_echo "$BOOT_JDK" >&6; }
13588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13589$as_echo_n "checking Boot JDK version... " >&6; }
13590              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13591              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13592$as_echo "$BOOT_JDK_VERSION" >&6; }
13593            fi # end check jdk version
13594          fi # end check rt.jar
13595        fi # end check javac
13596      fi # end check java
13597    fi # end check boot jdk found
13598  fi
13599
13600
13601  if test "x$BOOT_JDK_FOUND" = xno; then
13602    # Now execute the test
13603
13604  if test "x$ProgramFiles" != x; then
13605    VIRTUAL_DIR="$ProgramFiles/Java"
13606
13607  windows_path="$VIRTUAL_DIR"
13608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13609    unix_path=`$CYGPATH -u "$windows_path"`
13610    VIRTUAL_DIR="$unix_path"
13611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13613    VIRTUAL_DIR="$unix_path"
13614  fi
13615
13616
13617  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13618  BOOT_JDK_SUFFIX=""
13619  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13620  if test "x$ALL_JDKS_FOUND" != x; then
13621    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13622
13623  if test "x$BOOT_JDK_FOUND" = xno; then
13624    # Now execute the test
13625
13626        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13627        if test -d "$BOOT_JDK"; then
13628          BOOT_JDK_FOUND=maybe
13629          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13630$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13631        fi
13632
13633
13634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13636      # Do we have a bin/java?
13637      if test ! -x "$BOOT_JDK/bin/java"; then
13638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13640        BOOT_JDK_FOUND=no
13641      else
13642        # Do we have a bin/javac?
13643        if test ! -x "$BOOT_JDK/bin/javac"; then
13644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13648          BOOT_JDK_FOUND=no
13649        else
13650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13654            BOOT_JDK_FOUND=no
13655          else
13656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13658
13659            # Extra M4 quote needed to protect [] in grep expression.
13660            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13661            if test "x$FOUND_VERSION_78" = x; then
13662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13665$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13666              BOOT_JDK_FOUND=no
13667            else
13668              # We're done! :-)
13669              BOOT_JDK_FOUND=yes
13670
13671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13672
13673  # Input might be given as Windows format, start by converting to
13674  # unix format.
13675  path="$BOOT_JDK"
13676  new_path=`$CYGPATH -u "$path"`
13677
13678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13681  # "foo.exe" is OK but "foo" is an error.
13682  #
13683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13684  # It is also a way to make sure we got the proper file name for the real test later on.
13685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13686  if test "x$test_shortpath" = x; then
13687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13690  fi
13691
13692  # Call helper function which possibly converts this using DOS-style short mode.
13693  # If so, the updated path is stored in $new_path.
13694
13695  input_path="$new_path"
13696  # Check if we need to convert this using DOS-style short mode. If the path
13697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13698  # take no chances and rewrite it.
13699  # Note: m4 eats our [], so we need to use [ and ] instead.
13700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13701  if test "x$has_forbidden_chars" != x; then
13702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13706      # Going to short mode and back again did indeed matter. Since short mode is
13707      # case insensitive, let's make it lowercase to improve readability.
13708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13709      # Now convert it back to Unix-stile (cygpath)
13710      input_path=`$CYGPATH -u "$shortmode_path"`
13711      new_path="$input_path"
13712    fi
13713  fi
13714
13715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13716  if test "x$test_cygdrive_prefix" = x; then
13717    # As a simple fix, exclude /usr/bin since it's not a real path.
13718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13720      # a path prefixed by /cygdrive for fixpath to work.
13721      new_path="$CYGWIN_ROOT_PATH$input_path"
13722    fi
13723  fi
13724
13725
13726  if test "x$path" != "x$new_path"; then
13727    BOOT_JDK="$new_path"
13728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13730  fi
13731
13732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13733
13734  path="$BOOT_JDK"
13735  has_colon=`$ECHO $path | $GREP ^.:`
13736  new_path="$path"
13737  if test "x$has_colon" = x; then
13738    # Not in mixed or Windows style, start by that.
13739    new_path=`cmd //c echo $path`
13740  fi
13741
13742
13743  input_path="$new_path"
13744  # Check if we need to convert this using DOS-style short mode. If the path
13745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13746  # take no chances and rewrite it.
13747  # Note: m4 eats our [], so we need to use [ and ] instead.
13748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13749  if test "x$has_forbidden_chars" != x; then
13750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752  fi
13753
13754
13755  windows_path="$new_path"
13756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13757    unix_path=`$CYGPATH -u "$windows_path"`
13758    new_path="$unix_path"
13759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13761    new_path="$unix_path"
13762  fi
13763
13764  if test "x$path" != "x$new_path"; then
13765    BOOT_JDK="$new_path"
13766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13768  fi
13769
13770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13772
13773  else
13774    # We're on a posix platform. Hooray! :)
13775    path="$BOOT_JDK"
13776    has_space=`$ECHO "$path" | $GREP " "`
13777    if test "x$has_space" != x; then
13778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13781    fi
13782
13783    # Use eval to expand a potential ~
13784    eval path="$path"
13785    if test ! -f "$path" && test ! -d "$path"; then
13786      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13787    fi
13788
13789    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13790  fi
13791
13792              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13793$as_echo_n "checking for Boot JDK... " >&6; }
13794              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13795$as_echo "$BOOT_JDK" >&6; }
13796              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13797$as_echo_n "checking Boot JDK version... " >&6; }
13798              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13800$as_echo "$BOOT_JDK_VERSION" >&6; }
13801            fi # end check jdk version
13802          fi # end check rt.jar
13803        fi # end check javac
13804      fi # end check java
13805    fi # end check boot jdk found
13806  fi
13807
13808    done
13809  fi
13810
13811  fi
13812
13813
13814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13816      # Do we have a bin/java?
13817      if test ! -x "$BOOT_JDK/bin/java"; then
13818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13820        BOOT_JDK_FOUND=no
13821      else
13822        # Do we have a bin/javac?
13823        if test ! -x "$BOOT_JDK/bin/javac"; then
13824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13828          BOOT_JDK_FOUND=no
13829        else
13830          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13831          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13832            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13834            BOOT_JDK_FOUND=no
13835          else
13836            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13837            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13838
13839            # Extra M4 quote needed to protect [] in grep expression.
13840            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13841            if test "x$FOUND_VERSION_78" = x; then
13842              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13844              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13845$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13846              BOOT_JDK_FOUND=no
13847            else
13848              # We're done! :-)
13849              BOOT_JDK_FOUND=yes
13850
13851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13852
13853  # Input might be given as Windows format, start by converting to
13854  # unix format.
13855  path="$BOOT_JDK"
13856  new_path=`$CYGPATH -u "$path"`
13857
13858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13861  # "foo.exe" is OK but "foo" is an error.
13862  #
13863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13864  # It is also a way to make sure we got the proper file name for the real test later on.
13865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13866  if test "x$test_shortpath" = x; then
13867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13869    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13870  fi
13871
13872  # Call helper function which possibly converts this using DOS-style short mode.
13873  # If so, the updated path is stored in $new_path.
13874
13875  input_path="$new_path"
13876  # Check if we need to convert this using DOS-style short mode. If the path
13877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13878  # take no chances and rewrite it.
13879  # Note: m4 eats our [], so we need to use [ and ] instead.
13880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13881  if test "x$has_forbidden_chars" != x; then
13882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13886      # Going to short mode and back again did indeed matter. Since short mode is
13887      # case insensitive, let's make it lowercase to improve readability.
13888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13889      # Now convert it back to Unix-stile (cygpath)
13890      input_path=`$CYGPATH -u "$shortmode_path"`
13891      new_path="$input_path"
13892    fi
13893  fi
13894
13895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13896  if test "x$test_cygdrive_prefix" = x; then
13897    # As a simple fix, exclude /usr/bin since it's not a real path.
13898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13900      # a path prefixed by /cygdrive for fixpath to work.
13901      new_path="$CYGWIN_ROOT_PATH$input_path"
13902    fi
13903  fi
13904
13905
13906  if test "x$path" != "x$new_path"; then
13907    BOOT_JDK="$new_path"
13908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13910  fi
13911
13912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13913
13914  path="$BOOT_JDK"
13915  has_colon=`$ECHO $path | $GREP ^.:`
13916  new_path="$path"
13917  if test "x$has_colon" = x; then
13918    # Not in mixed or Windows style, start by that.
13919    new_path=`cmd //c echo $path`
13920  fi
13921
13922
13923  input_path="$new_path"
13924  # Check if we need to convert this using DOS-style short mode. If the path
13925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13926  # take no chances and rewrite it.
13927  # Note: m4 eats our [], so we need to use [ and ] instead.
13928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13929  if test "x$has_forbidden_chars" != x; then
13930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13932  fi
13933
13934
13935  windows_path="$new_path"
13936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13937    unix_path=`$CYGPATH -u "$windows_path"`
13938    new_path="$unix_path"
13939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13941    new_path="$unix_path"
13942  fi
13943
13944  if test "x$path" != "x$new_path"; then
13945    BOOT_JDK="$new_path"
13946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13948  fi
13949
13950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13952
13953  else
13954    # We're on a posix platform. Hooray! :)
13955    path="$BOOT_JDK"
13956    has_space=`$ECHO "$path" | $GREP " "`
13957    if test "x$has_space" != x; then
13958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13961    fi
13962
13963    # Use eval to expand a potential ~
13964    eval path="$path"
13965    if test ! -f "$path" && test ! -d "$path"; then
13966      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13967    fi
13968
13969    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13970  fi
13971
13972              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13973$as_echo_n "checking for Boot JDK... " >&6; }
13974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13975$as_echo "$BOOT_JDK" >&6; }
13976              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13977$as_echo_n "checking Boot JDK version... " >&6; }
13978              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13979              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13980$as_echo "$BOOT_JDK_VERSION" >&6; }
13981            fi # end check jdk version
13982          fi # end check rt.jar
13983        fi # end check javac
13984      fi # end check java
13985    fi # end check boot jdk found
13986  fi
13987
13988
13989  if test "x$BOOT_JDK_FOUND" = xno; then
13990    # Now execute the test
13991
13992  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13993  BOOT_JDK_SUFFIX=""
13994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13995  if test "x$ALL_JDKS_FOUND" != x; then
13996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13997
13998  if test "x$BOOT_JDK_FOUND" = xno; then
13999    # Now execute the test
14000
14001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14002        if test -d "$BOOT_JDK"; then
14003          BOOT_JDK_FOUND=maybe
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14006        fi
14007
14008
14009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14011      # Do we have a bin/java?
14012      if test ! -x "$BOOT_JDK/bin/java"; then
14013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14015        BOOT_JDK_FOUND=no
14016      else
14017        # Do we have a bin/javac?
14018        if test ! -x "$BOOT_JDK/bin/javac"; then
14019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14023          BOOT_JDK_FOUND=no
14024        else
14025          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14026          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14027            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14029            BOOT_JDK_FOUND=no
14030          else
14031            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14032            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14033
14034            # Extra M4 quote needed to protect [] in grep expression.
14035            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14036            if test "x$FOUND_VERSION_78" = x; then
14037              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14039              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14040$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14041              BOOT_JDK_FOUND=no
14042            else
14043              # We're done! :-)
14044              BOOT_JDK_FOUND=yes
14045
14046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14047
14048  # Input might be given as Windows format, start by converting to
14049  # unix format.
14050  path="$BOOT_JDK"
14051  new_path=`$CYGPATH -u "$path"`
14052
14053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14056  # "foo.exe" is OK but "foo" is an error.
14057  #
14058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14059  # It is also a way to make sure we got the proper file name for the real test later on.
14060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14061  if test "x$test_shortpath" = x; then
14062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14065  fi
14066
14067  # Call helper function which possibly converts this using DOS-style short mode.
14068  # If so, the updated path is stored in $new_path.
14069
14070  input_path="$new_path"
14071  # Check if we need to convert this using DOS-style short mode. If the path
14072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14073  # take no chances and rewrite it.
14074  # Note: m4 eats our [], so we need to use [ and ] instead.
14075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14076  if test "x$has_forbidden_chars" != x; then
14077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14081      # Going to short mode and back again did indeed matter. Since short mode is
14082      # case insensitive, let's make it lowercase to improve readability.
14083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14084      # Now convert it back to Unix-stile (cygpath)
14085      input_path=`$CYGPATH -u "$shortmode_path"`
14086      new_path="$input_path"
14087    fi
14088  fi
14089
14090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14091  if test "x$test_cygdrive_prefix" = x; then
14092    # As a simple fix, exclude /usr/bin since it's not a real path.
14093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14095      # a path prefixed by /cygdrive for fixpath to work.
14096      new_path="$CYGWIN_ROOT_PATH$input_path"
14097    fi
14098  fi
14099
14100
14101  if test "x$path" != "x$new_path"; then
14102    BOOT_JDK="$new_path"
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14105  fi
14106
14107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14108
14109  path="$BOOT_JDK"
14110  has_colon=`$ECHO $path | $GREP ^.:`
14111  new_path="$path"
14112  if test "x$has_colon" = x; then
14113    # Not in mixed or Windows style, start by that.
14114    new_path=`cmd //c echo $path`
14115  fi
14116
14117
14118  input_path="$new_path"
14119  # Check if we need to convert this using DOS-style short mode. If the path
14120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14121  # take no chances and rewrite it.
14122  # Note: m4 eats our [], so we need to use [ and ] instead.
14123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14124  if test "x$has_forbidden_chars" != x; then
14125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14127  fi
14128
14129
14130  windows_path="$new_path"
14131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14132    unix_path=`$CYGPATH -u "$windows_path"`
14133    new_path="$unix_path"
14134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14136    new_path="$unix_path"
14137  fi
14138
14139  if test "x$path" != "x$new_path"; then
14140    BOOT_JDK="$new_path"
14141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14143  fi
14144
14145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14147
14148  else
14149    # We're on a posix platform. Hooray! :)
14150    path="$BOOT_JDK"
14151    has_space=`$ECHO "$path" | $GREP " "`
14152    if test "x$has_space" != x; then
14153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14155      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14156    fi
14157
14158    # Use eval to expand a potential ~
14159    eval path="$path"
14160    if test ! -f "$path" && test ! -d "$path"; then
14161      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14162    fi
14163
14164    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14165  fi
14166
14167              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14168$as_echo_n "checking for Boot JDK... " >&6; }
14169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14170$as_echo "$BOOT_JDK" >&6; }
14171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14172$as_echo_n "checking Boot JDK version... " >&6; }
14173              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14174              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14175$as_echo "$BOOT_JDK_VERSION" >&6; }
14176            fi # end check jdk version
14177          fi # end check rt.jar
14178        fi # end check javac
14179      fi # end check java
14180    fi # end check boot jdk found
14181  fi
14182
14183    done
14184  fi
14185
14186
14187    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14188    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14189      # Do we have a bin/java?
14190      if test ! -x "$BOOT_JDK/bin/java"; then
14191        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14193        BOOT_JDK_FOUND=no
14194      else
14195        # Do we have a bin/javac?
14196        if test ! -x "$BOOT_JDK/bin/javac"; then
14197          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14199          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14200$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14201          BOOT_JDK_FOUND=no
14202        else
14203          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14204          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14205            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14207            BOOT_JDK_FOUND=no
14208          else
14209            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14210            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14211
14212            # Extra M4 quote needed to protect [] in grep expression.
14213            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14214            if test "x$FOUND_VERSION_78" = x; then
14215              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14217              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14218$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14219              BOOT_JDK_FOUND=no
14220            else
14221              # We're done! :-)
14222              BOOT_JDK_FOUND=yes
14223
14224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14225
14226  # Input might be given as Windows format, start by converting to
14227  # unix format.
14228  path="$BOOT_JDK"
14229  new_path=`$CYGPATH -u "$path"`
14230
14231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14234  # "foo.exe" is OK but "foo" is an error.
14235  #
14236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14237  # It is also a way to make sure we got the proper file name for the real test later on.
14238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14239  if test "x$test_shortpath" = x; then
14240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14242    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14243  fi
14244
14245  # Call helper function which possibly converts this using DOS-style short mode.
14246  # If so, the updated path is stored in $new_path.
14247
14248  input_path="$new_path"
14249  # Check if we need to convert this using DOS-style short mode. If the path
14250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14251  # take no chances and rewrite it.
14252  # Note: m4 eats our [], so we need to use [ and ] instead.
14253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14254  if test "x$has_forbidden_chars" != x; then
14255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14259      # Going to short mode and back again did indeed matter. Since short mode is
14260      # case insensitive, let's make it lowercase to improve readability.
14261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14262      # Now convert it back to Unix-stile (cygpath)
14263      input_path=`$CYGPATH -u "$shortmode_path"`
14264      new_path="$input_path"
14265    fi
14266  fi
14267
14268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14269  if test "x$test_cygdrive_prefix" = x; then
14270    # As a simple fix, exclude /usr/bin since it's not a real path.
14271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14273      # a path prefixed by /cygdrive for fixpath to work.
14274      new_path="$CYGWIN_ROOT_PATH$input_path"
14275    fi
14276  fi
14277
14278
14279  if test "x$path" != "x$new_path"; then
14280    BOOT_JDK="$new_path"
14281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14283  fi
14284
14285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14286
14287  path="$BOOT_JDK"
14288  has_colon=`$ECHO $path | $GREP ^.:`
14289  new_path="$path"
14290  if test "x$has_colon" = x; then
14291    # Not in mixed or Windows style, start by that.
14292    new_path=`cmd //c echo $path`
14293  fi
14294
14295
14296  input_path="$new_path"
14297  # Check if we need to convert this using DOS-style short mode. If the path
14298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14299  # take no chances and rewrite it.
14300  # Note: m4 eats our [], so we need to use [ and ] instead.
14301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14302  if test "x$has_forbidden_chars" != x; then
14303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14305  fi
14306
14307
14308  windows_path="$new_path"
14309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14310    unix_path=`$CYGPATH -u "$windows_path"`
14311    new_path="$unix_path"
14312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14314    new_path="$unix_path"
14315  fi
14316
14317  if test "x$path" != "x$new_path"; then
14318    BOOT_JDK="$new_path"
14319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14321  fi
14322
14323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14325
14326  else
14327    # We're on a posix platform. Hooray! :)
14328    path="$BOOT_JDK"
14329    has_space=`$ECHO "$path" | $GREP " "`
14330    if test "x$has_space" != x; then
14331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14333      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14334    fi
14335
14336    # Use eval to expand a potential ~
14337    eval path="$path"
14338    if test ! -f "$path" && test ! -d "$path"; then
14339      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14340    fi
14341
14342    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14343  fi
14344
14345              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14346$as_echo_n "checking for Boot JDK... " >&6; }
14347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14348$as_echo "$BOOT_JDK" >&6; }
14349              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14350$as_echo_n "checking Boot JDK version... " >&6; }
14351              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14352              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14353$as_echo "$BOOT_JDK_VERSION" >&6; }
14354            fi # end check jdk version
14355          fi # end check rt.jar
14356        fi # end check javac
14357      fi # end check java
14358    fi # end check boot jdk found
14359  fi
14360
14361  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14362
14363  if test "x$BOOT_JDK_FOUND" = xno; then
14364    # Now execute the test
14365
14366  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14367  BOOT_JDK_SUFFIX="/Contents/Home"
14368  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14369  if test "x$ALL_JDKS_FOUND" != x; then
14370    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14371
14372  if test "x$BOOT_JDK_FOUND" = xno; then
14373    # Now execute the test
14374
14375        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14376        if test -d "$BOOT_JDK"; then
14377          BOOT_JDK_FOUND=maybe
14378          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14379$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14380        fi
14381
14382
14383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14385      # Do we have a bin/java?
14386      if test ! -x "$BOOT_JDK/bin/java"; then
14387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14389        BOOT_JDK_FOUND=no
14390      else
14391        # Do we have a bin/javac?
14392        if test ! -x "$BOOT_JDK/bin/javac"; then
14393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14397          BOOT_JDK_FOUND=no
14398        else
14399          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14400          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14401            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14403            BOOT_JDK_FOUND=no
14404          else
14405            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14407
14408            # Extra M4 quote needed to protect [] in grep expression.
14409            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14410            if test "x$FOUND_VERSION_78" = x; then
14411              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14413              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14414$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14415              BOOT_JDK_FOUND=no
14416            else
14417              # We're done! :-)
14418              BOOT_JDK_FOUND=yes
14419
14420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14421
14422  # Input might be given as Windows format, start by converting to
14423  # unix format.
14424  path="$BOOT_JDK"
14425  new_path=`$CYGPATH -u "$path"`
14426
14427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14430  # "foo.exe" is OK but "foo" is an error.
14431  #
14432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14433  # It is also a way to make sure we got the proper file name for the real test later on.
14434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14435  if test "x$test_shortpath" = x; then
14436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14439  fi
14440
14441  # Call helper function which possibly converts this using DOS-style short mode.
14442  # If so, the updated path is stored in $new_path.
14443
14444  input_path="$new_path"
14445  # Check if we need to convert this using DOS-style short mode. If the path
14446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14447  # take no chances and rewrite it.
14448  # Note: m4 eats our [], so we need to use [ and ] instead.
14449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14450  if test "x$has_forbidden_chars" != x; then
14451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14455      # Going to short mode and back again did indeed matter. Since short mode is
14456      # case insensitive, let's make it lowercase to improve readability.
14457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14458      # Now convert it back to Unix-stile (cygpath)
14459      input_path=`$CYGPATH -u "$shortmode_path"`
14460      new_path="$input_path"
14461    fi
14462  fi
14463
14464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14465  if test "x$test_cygdrive_prefix" = x; then
14466    # As a simple fix, exclude /usr/bin since it's not a real path.
14467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14469      # a path prefixed by /cygdrive for fixpath to work.
14470      new_path="$CYGWIN_ROOT_PATH$input_path"
14471    fi
14472  fi
14473
14474
14475  if test "x$path" != "x$new_path"; then
14476    BOOT_JDK="$new_path"
14477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14479  fi
14480
14481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14482
14483  path="$BOOT_JDK"
14484  has_colon=`$ECHO $path | $GREP ^.:`
14485  new_path="$path"
14486  if test "x$has_colon" = x; then
14487    # Not in mixed or Windows style, start by that.
14488    new_path=`cmd //c echo $path`
14489  fi
14490
14491
14492  input_path="$new_path"
14493  # Check if we need to convert this using DOS-style short mode. If the path
14494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14495  # take no chances and rewrite it.
14496  # Note: m4 eats our [], so we need to use [ and ] instead.
14497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14498  if test "x$has_forbidden_chars" != x; then
14499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14501  fi
14502
14503
14504  windows_path="$new_path"
14505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14506    unix_path=`$CYGPATH -u "$windows_path"`
14507    new_path="$unix_path"
14508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14510    new_path="$unix_path"
14511  fi
14512
14513  if test "x$path" != "x$new_path"; then
14514    BOOT_JDK="$new_path"
14515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14517  fi
14518
14519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14521
14522  else
14523    # We're on a posix platform. Hooray! :)
14524    path="$BOOT_JDK"
14525    has_space=`$ECHO "$path" | $GREP " "`
14526    if test "x$has_space" != x; then
14527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14529      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14530    fi
14531
14532    # Use eval to expand a potential ~
14533    eval path="$path"
14534    if test ! -f "$path" && test ! -d "$path"; then
14535      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14536    fi
14537
14538    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14539  fi
14540
14541              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14542$as_echo_n "checking for Boot JDK... " >&6; }
14543              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14544$as_echo "$BOOT_JDK" >&6; }
14545              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14546$as_echo_n "checking Boot JDK version... " >&6; }
14547              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14548              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14549$as_echo "$BOOT_JDK_VERSION" >&6; }
14550            fi # end check jdk version
14551          fi # end check rt.jar
14552        fi # end check javac
14553      fi # end check java
14554    fi # end check boot jdk found
14555  fi
14556
14557    done
14558  fi
14559
14560
14561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14563      # Do we have a bin/java?
14564      if test ! -x "$BOOT_JDK/bin/java"; then
14565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14567        BOOT_JDK_FOUND=no
14568      else
14569        # Do we have a bin/javac?
14570        if test ! -x "$BOOT_JDK/bin/javac"; then
14571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14575          BOOT_JDK_FOUND=no
14576        else
14577          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14578          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14581            BOOT_JDK_FOUND=no
14582          else
14583            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14585
14586            # Extra M4 quote needed to protect [] in grep expression.
14587            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14588            if test "x$FOUND_VERSION_78" = x; then
14589              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14591              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14592$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14593              BOOT_JDK_FOUND=no
14594            else
14595              # We're done! :-)
14596              BOOT_JDK_FOUND=yes
14597
14598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14599
14600  # Input might be given as Windows format, start by converting to
14601  # unix format.
14602  path="$BOOT_JDK"
14603  new_path=`$CYGPATH -u "$path"`
14604
14605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14608  # "foo.exe" is OK but "foo" is an error.
14609  #
14610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14611  # It is also a way to make sure we got the proper file name for the real test later on.
14612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14613  if test "x$test_shortpath" = x; then
14614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14616    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14617  fi
14618
14619  # Call helper function which possibly converts this using DOS-style short mode.
14620  # If so, the updated path is stored in $new_path.
14621
14622  input_path="$new_path"
14623  # Check if we need to convert this using DOS-style short mode. If the path
14624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14625  # take no chances and rewrite it.
14626  # Note: m4 eats our [], so we need to use [ and ] instead.
14627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14628  if test "x$has_forbidden_chars" != x; then
14629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14633      # Going to short mode and back again did indeed matter. Since short mode is
14634      # case insensitive, let's make it lowercase to improve readability.
14635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14636      # Now convert it back to Unix-stile (cygpath)
14637      input_path=`$CYGPATH -u "$shortmode_path"`
14638      new_path="$input_path"
14639    fi
14640  fi
14641
14642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14643  if test "x$test_cygdrive_prefix" = x; then
14644    # As a simple fix, exclude /usr/bin since it's not a real path.
14645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14647      # a path prefixed by /cygdrive for fixpath to work.
14648      new_path="$CYGWIN_ROOT_PATH$input_path"
14649    fi
14650  fi
14651
14652
14653  if test "x$path" != "x$new_path"; then
14654    BOOT_JDK="$new_path"
14655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14657  fi
14658
14659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14660
14661  path="$BOOT_JDK"
14662  has_colon=`$ECHO $path | $GREP ^.:`
14663  new_path="$path"
14664  if test "x$has_colon" = x; then
14665    # Not in mixed or Windows style, start by that.
14666    new_path=`cmd //c echo $path`
14667  fi
14668
14669
14670  input_path="$new_path"
14671  # Check if we need to convert this using DOS-style short mode. If the path
14672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14673  # take no chances and rewrite it.
14674  # Note: m4 eats our [], so we need to use [ and ] instead.
14675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14676  if test "x$has_forbidden_chars" != x; then
14677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14679  fi
14680
14681
14682  windows_path="$new_path"
14683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14684    unix_path=`$CYGPATH -u "$windows_path"`
14685    new_path="$unix_path"
14686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14688    new_path="$unix_path"
14689  fi
14690
14691  if test "x$path" != "x$new_path"; then
14692    BOOT_JDK="$new_path"
14693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14695  fi
14696
14697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14699
14700  else
14701    # We're on a posix platform. Hooray! :)
14702    path="$BOOT_JDK"
14703    has_space=`$ECHO "$path" | $GREP " "`
14704    if test "x$has_space" != x; then
14705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14706$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14707      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14708    fi
14709
14710    # Use eval to expand a potential ~
14711    eval path="$path"
14712    if test ! -f "$path" && test ! -d "$path"; then
14713      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14714    fi
14715
14716    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14717  fi
14718
14719              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14720$as_echo_n "checking for Boot JDK... " >&6; }
14721              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14722$as_echo "$BOOT_JDK" >&6; }
14723              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14724$as_echo_n "checking Boot JDK version... " >&6; }
14725              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14726              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14727$as_echo "$BOOT_JDK_VERSION" >&6; }
14728            fi # end check jdk version
14729          fi # end check rt.jar
14730        fi # end check javac
14731      fi # end check java
14732    fi # end check boot jdk found
14733  fi
14734
14735
14736  if test "x$BOOT_JDK_FOUND" = xno; then
14737    # Now execute the test
14738
14739  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14740  BOOT_JDK_SUFFIX="/Contents/Home"
14741  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14742  if test "x$ALL_JDKS_FOUND" != x; then
14743    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14744
14745  if test "x$BOOT_JDK_FOUND" = xno; then
14746    # Now execute the test
14747
14748        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14749        if test -d "$BOOT_JDK"; then
14750          BOOT_JDK_FOUND=maybe
14751          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14752$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14753        fi
14754
14755
14756    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14757    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14758      # Do we have a bin/java?
14759      if test ! -x "$BOOT_JDK/bin/java"; then
14760        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14762        BOOT_JDK_FOUND=no
14763      else
14764        # Do we have a bin/javac?
14765        if test ! -x "$BOOT_JDK/bin/javac"; then
14766          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14768          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14769$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14770          BOOT_JDK_FOUND=no
14771        else
14772          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14773          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14774            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14776            BOOT_JDK_FOUND=no
14777          else
14778            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14779            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14780
14781            # Extra M4 quote needed to protect [] in grep expression.
14782            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14783            if test "x$FOUND_VERSION_78" = x; then
14784              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14786              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14787$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14788              BOOT_JDK_FOUND=no
14789            else
14790              # We're done! :-)
14791              BOOT_JDK_FOUND=yes
14792
14793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14794
14795  # Input might be given as Windows format, start by converting to
14796  # unix format.
14797  path="$BOOT_JDK"
14798  new_path=`$CYGPATH -u "$path"`
14799
14800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14803  # "foo.exe" is OK but "foo" is an error.
14804  #
14805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14806  # It is also a way to make sure we got the proper file name for the real test later on.
14807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14808  if test "x$test_shortpath" = x; then
14809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14811    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14812  fi
14813
14814  # Call helper function which possibly converts this using DOS-style short mode.
14815  # If so, the updated path is stored in $new_path.
14816
14817  input_path="$new_path"
14818  # Check if we need to convert this using DOS-style short mode. If the path
14819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14820  # take no chances and rewrite it.
14821  # Note: m4 eats our [], so we need to use [ and ] instead.
14822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14823  if test "x$has_forbidden_chars" != x; then
14824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14828      # Going to short mode and back again did indeed matter. Since short mode is
14829      # case insensitive, let's make it lowercase to improve readability.
14830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14831      # Now convert it back to Unix-stile (cygpath)
14832      input_path=`$CYGPATH -u "$shortmode_path"`
14833      new_path="$input_path"
14834    fi
14835  fi
14836
14837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14838  if test "x$test_cygdrive_prefix" = x; then
14839    # As a simple fix, exclude /usr/bin since it's not a real path.
14840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14842      # a path prefixed by /cygdrive for fixpath to work.
14843      new_path="$CYGWIN_ROOT_PATH$input_path"
14844    fi
14845  fi
14846
14847
14848  if test "x$path" != "x$new_path"; then
14849    BOOT_JDK="$new_path"
14850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14852  fi
14853
14854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14855
14856  path="$BOOT_JDK"
14857  has_colon=`$ECHO $path | $GREP ^.:`
14858  new_path="$path"
14859  if test "x$has_colon" = x; then
14860    # Not in mixed or Windows style, start by that.
14861    new_path=`cmd //c echo $path`
14862  fi
14863
14864
14865  input_path="$new_path"
14866  # Check if we need to convert this using DOS-style short mode. If the path
14867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14868  # take no chances and rewrite it.
14869  # Note: m4 eats our [], so we need to use [ and ] instead.
14870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14871  if test "x$has_forbidden_chars" != x; then
14872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14874  fi
14875
14876
14877  windows_path="$new_path"
14878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14879    unix_path=`$CYGPATH -u "$windows_path"`
14880    new_path="$unix_path"
14881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14883    new_path="$unix_path"
14884  fi
14885
14886  if test "x$path" != "x$new_path"; then
14887    BOOT_JDK="$new_path"
14888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14890  fi
14891
14892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14894
14895  else
14896    # We're on a posix platform. Hooray! :)
14897    path="$BOOT_JDK"
14898    has_space=`$ECHO "$path" | $GREP " "`
14899    if test "x$has_space" != x; then
14900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14902      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14903    fi
14904
14905    # Use eval to expand a potential ~
14906    eval path="$path"
14907    if test ! -f "$path" && test ! -d "$path"; then
14908      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14909    fi
14910
14911    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14912  fi
14913
14914              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14915$as_echo_n "checking for Boot JDK... " >&6; }
14916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14917$as_echo "$BOOT_JDK" >&6; }
14918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14919$as_echo_n "checking Boot JDK version... " >&6; }
14920              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14921              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14922$as_echo "$BOOT_JDK_VERSION" >&6; }
14923            fi # end check jdk version
14924          fi # end check rt.jar
14925        fi # end check javac
14926      fi # end check java
14927    fi # end check boot jdk found
14928  fi
14929
14930    done
14931  fi
14932
14933
14934    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14935    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14936      # Do we have a bin/java?
14937      if test ! -x "$BOOT_JDK/bin/java"; then
14938        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14940        BOOT_JDK_FOUND=no
14941      else
14942        # Do we have a bin/javac?
14943        if test ! -x "$BOOT_JDK/bin/javac"; then
14944          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14946          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14947$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14948          BOOT_JDK_FOUND=no
14949        else
14950          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14951          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14954            BOOT_JDK_FOUND=no
14955          else
14956            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14957            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14958
14959            # Extra M4 quote needed to protect [] in grep expression.
14960            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14961            if test "x$FOUND_VERSION_78" = x; then
14962              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14964              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14965$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14966              BOOT_JDK_FOUND=no
14967            else
14968              # We're done! :-)
14969              BOOT_JDK_FOUND=yes
14970
14971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14972
14973  # Input might be given as Windows format, start by converting to
14974  # unix format.
14975  path="$BOOT_JDK"
14976  new_path=`$CYGPATH -u "$path"`
14977
14978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14981  # "foo.exe" is OK but "foo" is an error.
14982  #
14983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14984  # It is also a way to make sure we got the proper file name for the real test later on.
14985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14986  if test "x$test_shortpath" = x; then
14987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14989    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14990  fi
14991
14992  # Call helper function which possibly converts this using DOS-style short mode.
14993  # If so, the updated path is stored in $new_path.
14994
14995  input_path="$new_path"
14996  # Check if we need to convert this using DOS-style short mode. If the path
14997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14998  # take no chances and rewrite it.
14999  # Note: m4 eats our [], so we need to use [ and ] instead.
15000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15001  if test "x$has_forbidden_chars" != x; then
15002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15006      # Going to short mode and back again did indeed matter. Since short mode is
15007      # case insensitive, let's make it lowercase to improve readability.
15008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15009      # Now convert it back to Unix-stile (cygpath)
15010      input_path=`$CYGPATH -u "$shortmode_path"`
15011      new_path="$input_path"
15012    fi
15013  fi
15014
15015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15016  if test "x$test_cygdrive_prefix" = x; then
15017    # As a simple fix, exclude /usr/bin since it's not a real path.
15018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15020      # a path prefixed by /cygdrive for fixpath to work.
15021      new_path="$CYGWIN_ROOT_PATH$input_path"
15022    fi
15023  fi
15024
15025
15026  if test "x$path" != "x$new_path"; then
15027    BOOT_JDK="$new_path"
15028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15030  fi
15031
15032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15033
15034  path="$BOOT_JDK"
15035  has_colon=`$ECHO $path | $GREP ^.:`
15036  new_path="$path"
15037  if test "x$has_colon" = x; then
15038    # Not in mixed or Windows style, start by that.
15039    new_path=`cmd //c echo $path`
15040  fi
15041
15042
15043  input_path="$new_path"
15044  # Check if we need to convert this using DOS-style short mode. If the path
15045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15046  # take no chances and rewrite it.
15047  # Note: m4 eats our [], so we need to use [ and ] instead.
15048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15049  if test "x$has_forbidden_chars" != x; then
15050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15052  fi
15053
15054
15055  windows_path="$new_path"
15056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15057    unix_path=`$CYGPATH -u "$windows_path"`
15058    new_path="$unix_path"
15059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15061    new_path="$unix_path"
15062  fi
15063
15064  if test "x$path" != "x$new_path"; then
15065    BOOT_JDK="$new_path"
15066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15068  fi
15069
15070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15072
15073  else
15074    # We're on a posix platform. Hooray! :)
15075    path="$BOOT_JDK"
15076    has_space=`$ECHO "$path" | $GREP " "`
15077    if test "x$has_space" != x; then
15078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15080      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15081    fi
15082
15083    # Use eval to expand a potential ~
15084    eval path="$path"
15085    if test ! -f "$path" && test ! -d "$path"; then
15086      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15087    fi
15088
15089    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15090  fi
15091
15092              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15093$as_echo_n "checking for Boot JDK... " >&6; }
15094              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15095$as_echo "$BOOT_JDK" >&6; }
15096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15097$as_echo_n "checking Boot JDK version... " >&6; }
15098              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15099              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15100$as_echo "$BOOT_JDK_VERSION" >&6; }
15101            fi # end check jdk version
15102          fi # end check rt.jar
15103        fi # end check javac
15104      fi # end check java
15105    fi # end check boot jdk found
15106  fi
15107
15108  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15109
15110  if test "x$BOOT_JDK_FOUND" = xno; then
15111    # Now execute the test
15112
15113  BOOT_JDK_PREFIX="/usr/lib/jvm"
15114  BOOT_JDK_SUFFIX=""
15115  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15116  if test "x$ALL_JDKS_FOUND" != x; then
15117    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15118
15119  if test "x$BOOT_JDK_FOUND" = xno; then
15120    # Now execute the test
15121
15122        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15123        if test -d "$BOOT_JDK"; then
15124          BOOT_JDK_FOUND=maybe
15125          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15126$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15127        fi
15128
15129
15130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15132      # Do we have a bin/java?
15133      if test ! -x "$BOOT_JDK/bin/java"; then
15134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15136        BOOT_JDK_FOUND=no
15137      else
15138        # Do we have a bin/javac?
15139        if test ! -x "$BOOT_JDK/bin/javac"; then
15140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15144          BOOT_JDK_FOUND=no
15145        else
15146          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15147          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15148            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15150            BOOT_JDK_FOUND=no
15151          else
15152            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15153            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15154
15155            # Extra M4 quote needed to protect [] in grep expression.
15156            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15157            if test "x$FOUND_VERSION_78" = x; then
15158              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15160              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15161$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15162              BOOT_JDK_FOUND=no
15163            else
15164              # We're done! :-)
15165              BOOT_JDK_FOUND=yes
15166
15167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15168
15169  # Input might be given as Windows format, start by converting to
15170  # unix format.
15171  path="$BOOT_JDK"
15172  new_path=`$CYGPATH -u "$path"`
15173
15174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15177  # "foo.exe" is OK but "foo" is an error.
15178  #
15179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15180  # It is also a way to make sure we got the proper file name for the real test later on.
15181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15182  if test "x$test_shortpath" = x; then
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15185    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15186  fi
15187
15188  # Call helper function which possibly converts this using DOS-style short mode.
15189  # If so, the updated path is stored in $new_path.
15190
15191  input_path="$new_path"
15192  # Check if we need to convert this using DOS-style short mode. If the path
15193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15194  # take no chances and rewrite it.
15195  # Note: m4 eats our [], so we need to use [ and ] instead.
15196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15197  if test "x$has_forbidden_chars" != x; then
15198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15202      # Going to short mode and back again did indeed matter. Since short mode is
15203      # case insensitive, let's make it lowercase to improve readability.
15204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15205      # Now convert it back to Unix-stile (cygpath)
15206      input_path=`$CYGPATH -u "$shortmode_path"`
15207      new_path="$input_path"
15208    fi
15209  fi
15210
15211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15212  if test "x$test_cygdrive_prefix" = x; then
15213    # As a simple fix, exclude /usr/bin since it's not a real path.
15214    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15216      # a path prefixed by /cygdrive for fixpath to work.
15217      new_path="$CYGWIN_ROOT_PATH$input_path"
15218    fi
15219  fi
15220
15221
15222  if test "x$path" != "x$new_path"; then
15223    BOOT_JDK="$new_path"
15224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15225$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15226  fi
15227
15228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15229
15230  path="$BOOT_JDK"
15231  has_colon=`$ECHO $path | $GREP ^.:`
15232  new_path="$path"
15233  if test "x$has_colon" = x; then
15234    # Not in mixed or Windows style, start by that.
15235    new_path=`cmd //c echo $path`
15236  fi
15237
15238
15239  input_path="$new_path"
15240  # Check if we need to convert this using DOS-style short mode. If the path
15241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15242  # take no chances and rewrite it.
15243  # Note: m4 eats our [], so we need to use [ and ] instead.
15244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15245  if test "x$has_forbidden_chars" != x; then
15246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15248  fi
15249
15250
15251  windows_path="$new_path"
15252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15253    unix_path=`$CYGPATH -u "$windows_path"`
15254    new_path="$unix_path"
15255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15257    new_path="$unix_path"
15258  fi
15259
15260  if test "x$path" != "x$new_path"; then
15261    BOOT_JDK="$new_path"
15262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15264  fi
15265
15266  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15267  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15268
15269  else
15270    # We're on a posix platform. Hooray! :)
15271    path="$BOOT_JDK"
15272    has_space=`$ECHO "$path" | $GREP " "`
15273    if test "x$has_space" != x; then
15274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15276      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15277    fi
15278
15279    # Use eval to expand a potential ~
15280    eval path="$path"
15281    if test ! -f "$path" && test ! -d "$path"; then
15282      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15283    fi
15284
15285    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15286  fi
15287
15288              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15289$as_echo_n "checking for Boot JDK... " >&6; }
15290              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15291$as_echo "$BOOT_JDK" >&6; }
15292              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15293$as_echo_n "checking Boot JDK version... " >&6; }
15294              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15295              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15296$as_echo "$BOOT_JDK_VERSION" >&6; }
15297            fi # end check jdk version
15298          fi # end check rt.jar
15299        fi # end check javac
15300      fi # end check java
15301    fi # end check boot jdk found
15302  fi
15303
15304    done
15305  fi
15306
15307
15308    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15309    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15310      # Do we have a bin/java?
15311      if test ! -x "$BOOT_JDK/bin/java"; then
15312        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15314        BOOT_JDK_FOUND=no
15315      else
15316        # Do we have a bin/javac?
15317        if test ! -x "$BOOT_JDK/bin/javac"; then
15318          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15320          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15321$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15322          BOOT_JDK_FOUND=no
15323        else
15324          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15325          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15326            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15328            BOOT_JDK_FOUND=no
15329          else
15330            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15331            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15332
15333            # Extra M4 quote needed to protect [] in grep expression.
15334            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15335            if test "x$FOUND_VERSION_78" = x; then
15336              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15338              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15339$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15340              BOOT_JDK_FOUND=no
15341            else
15342              # We're done! :-)
15343              BOOT_JDK_FOUND=yes
15344
15345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15346
15347  # Input might be given as Windows format, start by converting to
15348  # unix format.
15349  path="$BOOT_JDK"
15350  new_path=`$CYGPATH -u "$path"`
15351
15352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15355  # "foo.exe" is OK but "foo" is an error.
15356  #
15357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15358  # It is also a way to make sure we got the proper file name for the real test later on.
15359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15360  if test "x$test_shortpath" = x; then
15361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15363    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15364  fi
15365
15366  # Call helper function which possibly converts this using DOS-style short mode.
15367  # If so, the updated path is stored in $new_path.
15368
15369  input_path="$new_path"
15370  # Check if we need to convert this using DOS-style short mode. If the path
15371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15372  # take no chances and rewrite it.
15373  # Note: m4 eats our [], so we need to use [ and ] instead.
15374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15375  if test "x$has_forbidden_chars" != x; then
15376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15380      # Going to short mode and back again did indeed matter. Since short mode is
15381      # case insensitive, let's make it lowercase to improve readability.
15382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15383      # Now convert it back to Unix-stile (cygpath)
15384      input_path=`$CYGPATH -u "$shortmode_path"`
15385      new_path="$input_path"
15386    fi
15387  fi
15388
15389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15390  if test "x$test_cygdrive_prefix" = x; then
15391    # As a simple fix, exclude /usr/bin since it's not a real path.
15392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15394      # a path prefixed by /cygdrive for fixpath to work.
15395      new_path="$CYGWIN_ROOT_PATH$input_path"
15396    fi
15397  fi
15398
15399
15400  if test "x$path" != "x$new_path"; then
15401    BOOT_JDK="$new_path"
15402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15404  fi
15405
15406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15407
15408  path="$BOOT_JDK"
15409  has_colon=`$ECHO $path | $GREP ^.:`
15410  new_path="$path"
15411  if test "x$has_colon" = x; then
15412    # Not in mixed or Windows style, start by that.
15413    new_path=`cmd //c echo $path`
15414  fi
15415
15416
15417  input_path="$new_path"
15418  # Check if we need to convert this using DOS-style short mode. If the path
15419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15420  # take no chances and rewrite it.
15421  # Note: m4 eats our [], so we need to use [ and ] instead.
15422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15423  if test "x$has_forbidden_chars" != x; then
15424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15426  fi
15427
15428
15429  windows_path="$new_path"
15430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15431    unix_path=`$CYGPATH -u "$windows_path"`
15432    new_path="$unix_path"
15433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15435    new_path="$unix_path"
15436  fi
15437
15438  if test "x$path" != "x$new_path"; then
15439    BOOT_JDK="$new_path"
15440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15442  fi
15443
15444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15446
15447  else
15448    # We're on a posix platform. Hooray! :)
15449    path="$BOOT_JDK"
15450    has_space=`$ECHO "$path" | $GREP " "`
15451    if test "x$has_space" != x; then
15452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15454      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15455    fi
15456
15457    # Use eval to expand a potential ~
15458    eval path="$path"
15459    if test ! -f "$path" && test ! -d "$path"; then
15460      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15461    fi
15462
15463    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15464  fi
15465
15466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15467$as_echo_n "checking for Boot JDK... " >&6; }
15468              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15469$as_echo "$BOOT_JDK" >&6; }
15470              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15471$as_echo_n "checking Boot JDK version... " >&6; }
15472              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15474$as_echo "$BOOT_JDK_VERSION" >&6; }
15475            fi # end check jdk version
15476          fi # end check rt.jar
15477        fi # end check javac
15478      fi # end check java
15479    fi # end check boot jdk found
15480  fi
15481
15482  fi
15483
15484
15485    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15486    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15487      # Do we have a bin/java?
15488      if test ! -x "$BOOT_JDK/bin/java"; then
15489        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15491        BOOT_JDK_FOUND=no
15492      else
15493        # Do we have a bin/javac?
15494        if test ! -x "$BOOT_JDK/bin/javac"; then
15495          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15497          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15498$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15499          BOOT_JDK_FOUND=no
15500        else
15501          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15502          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15503            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15505            BOOT_JDK_FOUND=no
15506          else
15507            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15508            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15509
15510            # Extra M4 quote needed to protect [] in grep expression.
15511            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15512            if test "x$FOUND_VERSION_78" = x; then
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15515              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15516$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15517              BOOT_JDK_FOUND=no
15518            else
15519              # We're done! :-)
15520              BOOT_JDK_FOUND=yes
15521
15522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15523
15524  # Input might be given as Windows format, start by converting to
15525  # unix format.
15526  path="$BOOT_JDK"
15527  new_path=`$CYGPATH -u "$path"`
15528
15529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15532  # "foo.exe" is OK but "foo" is an error.
15533  #
15534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15535  # It is also a way to make sure we got the proper file name for the real test later on.
15536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15537  if test "x$test_shortpath" = x; then
15538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15540    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15541  fi
15542
15543  # Call helper function which possibly converts this using DOS-style short mode.
15544  # If so, the updated path is stored in $new_path.
15545
15546  input_path="$new_path"
15547  # Check if we need to convert this using DOS-style short mode. If the path
15548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15549  # take no chances and rewrite it.
15550  # Note: m4 eats our [], so we need to use [ and ] instead.
15551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15552  if test "x$has_forbidden_chars" != x; then
15553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15557      # Going to short mode and back again did indeed matter. Since short mode is
15558      # case insensitive, let's make it lowercase to improve readability.
15559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15560      # Now convert it back to Unix-stile (cygpath)
15561      input_path=`$CYGPATH -u "$shortmode_path"`
15562      new_path="$input_path"
15563    fi
15564  fi
15565
15566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15567  if test "x$test_cygdrive_prefix" = x; then
15568    # As a simple fix, exclude /usr/bin since it's not a real path.
15569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15571      # a path prefixed by /cygdrive for fixpath to work.
15572      new_path="$CYGWIN_ROOT_PATH$input_path"
15573    fi
15574  fi
15575
15576
15577  if test "x$path" != "x$new_path"; then
15578    BOOT_JDK="$new_path"
15579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15581  fi
15582
15583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15584
15585  path="$BOOT_JDK"
15586  has_colon=`$ECHO $path | $GREP ^.:`
15587  new_path="$path"
15588  if test "x$has_colon" = x; then
15589    # Not in mixed or Windows style, start by that.
15590    new_path=`cmd //c echo $path`
15591  fi
15592
15593
15594  input_path="$new_path"
15595  # Check if we need to convert this using DOS-style short mode. If the path
15596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15597  # take no chances and rewrite it.
15598  # Note: m4 eats our [], so we need to use [ and ] instead.
15599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15600  if test "x$has_forbidden_chars" != x; then
15601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15603  fi
15604
15605
15606  windows_path="$new_path"
15607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15608    unix_path=`$CYGPATH -u "$windows_path"`
15609    new_path="$unix_path"
15610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15612    new_path="$unix_path"
15613  fi
15614
15615  if test "x$path" != "x$new_path"; then
15616    BOOT_JDK="$new_path"
15617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15619  fi
15620
15621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15623
15624  else
15625    # We're on a posix platform. Hooray! :)
15626    path="$BOOT_JDK"
15627    has_space=`$ECHO "$path" | $GREP " "`
15628    if test "x$has_space" != x; then
15629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15631      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15632    fi
15633
15634    # Use eval to expand a potential ~
15635    eval path="$path"
15636    if test ! -f "$path" && test ! -d "$path"; then
15637      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15638    fi
15639
15640    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15641  fi
15642
15643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15644$as_echo_n "checking for Boot JDK... " >&6; }
15645              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15646$as_echo "$BOOT_JDK" >&6; }
15647              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15648$as_echo_n "checking Boot JDK version... " >&6; }
15649              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15650              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15651$as_echo "$BOOT_JDK_VERSION" >&6; }
15652            fi # end check jdk version
15653          fi # end check rt.jar
15654        fi # end check javac
15655      fi # end check java
15656    fi # end check boot jdk found
15657  fi
15658
15659
15660# If we haven't found anything yet, we've truly lost. Give up.
15661if test "x$BOOT_JDK_FOUND" = xno; then
15662
15663    # Print a helpful message on how to acquire the necessary build dependency.
15664    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15665    MISSING_DEPENDENCY=openjdk
15666    PKGHANDLER_COMMAND=
15667
15668    case $PKGHANDLER in
15669	apt-get)
15670                apt_help     $MISSING_DEPENDENCY ;;
15671    yum)
15672                yum_help     $MISSING_DEPENDENCY ;;
15673	port)
15674                port_help    $MISSING_DEPENDENCY ;;
15675	pkgutil)
15676                pkgutil_help $MISSING_DEPENDENCY ;;
15677	pkgadd)
15678                pkgadd_help  $MISSING_DEPENDENCY ;;
15679    * )
15680      break ;;
15681    esac
15682
15683    if test "x$PKGHANDLER_COMMAND" != x; then
15684        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15685    fi
15686
15687  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15688$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15689  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15690$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15691  as_fn_error $? "Cannot continue" "$LINENO" 5
15692fi
15693
15694# Setup proper paths for what we found
15695BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15696if test ! -f "$BOOT_RTJAR"; then
15697    # On MacOSX it is called classes.jar
15698    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15699    if test -f "$BOOT_RTJAR"; then
15700      # Remove the ..
15701      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15702    fi
15703fi
15704BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15705BOOT_JDK="$BOOT_JDK"
15706
15707
15708
15709
15710# Setup tools from the Boot JDK.
15711
15712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15713$as_echo_n "checking for java in Boot JDK... " >&6; }
15714  JAVA=$BOOT_JDK/bin/java
15715  if test ! -x $JAVA; then
15716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15717$as_echo "not found" >&6; }
15718      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15719$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15720      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15721  fi
15722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15723$as_echo "ok" >&6; }
15724
15725
15726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15727$as_echo_n "checking for javac in Boot JDK... " >&6; }
15728  JAVAC=$BOOT_JDK/bin/javac
15729  if test ! -x $JAVAC; then
15730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15731$as_echo "not found" >&6; }
15732      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15733$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15734      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15735  fi
15736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15737$as_echo "ok" >&6; }
15738
15739
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15741$as_echo_n "checking for javah in Boot JDK... " >&6; }
15742  JAVAH=$BOOT_JDK/bin/javah
15743  if test ! -x $JAVAH; then
15744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15745$as_echo "not found" >&6; }
15746      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15747$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15748      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15749  fi
15750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15751$as_echo "ok" >&6; }
15752
15753
15754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15755$as_echo_n "checking for javap in Boot JDK... " >&6; }
15756  JAVAP=$BOOT_JDK/bin/javap
15757  if test ! -x $JAVAP; then
15758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15759$as_echo "not found" >&6; }
15760      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15761$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15762      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15763  fi
15764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15765$as_echo "ok" >&6; }
15766
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15769$as_echo_n "checking for jar in Boot JDK... " >&6; }
15770  JAR=$BOOT_JDK/bin/jar
15771  if test ! -x $JAR; then
15772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15773$as_echo "not found" >&6; }
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15776      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15777  fi
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15779$as_echo "ok" >&6; }
15780
15781
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15783$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15784  RMIC=$BOOT_JDK/bin/rmic
15785  if test ! -x $RMIC; then
15786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15787$as_echo "not found" >&6; }
15788      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15789$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15790      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15791  fi
15792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15793$as_echo "ok" >&6; }
15794
15795
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15797$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15798  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15799  if test ! -x $NATIVE2ASCII; then
15800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15801$as_echo "not found" >&6; }
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15803$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15804      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15805  fi
15806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15807$as_echo "ok" >&6; }
15808
15809
15810# Finally, set some other options...
15811
15812# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15813BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15814
15815
15816
15817
15818##############################################################################
15819#
15820# Specify options for anything that is run with the Boot JDK.
15821#
15822
15823# Check whether --with-boot-jdk-jvmargs was given.
15824if test "${with_boot_jdk_jvmargs+set}" = set; then :
15825  withval=$with_boot_jdk_jvmargs;
15826fi
15827
15828
15829if test "x$with_boot_jdk_jvmargs" = x; then
15830    # Not all JVM:s accept the same arguments on the command line.
15831    # OpenJDK specific increase in thread stack for JDK build,
15832    # well more specifically, when running javac.
15833    if test "x$BUILD_NUM_BITS" = x32; then
15834       STACK_SIZE=768
15835    else
15836       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15837       # since 64-bit pointers are pushed on the stach. Apparently, we need
15838       # to increase the stack space when javacing the JDK....
15839       STACK_SIZE=1536
15840    fi
15841
15842    # Minimum amount of heap memory.
15843
15844    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15845    $ECHO "Command: $JAVA -Xms64M -version" >&5
15846    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15847    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15848    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15849    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15850        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15851	JVM_ARG_OK=true
15852    else
15853	$ECHO "Arg failed:" >&5
15854	$ECHO "$OUTPUT" >&5
15855	JVM_ARG_OK=false
15856    fi
15857
15858    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15859        # Why does macosx need more heap? Its the huge JDK batch.
15860
15861    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15862    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15863    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15864    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15865    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15866    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15867        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15868	JVM_ARG_OK=true
15869    else
15870	$ECHO "Arg failed:" >&5
15871	$ECHO "$OUTPUT" >&5
15872	JVM_ARG_OK=false
15873    fi
15874
15875    else
15876
15877    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15878    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15879    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15880    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15881    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15882    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15883        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15884	JVM_ARG_OK=true
15885    else
15886	$ECHO "Arg failed:" >&5
15887	$ECHO "$OUTPUT" >&5
15888	JVM_ARG_OK=false
15889    fi
15890
15891    fi
15892    # When is adding -client something that speeds up the JVM?
15893    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15894
15895    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15896    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15897    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15898    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15899    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15900    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15901        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15902	JVM_ARG_OK=true
15903    else
15904	$ECHO "Arg failed:" >&5
15905	$ECHO "$OUTPUT" >&5
15906	JVM_ARG_OK=false
15907    fi
15908
15909
15910    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15911    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15912    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15913    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15914    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15915    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15916        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15917	JVM_ARG_OK=true
15918    else
15919	$ECHO "Arg failed:" >&5
15920	$ECHO "$OUTPUT" >&5
15921	JVM_ARG_OK=false
15922    fi
15923
15924
15925    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15926    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15927    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15928    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15929    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15930    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15931        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15932	JVM_ARG_OK=true
15933    else
15934	$ECHO "Arg failed:" >&5
15935	$ECHO "$OUTPUT" >&5
15936	JVM_ARG_OK=false
15937    fi
15938
15939    # Disable special log output when a debug build is used as Boot JDK...
15940
15941    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15942    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15943    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15944    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15945    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15946    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15947        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15948	JVM_ARG_OK=true
15949    else
15950	$ECHO "Arg failed:" >&5
15951	$ECHO "$OUTPUT" >&5
15952	JVM_ARG_OK=false
15953    fi
15954
15955fi
15956
15957BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15958
15959
15960
15961###############################################################################
15962#
15963# Configure the sources to use. We can add or override individual directories.
15964#
15965###############################################################################
15966
15967
15968
15969# Where are the sources. Any of these can be overridden
15970# using --with-override-corba and the likes.
15971LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15972CORBA_TOPDIR="$SRC_ROOT/corba"
15973JAXP_TOPDIR="$SRC_ROOT/jaxp"
15974JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15975HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15976NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15977JDK_TOPDIR="$SRC_ROOT/jdk"
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988###############################################################################
15989#
15990# Pickup additional source for a component from outside of the source root
15991# or override source for a component.
15992#
15993
15994# Check whether --with-add-source-root was given.
15995if test "${with_add_source_root+set}" = set; then :
15996  withval=$with_add_source_root;
15997fi
15998
15999
16000
16001# Check whether --with-override-source-root was given.
16002if test "${with_override_source_root+set}" = set; then :
16003  withval=$with_override_source_root;
16004fi
16005
16006
16007
16008# Check whether --with-adds-and-overrides was given.
16009if test "${with_adds_and_overrides+set}" = set; then :
16010  withval=$with_adds_and_overrides;
16011fi
16012
16013
16014if test "x$with_adds_and_overrides" != x; then
16015    with_add_source_root="$with_adds_and_overrides/adds"
16016    with_override_source_root="$with_adds_and_overrides/overrides"
16017fi
16018
16019if test "x$with_add_source_root" != x; then
16020    if ! test -d $with_add_source_root; then
16021       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16022    fi
16023    CURDIR="$PWD"
16024    cd "$with_add_source_root"
16025    ADD_SRC_ROOT="`pwd`"
16026    cd "$CURDIR"
16027    # Verify that the addon source root does not have any root makefiles.
16028    # If it does, then it is usually an error, prevent this.
16029    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16030       test -f $with_add_source_root/langtools/make/Makefile; then
16031        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
16032    fi
16033    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16034       test -f $with_add_source_root/corba/make/Makefile; then
16035        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
16036    fi
16037    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16038       test -f $with_add_source_root/jaxp/make/Makefile; then
16039        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
16040    fi
16041    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16042       test -f $with_add_source_root/jaxws/make/Makefile; then
16043        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
16044    fi
16045    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16046       test -f $with_add_source_root/hotspot/make/Makefile; then
16047        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
16048    fi
16049    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16050       test -f $with_add_source_root/jdk/make/Makefile; then
16051        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
16052    fi
16053fi
16054
16055
16056if test "x$with_override_source_root" != x; then
16057    if ! test -d $with_override_source_root; then
16058       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16059    fi
16060    CURDIR="$PWD"
16061    cd "$with_override_source_root"
16062    OVERRIDE_SRC_ROOT="`pwd`"
16063    cd "$CURDIR"
16064    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16065       test -f $with_override_source_root/langtools/make/Makefile; then
16066        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
16067    fi
16068    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16069       test -f $with_override_source_root/corba/make/Makefile; then
16070        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
16071    fi
16072    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16073       test -f $with_override_source_root/jaxp/make/Makefile; then
16074        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
16075    fi
16076    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16077       test -f $with_override_source_root/jaxws/make/Makefile; then
16078        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
16079    fi
16080    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16081       test -f $with_override_source_root/hotspot/make/Makefile; then
16082        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
16083    fi
16084    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16085       test -f $with_override_source_root/jdk/make/Makefile; then
16086        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
16087    fi
16088fi
16089
16090
16091###############################################################################
16092#
16093# Override a repo completely, this is used for example when you have 3 small
16094# development sandboxes of the langtools sources and want to avoid having 3 full
16095# OpenJDK sources checked out on disk.
16096#
16097# Assuming that the 3 langtools sandboxes are located here:
16098# /home/fredrik/sandbox1/langtools
16099# /home/fredrik/sandbox2/langtools
16100# /home/fredrik/sandbox3/langtools
16101#
16102# From the source root you create build subdirs manually:
16103#     mkdir -p build1 build2 build3
16104# in each build directory run:
16105#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16106#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16107#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16108#
16109
16110
16111# Check whether --with-override-langtools was given.
16112if test "${with_override_langtools+set}" = set; then :
16113  withval=$with_override_langtools;
16114fi
16115
16116
16117
16118# Check whether --with-override-corba was given.
16119if test "${with_override_corba+set}" = set; then :
16120  withval=$with_override_corba;
16121fi
16122
16123
16124
16125# Check whether --with-override-jaxp was given.
16126if test "${with_override_jaxp+set}" = set; then :
16127  withval=$with_override_jaxp;
16128fi
16129
16130
16131
16132# Check whether --with-override-jaxws was given.
16133if test "${with_override_jaxws+set}" = set; then :
16134  withval=$with_override_jaxws;
16135fi
16136
16137
16138
16139# Check whether --with-override-hotspot was given.
16140if test "${with_override_hotspot+set}" = set; then :
16141  withval=$with_override_hotspot;
16142fi
16143
16144
16145
16146# Check whether --with-override-jdk was given.
16147if test "${with_override_jdk+set}" = set; then :
16148  withval=$with_override_jdk;
16149fi
16150
16151
16152if test "x$with_override_langtools" != x; then
16153    CURDIR="$PWD"
16154    cd "$with_override_langtools"
16155    LANGTOOLS_TOPDIR="`pwd`"
16156    cd "$CURDIR"
16157    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16158        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16159    fi
16160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16161$as_echo_n "checking if langtools should be overridden... " >&6; }
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16163$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16164fi
16165if test "x$with_override_corba" != x; then
16166    CURDIR="$PWD"
16167    cd "$with_override_corba"
16168    CORBA_TOPDIR="`pwd`"
16169    cd "$CURDIR"
16170    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16171        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16172    fi
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16174$as_echo_n "checking if corba should be overridden... " >&6; }
16175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16176$as_echo "yes with $CORBA_TOPDIR" >&6; }
16177fi
16178if test "x$with_override_jaxp" != x; then
16179    CURDIR="$PWD"
16180    cd "$with_override_jaxp"
16181    JAXP_TOPDIR="`pwd`"
16182    cd "$CURDIR"
16183    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16184        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16185    fi
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16187$as_echo_n "checking if jaxp should be overridden... " >&6; }
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16189$as_echo "yes with $JAXP_TOPDIR" >&6; }
16190fi
16191if test "x$with_override_jaxws" != x; then
16192    CURDIR="$PWD"
16193    cd "$with_override_jaxws"
16194    JAXWS_TOPDIR="`pwd`"
16195    cd "$CURDIR"
16196    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16197        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16198    fi
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16200$as_echo_n "checking if jaxws should be overridden... " >&6; }
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16202$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16203fi
16204if test "x$with_override_hotspot" != x; then
16205    CURDIR="$PWD"
16206    cd "$with_override_hotspot"
16207    HOTSPOT_TOPDIR="`pwd`"
16208    cd "$CURDIR"
16209    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16210       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16211        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16212    fi
16213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16214$as_echo_n "checking if hotspot should be overridden... " >&6; }
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16216$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16217fi
16218if test "x$with_override_nashorn" != x; then
16219    CURDIR="$PWD"
16220    cd "$with_override_nashorn"
16221    NASHORN_TOPDIR="`pwd`"
16222    cd "$CURDIR"
16223    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16224        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16225    fi
16226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16227$as_echo_n "checking if nashorn should be overridden... " >&6; }
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16229$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16230fi
16231if test "x$with_override_jdk" != x; then
16232    CURDIR="$PWD"
16233    cd "$with_override_jdk"
16234    JDK_TOPDIR="`pwd`"
16235    cd "$CURDIR"
16236    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16237        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16238    fi
16239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16240$as_echo_n "checking if JDK should be overridden... " >&6; }
16241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16242$as_echo "yes with $JDK_TOPDIR" >&6; }
16243fi
16244
16245
16246
16247BUILD_OUTPUT="$OUTPUT_ROOT"
16248
16249
16250HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16251BUILD_HOTSPOT=true
16252
16253
16254
16255# Check whether --with-import-hotspot was given.
16256if test "${with_import_hotspot+set}" = set; then :
16257  withval=$with_import_hotspot;
16258fi
16259
16260if test "x$with_import_hotspot" != x; then
16261    CURDIR="$PWD"
16262    cd "$with_import_hotspot"
16263    HOTSPOT_DIST="`pwd`"
16264    cd "$CURDIR"
16265    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16266        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16267    fi
16268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16269$as_echo_n "checking if hotspot should be imported... " >&6; }
16270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16271$as_echo "yes from $HOTSPOT_DIST" >&6; }
16272    BUILD_HOTSPOT=false
16273fi
16274
16275JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16276
16277
16278###############################################################################
16279#
16280# Setup the toolchain (compilers etc), i.e. the tools that need to be
16281# cross-compilation aware.
16282#
16283###############################################################################
16284
16285
16286###############################################################################
16287#
16288# Configure the development tool paths and potential sysroot.
16289#
16290ac_ext=cpp
16291ac_cpp='$CXXCPP $CPPFLAGS'
16292ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16293ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16294ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16295
16296
16297# The option used to specify the target .o,.a or .so file.
16298# When compiling, how to specify the to be created object file.
16299CC_OUT_OPTION='-o$(SPACE)'
16300# When linking, how to specify the to be created executable.
16301EXE_OUT_OPTION='-o$(SPACE)'
16302# When linking, how to specify the to be created dynamically linkable library.
16303LD_OUT_OPTION='-o$(SPACE)'
16304# When archiving, how to specify the to be create static archive for object files.
16305AR_OUT_OPTION='rcs$(SPACE)'
16306
16307
16308
16309
16310
16311# Locate the actual tools
16312
16313
16314# Check whether --with-jtreg was given.
16315if test "${with_jtreg+set}" = set; then :
16316  withval=$with_jtreg;
16317else
16318  with_jtreg=no
16319fi
16320
16321
16322  if test "x$with_jtreg" = xno; then
16323    # jtreg disabled
16324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16325$as_echo_n "checking for jtreg... " >&6; }
16326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16327$as_echo "no" >&6; }
16328  else
16329    if test "x$with_jtreg" != xyes; then
16330      # with path specified.
16331      JT_HOME="$with_jtreg"
16332    fi
16333
16334    if test "x$JT_HOME" != x; then
16335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16336$as_echo_n "checking for jtreg... " >&6; }
16337
16338      # use JT_HOME enviroment var.
16339
16340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16341
16342  # Input might be given as Windows format, start by converting to
16343  # unix format.
16344  path="$JT_HOME"
16345  new_path=`$CYGPATH -u "$path"`
16346
16347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16350  # "foo.exe" is OK but "foo" is an error.
16351  #
16352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16353  # It is also a way to make sure we got the proper file name for the real test later on.
16354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16355  if test "x$test_shortpath" = x; then
16356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16357$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16358    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16359  fi
16360
16361  # Call helper function which possibly converts this using DOS-style short mode.
16362  # If so, the updated path is stored in $new_path.
16363
16364  input_path="$new_path"
16365  # Check if we need to convert this using DOS-style short mode. If the path
16366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16367  # take no chances and rewrite it.
16368  # Note: m4 eats our [], so we need to use [ and ] instead.
16369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16370  if test "x$has_forbidden_chars" != x; then
16371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16375      # Going to short mode and back again did indeed matter. Since short mode is
16376      # case insensitive, let's make it lowercase to improve readability.
16377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16378      # Now convert it back to Unix-stile (cygpath)
16379      input_path=`$CYGPATH -u "$shortmode_path"`
16380      new_path="$input_path"
16381    fi
16382  fi
16383
16384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16385  if test "x$test_cygdrive_prefix" = x; then
16386    # As a simple fix, exclude /usr/bin since it's not a real path.
16387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16389      # a path prefixed by /cygdrive for fixpath to work.
16390      new_path="$CYGWIN_ROOT_PATH$input_path"
16391    fi
16392  fi
16393
16394
16395  if test "x$path" != "x$new_path"; then
16396    JT_HOME="$new_path"
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16398$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16399  fi
16400
16401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16402
16403  path="$JT_HOME"
16404  has_colon=`$ECHO $path | $GREP ^.:`
16405  new_path="$path"
16406  if test "x$has_colon" = x; then
16407    # Not in mixed or Windows style, start by that.
16408    new_path=`cmd //c echo $path`
16409  fi
16410
16411
16412  input_path="$new_path"
16413  # Check if we need to convert this using DOS-style short mode. If the path
16414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16415  # take no chances and rewrite it.
16416  # Note: m4 eats our [], so we need to use [ and ] instead.
16417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16418  if test "x$has_forbidden_chars" != x; then
16419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16421  fi
16422
16423
16424  windows_path="$new_path"
16425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16426    unix_path=`$CYGPATH -u "$windows_path"`
16427    new_path="$unix_path"
16428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16430    new_path="$unix_path"
16431  fi
16432
16433  if test "x$path" != "x$new_path"; then
16434    JT_HOME="$new_path"
16435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16436$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16437  fi
16438
16439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16441
16442  else
16443    # We're on a posix platform. Hooray! :)
16444    path="$JT_HOME"
16445    has_space=`$ECHO "$path" | $GREP " "`
16446    if test "x$has_space" != x; then
16447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16448$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16449      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16450    fi
16451
16452    # Use eval to expand a potential ~
16453    eval path="$path"
16454    if test ! -f "$path" && test ! -d "$path"; then
16455      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16456    fi
16457
16458    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16459  fi
16460
16461
16462      # jtreg win32 script works for everybody
16463      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16464
16465      if test ! -f "$JTREGEXE"; then
16466        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16467      fi
16468
16469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16470$as_echo "$JTREGEXE" >&6; }
16471    else
16472      # try to find jtreg on path
16473
16474    for ac_prog in jtreg
16475do
16476  # Extract the first word of "$ac_prog", so it can be a program name with args.
16477set dummy $ac_prog; ac_word=$2
16478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16479$as_echo_n "checking for $ac_word... " >&6; }
16480if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16481  $as_echo_n "(cached) " >&6
16482else
16483  case $JTREGEXE in
16484  [\\/]* | ?:[\\/]*)
16485  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16486  ;;
16487  *)
16488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16489for as_dir in $PATH
16490do
16491  IFS=$as_save_IFS
16492  test -z "$as_dir" && as_dir=.
16493    for ac_exec_ext in '' $ac_executable_extensions; do
16494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16495    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16497    break 2
16498  fi
16499done
16500  done
16501IFS=$as_save_IFS
16502
16503  ;;
16504esac
16505fi
16506JTREGEXE=$ac_cv_path_JTREGEXE
16507if test -n "$JTREGEXE"; then
16508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16509$as_echo "$JTREGEXE" >&6; }
16510else
16511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16512$as_echo "no" >&6; }
16513fi
16514
16515
16516  test -n "$JTREGEXE" && break
16517done
16518
16519
16520    if test "x$JTREGEXE" = x; then
16521        if test "xjtreg" = x; then
16522          PROG_NAME=jtregexe
16523        else
16524          PROG_NAME=jtreg
16525        fi
16526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16528        as_fn_error $? "Cannot continue" "$LINENO" 5
16529    fi
16530
16531
16532      JT_HOME="`$DIRNAME $JTREGEXE`"
16533    fi
16534  fi
16535
16536
16537
16538
16539
16540if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16541
16542  # Store path to cygwin link.exe to help excluding it when searching for
16543  # VS linker. This must be done before changing the PATH when looking for VS.
16544  # Extract the first word of "link", so it can be a program name with args.
16545set dummy link; ac_word=$2
16546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16547$as_echo_n "checking for $ac_word... " >&6; }
16548if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16549  $as_echo_n "(cached) " >&6
16550else
16551  case $CYGWIN_LINK in
16552  [\\/]* | ?:[\\/]*)
16553  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16554  ;;
16555  *)
16556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16557for as_dir in $PATH
16558do
16559  IFS=$as_save_IFS
16560  test -z "$as_dir" && as_dir=.
16561    for ac_exec_ext in '' $ac_executable_extensions; do
16562  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16563    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16565    break 2
16566  fi
16567done
16568  done
16569IFS=$as_save_IFS
16570
16571  ;;
16572esac
16573fi
16574CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16575if test -n "$CYGWIN_LINK"; then
16576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16577$as_echo "$CYGWIN_LINK" >&6; }
16578else
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16580$as_echo "no" >&6; }
16581fi
16582
16583
16584  if test "x$CYGWIN_LINK" != x; then
16585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16586$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16587    "$CYGWIN_LINK" --version > /dev/null
16588    if test $? -eq 0 ; then
16589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16590$as_echo "yes" >&6; }
16591    else
16592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16593$as_echo "no" >&6; }
16594      # This might be the VS linker. Don't exclude it later on.
16595      CYGWIN_LINK=""
16596    fi
16597  fi
16598
16599  # First-hand choice is to locate and run the vsvars bat file.
16600
16601  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16602    VCVARSFILE="vc/bin/vcvars32.bat"
16603  else
16604    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16605  fi
16606
16607  VS_ENV_CMD=""
16608  VS_ENV_ARGS=""
16609  if test "x$with_toolsdir" != x; then
16610
16611  if test "x$VS_ENV_CMD" = x; then
16612    VS100BASE="$with_toolsdir/../.."
16613    METHOD="--with-tools-dir"
16614
16615  windows_path="$VS100BASE"
16616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16617    unix_path=`$CYGPATH -u "$windows_path"`
16618    VS100BASE="$unix_path"
16619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16621    VS100BASE="$unix_path"
16622  fi
16623
16624    if test -d "$VS100BASE"; then
16625      if test -f "$VS100BASE/$VCVARSFILE"; then
16626        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16627$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16628        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16629      else
16630        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16631$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16632        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16633$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16634      fi
16635    fi
16636  fi
16637
16638  fi
16639
16640  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16641    # Having specified an argument which is incorrect will produce an instant failure;
16642    # we should not go on looking
16643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16644$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16645    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16646$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16647    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16648  fi
16649
16650  if test "x$VS100COMNTOOLS" != x; then
16651
16652  if test "x$VS_ENV_CMD" = x; then
16653    VS100BASE="$VS100COMNTOOLS/../.."
16654    METHOD="VS100COMNTOOLS variable"
16655
16656  windows_path="$VS100BASE"
16657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16658    unix_path=`$CYGPATH -u "$windows_path"`
16659    VS100BASE="$unix_path"
16660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16662    VS100BASE="$unix_path"
16663  fi
16664
16665    if test -d "$VS100BASE"; then
16666      if test -f "$VS100BASE/$VCVARSFILE"; then
16667        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16668$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16669        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16670      else
16671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16672$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16673        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16674$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16675      fi
16676    fi
16677  fi
16678
16679  fi
16680  if test "x$PROGRAMFILES" != x; then
16681
16682  if test "x$VS_ENV_CMD" = x; then
16683    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16684    METHOD="well-known name"
16685
16686  windows_path="$VS100BASE"
16687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16688    unix_path=`$CYGPATH -u "$windows_path"`
16689    VS100BASE="$unix_path"
16690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16692    VS100BASE="$unix_path"
16693  fi
16694
16695    if test -d "$VS100BASE"; then
16696      if test -f "$VS100BASE/$VCVARSFILE"; then
16697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16698$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16699        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16700      else
16701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16702$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16705      fi
16706    fi
16707  fi
16708
16709  fi
16710
16711  if test "x$VS_ENV_CMD" = x; then
16712    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16713    METHOD="well-known name"
16714
16715  windows_path="$VS100BASE"
16716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16717    unix_path=`$CYGPATH -u "$windows_path"`
16718    VS100BASE="$unix_path"
16719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16721    VS100BASE="$unix_path"
16722  fi
16723
16724    if test -d "$VS100BASE"; then
16725      if test -f "$VS100BASE/$VCVARSFILE"; then
16726        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16727$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16728        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16729      else
16730        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16731$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16732        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16733$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16734      fi
16735    fi
16736  fi
16737
16738
16739  if test "x$VS_ENV_CMD" = x; then
16740    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16741    METHOD="well-known name"
16742
16743  windows_path="$VS100BASE"
16744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745    unix_path=`$CYGPATH -u "$windows_path"`
16746    VS100BASE="$unix_path"
16747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16749    VS100BASE="$unix_path"
16750  fi
16751
16752    if test -d "$VS100BASE"; then
16753      if test -f "$VS100BASE/$VCVARSFILE"; then
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16755$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16756        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16757      else
16758        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16759$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16760        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16761$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16762      fi
16763    fi
16764  fi
16765
16766
16767  if test "x$ProgramW6432" != x; then
16768
16769  if test "x$VS_ENV_CMD" = x; then
16770    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16771    METHOD="well-known name"
16772
16773  windows_path="$WIN_SDK_BASE"
16774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16775    unix_path=`$CYGPATH -u "$windows_path"`
16776    WIN_SDK_BASE="$unix_path"
16777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16779    WIN_SDK_BASE="$unix_path"
16780  fi
16781
16782    if test -d "$WIN_SDK_BASE"; then
16783      # There have been cases of partial or broken SDK installations. A missing
16784      # lib dir is not going to work.
16785      if test ! -d "$WIN_SDK_BASE/../lib"; then
16786        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16787$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16788        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16789$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16790      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16791        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16792$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16793        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16794        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16795          VS_ENV_ARGS="/x86"
16796        else
16797          VS_ENV_ARGS="/x64"
16798        fi
16799      else
16800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16801$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16802        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16803$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16804      fi
16805    fi
16806  fi
16807
16808  fi
16809  if test "x$PROGRAMW6432" != x; then
16810
16811  if test "x$VS_ENV_CMD" = x; then
16812    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16813    METHOD="well-known name"
16814
16815  windows_path="$WIN_SDK_BASE"
16816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16817    unix_path=`$CYGPATH -u "$windows_path"`
16818    WIN_SDK_BASE="$unix_path"
16819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16821    WIN_SDK_BASE="$unix_path"
16822  fi
16823
16824    if test -d "$WIN_SDK_BASE"; then
16825      # There have been cases of partial or broken SDK installations. A missing
16826      # lib dir is not going to work.
16827      if test ! -d "$WIN_SDK_BASE/../lib"; then
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16829$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16831$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16832      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16834$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16835        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16836        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16837          VS_ENV_ARGS="/x86"
16838        else
16839          VS_ENV_ARGS="/x64"
16840        fi
16841      else
16842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16843$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16844        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16845$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16846      fi
16847    fi
16848  fi
16849
16850  fi
16851  if test "x$PROGRAMFILES" != x; then
16852
16853  if test "x$VS_ENV_CMD" = x; then
16854    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16855    METHOD="well-known name"
16856
16857  windows_path="$WIN_SDK_BASE"
16858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16859    unix_path=`$CYGPATH -u "$windows_path"`
16860    WIN_SDK_BASE="$unix_path"
16861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16863    WIN_SDK_BASE="$unix_path"
16864  fi
16865
16866    if test -d "$WIN_SDK_BASE"; then
16867      # There have been cases of partial or broken SDK installations. A missing
16868      # lib dir is not going to work.
16869      if test ! -d "$WIN_SDK_BASE/../lib"; then
16870        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16871$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16872        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16873$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16874      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16876$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16877        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16878        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16879          VS_ENV_ARGS="/x86"
16880        else
16881          VS_ENV_ARGS="/x64"
16882        fi
16883      else
16884        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16885$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16887$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16888      fi
16889    fi
16890  fi
16891
16892  fi
16893
16894  if test "x$VS_ENV_CMD" = x; then
16895    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16896    METHOD="well-known name"
16897
16898  windows_path="$WIN_SDK_BASE"
16899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16900    unix_path=`$CYGPATH -u "$windows_path"`
16901    WIN_SDK_BASE="$unix_path"
16902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16904    WIN_SDK_BASE="$unix_path"
16905  fi
16906
16907    if test -d "$WIN_SDK_BASE"; then
16908      # There have been cases of partial or broken SDK installations. A missing
16909      # lib dir is not going to work.
16910      if test ! -d "$WIN_SDK_BASE/../lib"; then
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16912$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16914$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16915      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16918        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16919        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16920          VS_ENV_ARGS="/x86"
16921        else
16922          VS_ENV_ARGS="/x64"
16923        fi
16924      else
16925        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16926$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16927        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16928$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16929      fi
16930    fi
16931  fi
16932
16933
16934  if test "x$VS_ENV_CMD" = x; then
16935    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16936    METHOD="well-known name"
16937
16938  windows_path="$WIN_SDK_BASE"
16939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16940    unix_path=`$CYGPATH -u "$windows_path"`
16941    WIN_SDK_BASE="$unix_path"
16942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16944    WIN_SDK_BASE="$unix_path"
16945  fi
16946
16947    if test -d "$WIN_SDK_BASE"; then
16948      # There have been cases of partial or broken SDK installations. A missing
16949      # lib dir is not going to work.
16950      if test ! -d "$WIN_SDK_BASE/../lib"; then
16951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16952$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16953        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16954$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16955      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16957$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16958        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16959        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16960          VS_ENV_ARGS="/x86"
16961        else
16962          VS_ENV_ARGS="/x64"
16963        fi
16964      else
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16966$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16967        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16968$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16969      fi
16970    fi
16971  fi
16972
16973
16974  if test "x$VS_ENV_CMD" != x; then
16975    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16976
16977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978
16979  # First separate the path from the arguments. This will split at the first
16980  # space.
16981  complete="$VS_ENV_CMD"
16982  path="${complete%% *}"
16983  tmp="$complete EOL"
16984  arguments="${tmp#* }"
16985
16986  # Input might be given as Windows format, start by converting to
16987  # unix format.
16988  new_path=`$CYGPATH -u "$path"`
16989
16990  # Now try to locate executable using which
16991  new_path=`$WHICH "$new_path" 2> /dev/null`
16992  # bat and cmd files are not always considered executable in cygwin causing which
16993  # to not find them
16994  if test "x$new_path" = x \
16995           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16996           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16997    new_path=`$CYGPATH -u "$path"`
16998  fi
16999  if test "x$new_path" = x; then
17000    # Oops. Which didn't find the executable.
17001    # The splitting of arguments from the executable at a space might have been incorrect,
17002    # since paths with space are more likely in Windows. Give it another try with the whole
17003    # argument.
17004    path="$complete"
17005    arguments="EOL"
17006    new_path=`$CYGPATH -u "$path"`
17007    new_path=`$WHICH "$new_path" 2> /dev/null`
17008    # bat and cmd files are not always considered executable in cygwin causing which
17009    # to not find them
17010    if test "x$new_path" = x \
17011             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17012             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17013      new_path=`$CYGPATH -u "$path"`
17014    fi
17015    if test "x$new_path" = x; then
17016      # It's still not found. Now this is an unrecoverable error.
17017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17018$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17019      has_space=`$ECHO "$complete" | $GREP " "`
17020      if test "x$has_space" != x; then
17021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17023      fi
17024      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17025    fi
17026  fi
17027
17028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17031  # "foo.exe" is OK but "foo" is an error.
17032  #
17033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17034  # It is also a way to make sure we got the proper file name for the real test later on.
17035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17036  if test "x$test_shortpath" = x; then
17037    # Short path failed, file does not exist as specified.
17038    # Try adding .exe or .cmd
17039    if test -f "${new_path}.exe"; then
17040       input_to_shortpath="${new_path}.exe"
17041    elif test -f "${new_path}.cmd"; then
17042       input_to_shortpath="${new_path}.cmd"
17043    else
17044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17045$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17046      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17047$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17048      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17049    fi
17050  else
17051    input_to_shortpath="$new_path"
17052  fi
17053
17054  # Call helper function which possibly converts this using DOS-style short mode.
17055  # If so, the updated path is stored in $new_path.
17056  new_path="$input_to_shortpath"
17057
17058  input_path="$input_to_shortpath"
17059  # Check if we need to convert this using DOS-style short mode. If the path
17060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17061  # take no chances and rewrite it.
17062  # Note: m4 eats our [], so we need to use [ and ] instead.
17063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17064  if test "x$has_forbidden_chars" != x; then
17065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17069      # Going to short mode and back again did indeed matter. Since short mode is
17070      # case insensitive, let's make it lowercase to improve readability.
17071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17072      # Now convert it back to Unix-stile (cygpath)
17073      input_path=`$CYGPATH -u "$shortmode_path"`
17074      new_path="$input_path"
17075    fi
17076  fi
17077
17078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17079  if test "x$test_cygdrive_prefix" = x; then
17080    # As a simple fix, exclude /usr/bin since it's not a real path.
17081    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17083      # a path prefixed by /cygdrive for fixpath to work.
17084      new_path="$CYGWIN_ROOT_PATH$input_path"
17085    fi
17086  fi
17087
17088  # remove trailing .exe if any
17089  new_path="${new_path/%.exe/}"
17090
17091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17092
17093  # First separate the path from the arguments. This will split at the first
17094  # space.
17095  complete="$VS_ENV_CMD"
17096  path="${complete%% *}"
17097  tmp="$complete EOL"
17098  arguments="${tmp#* }"
17099
17100  # Input might be given as Windows format, start by converting to
17101  # unix format.
17102  new_path="$path"
17103
17104  windows_path="$new_path"
17105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17106    unix_path=`$CYGPATH -u "$windows_path"`
17107    new_path="$unix_path"
17108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17110    new_path="$unix_path"
17111  fi
17112
17113
17114  # Now try to locate executable using which
17115  new_path=`$WHICH "$new_path" 2> /dev/null`
17116
17117  if test "x$new_path" = x; then
17118    # Oops. Which didn't find the executable.
17119    # The splitting of arguments from the executable at a space might have been incorrect,
17120    # since paths with space are more likely in Windows. Give it another try with the whole
17121    # argument.
17122    path="$complete"
17123    arguments="EOL"
17124    new_path="$path"
17125
17126  windows_path="$new_path"
17127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17128    unix_path=`$CYGPATH -u "$windows_path"`
17129    new_path="$unix_path"
17130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17132    new_path="$unix_path"
17133  fi
17134
17135
17136    new_path=`$WHICH "$new_path" 2> /dev/null`
17137
17138    if test "x$new_path" = x; then
17139      # It's still not found. Now this is an unrecoverable error.
17140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17141$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17142      has_space=`$ECHO "$complete" | $GREP " "`
17143      if test "x$has_space" != x; then
17144        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17145$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17146      fi
17147      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17148    fi
17149  fi
17150
17151  # Now new_path has a complete unix path to the binary
17152  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17153    # Keep paths in /bin as-is, but remove trailing .exe if any
17154    new_path="${new_path/%.exe/}"
17155    # Do not save /bin paths to all_fixpath_prefixes!
17156  else
17157    # Not in mixed or Windows style, start by that.
17158    new_path=`cmd //c echo $new_path`
17159
17160  input_path="$new_path"
17161  # Check if we need to convert this using DOS-style short mode. If the path
17162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17163  # take no chances and rewrite it.
17164  # Note: m4 eats our [], so we need to use [ and ] instead.
17165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17166  if test "x$has_forbidden_chars" != x; then
17167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17169  fi
17170
17171    # Output is in $new_path
17172
17173  windows_path="$new_path"
17174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17175    unix_path=`$CYGPATH -u "$windows_path"`
17176    new_path="$unix_path"
17177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17179    new_path="$unix_path"
17180  fi
17181
17182    # remove trailing .exe if any
17183    new_path="${new_path/%.exe/}"
17184
17185    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17186    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17187  fi
17188
17189  else
17190    # We're on a posix platform. Hooray! :)
17191    # First separate the path from the arguments. This will split at the first
17192    # space.
17193    complete="$VS_ENV_CMD"
17194    path="${complete%% *}"
17195    tmp="$complete EOL"
17196    arguments="${tmp#* }"
17197
17198    # Cannot rely on the command "which" here since it doesn't always work.
17199    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17200    if test -z "$is_absolute_path"; then
17201      # Path to executable is not absolute. Find it.
17202      IFS_save="$IFS"
17203      IFS=:
17204      for p in $PATH; do
17205        if test -f "$p/$path" && test -x "$p/$path"; then
17206          new_path="$p/$path"
17207          break
17208        fi
17209      done
17210      IFS="$IFS_save"
17211    else
17212      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17213$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17214      new_path="$path"
17215    fi
17216
17217    if test "x$new_path" = x; then
17218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17219$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17220        has_space=`$ECHO "$complete" | $GREP " "`
17221        if test "x$has_space" != x; then
17222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17224        fi
17225        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17226      fi
17227  fi
17228
17229      # Now join together the path and the arguments once again
17230      if test "x$arguments" != xEOL; then
17231        new_complete="$new_path ${arguments% *}"
17232      else
17233        new_complete="$new_path"
17234      fi
17235
17236  if test "x$complete" != "x$new_complete"; then
17237      VS_ENV_CMD="$new_complete"
17238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17239$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17240    fi
17241
17242
17243    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17244    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17245$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17246    cd $OUTPUT_ROOT
17247    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17248    # to autoconf standards.
17249
17250    #----
17251
17252    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17253    # but calculate the difference in Cygwin environment before/after running it and then
17254    # apply the diff.
17255
17256    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17257      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17258      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17259      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17260    else
17261      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17262      _dosbash=`cmd //c echo \`which bash\``
17263    fi
17264
17265    # generate the set of exported vars before/after the vs10 setup
17266    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17267    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17268    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17269    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17270
17271    # Now execute the newly created bat file.
17272    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17273    cmd /c localdevenvtmp.bat | cat
17274
17275    # apply the diff (less some non-vs10 vars named by "!")
17276    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17277    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17278    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17279
17280    # cleanup
17281    $RM localdevenvtmp*
17282    #----
17283    cd $CURDIR
17284    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17286$as_echo "no" >&6; }
17287      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17288$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17289      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17290$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17291      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17292$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17293      as_fn_error $? "Cannot continue" "$LINENO" 5
17294    fi
17295
17296    # Now set all paths and other env variables. This will allow the rest of
17297    # the configure script to find and run the compiler in the proper way.
17298    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17299$as_echo "$as_me: Setting extracted environment variables" >&6;}
17300    . $OUTPUT_ROOT/localdevenv.sh
17301  else
17302    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17303    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17304$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17305  fi
17306
17307  # At this point, we should have corrent variables in the environment, or we can't continue.
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17309$as_echo_n "checking for Visual Studio variables... " >&6; }
17310
17311  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17312    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17314$as_echo "present but broken" >&6; }
17315      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17316    else
17317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17318$as_echo "ok" >&6; }
17319      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17320      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17321      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17322      VS_PATH="$PATH"
17323
17324
17325
17326    fi
17327  else
17328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17329$as_echo "not found" >&6; }
17330
17331    if test "x$VS_ENV_CMD" = x; then
17332      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17333$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17334      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17335$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17336    else
17337      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17338$as_echo "$as_me: Running the extraction script failed." >&6;}
17339    fi
17340    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17341$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17342    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17343$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17344    as_fn_error $? "Cannot continue" "$LINENO" 5
17345  fi
17346
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17348$as_echo_n "checking for msvcr100.dll... " >&6; }
17349
17350# Check whether --with-msvcr-dll was given.
17351if test "${with_msvcr_dll+set}" = set; then :
17352  withval=$with_msvcr_dll;
17353fi
17354
17355  if test "x$with_msvcr_dll" != x; then
17356    MSVCR_DLL="$with_msvcr_dll"
17357  else
17358    if test "x$VCINSTALLDIR" != x; then
17359      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17360        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17361      else
17362        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17363        if test "x$MSVCR_DLL" = x; then
17364          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17365        fi
17366      fi
17367      if test "x$MSVCR_DLL" != x; then
17368        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17369$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17370      else
17371        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17372$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17373      fi
17374    fi
17375    # Try some fallback alternatives
17376    if test "x$MSVCR_DLL" = x; then
17377      # If visual studio express is installed, there is usually one with the debugger
17378      if test "x$VS100COMNTOOLS" != x; then
17379        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17380          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17381          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17382$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17383        fi
17384      fi
17385    fi
17386    if test "x$MSVCR_DLL" = x; then
17387      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17388        # Fallback for 32bit builds, look in the windows directory.
17389        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17390          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17391$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17392          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17393        fi
17394      fi
17395    fi
17396  fi
17397  if test "x$MSVCR_DLL" = x; then
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17399$as_echo "no" >&6; }
17400    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17401  fi
17402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17403$as_echo "$MSVCR_DLL" >&6; }
17404
17405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17406
17407  # Input might be given as Windows format, start by converting to
17408  # unix format.
17409  path="$MSVCR_DLL"
17410  new_path=`$CYGPATH -u "$path"`
17411
17412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17415  # "foo.exe" is OK but "foo" is an error.
17416  #
17417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17418  # It is also a way to make sure we got the proper file name for the real test later on.
17419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17420  if test "x$test_shortpath" = x; then
17421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17422$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17423    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17424  fi
17425
17426  # Call helper function which possibly converts this using DOS-style short mode.
17427  # If so, the updated path is stored in $new_path.
17428
17429  input_path="$new_path"
17430  # Check if we need to convert this using DOS-style short mode. If the path
17431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17432  # take no chances and rewrite it.
17433  # Note: m4 eats our [], so we need to use [ and ] instead.
17434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17435  if test "x$has_forbidden_chars" != x; then
17436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17440      # Going to short mode and back again did indeed matter. Since short mode is
17441      # case insensitive, let's make it lowercase to improve readability.
17442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17443      # Now convert it back to Unix-stile (cygpath)
17444      input_path=`$CYGPATH -u "$shortmode_path"`
17445      new_path="$input_path"
17446    fi
17447  fi
17448
17449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17450  if test "x$test_cygdrive_prefix" = x; then
17451    # As a simple fix, exclude /usr/bin since it's not a real path.
17452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17454      # a path prefixed by /cygdrive for fixpath to work.
17455      new_path="$CYGWIN_ROOT_PATH$input_path"
17456    fi
17457  fi
17458
17459
17460  if test "x$path" != "x$new_path"; then
17461    MSVCR_DLL="$new_path"
17462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17463$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17464  fi
17465
17466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17467
17468  path="$MSVCR_DLL"
17469  has_colon=`$ECHO $path | $GREP ^.:`
17470  new_path="$path"
17471  if test "x$has_colon" = x; then
17472    # Not in mixed or Windows style, start by that.
17473    new_path=`cmd //c echo $path`
17474  fi
17475
17476
17477  input_path="$new_path"
17478  # Check if we need to convert this using DOS-style short mode. If the path
17479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17480  # take no chances and rewrite it.
17481  # Note: m4 eats our [], so we need to use [ and ] instead.
17482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17483  if test "x$has_forbidden_chars" != x; then
17484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17486  fi
17487
17488
17489  windows_path="$new_path"
17490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17491    unix_path=`$CYGPATH -u "$windows_path"`
17492    new_path="$unix_path"
17493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17495    new_path="$unix_path"
17496  fi
17497
17498  if test "x$path" != "x$new_path"; then
17499    MSVCR_DLL="$new_path"
17500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17501$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17502  fi
17503
17504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17506
17507  else
17508    # We're on a posix platform. Hooray! :)
17509    path="$MSVCR_DLL"
17510    has_space=`$ECHO "$path" | $GREP " "`
17511    if test "x$has_space" != x; then
17512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17513$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17515    fi
17516
17517    # Use eval to expand a potential ~
17518    eval path="$path"
17519    if test ! -f "$path" && test ! -d "$path"; then
17520      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17521    fi
17522
17523    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17524  fi
17525
17526
17527
17528
17529# Check whether --with-dxsdk was given.
17530if test "${with_dxsdk+set}" = set; then :
17531  withval=$with_dxsdk;
17532fi
17533
17534
17535# Check whether --with-dxsdk-lib was given.
17536if test "${with_dxsdk_lib+set}" = set; then :
17537  withval=$with_dxsdk_lib;
17538fi
17539
17540
17541# Check whether --with-dxsdk-include was given.
17542if test "${with_dxsdk_include+set}" = set; then :
17543  withval=$with_dxsdk_include;
17544fi
17545
17546
17547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17548$as_echo_n "checking for DirectX SDK... " >&6; }
17549
17550  if test "x$with_dxsdk" != x; then
17551    dxsdk_path="$with_dxsdk"
17552  elif test "x$DXSDK_DIR" != x; then
17553    dxsdk_path="$DXSDK_DIR"
17554  elif test -d "C:/DXSDK"; then
17555    dxsdk_path="C:/DXSDK"
17556  else
17557    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17558  fi
17559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17560$as_echo "$dxsdk_path" >&6; }
17561
17562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17563
17564  # Input might be given as Windows format, start by converting to
17565  # unix format.
17566  path="$dxsdk_path"
17567  new_path=`$CYGPATH -u "$path"`
17568
17569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17572  # "foo.exe" is OK but "foo" is an error.
17573  #
17574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17575  # It is also a way to make sure we got the proper file name for the real test later on.
17576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17577  if test "x$test_shortpath" = x; then
17578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17579$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17580    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17581  fi
17582
17583  # Call helper function which possibly converts this using DOS-style short mode.
17584  # If so, the updated path is stored in $new_path.
17585
17586  input_path="$new_path"
17587  # Check if we need to convert this using DOS-style short mode. If the path
17588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17589  # take no chances and rewrite it.
17590  # Note: m4 eats our [], so we need to use [ and ] instead.
17591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17592  if test "x$has_forbidden_chars" != x; then
17593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17597      # Going to short mode and back again did indeed matter. Since short mode is
17598      # case insensitive, let's make it lowercase to improve readability.
17599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17600      # Now convert it back to Unix-stile (cygpath)
17601      input_path=`$CYGPATH -u "$shortmode_path"`
17602      new_path="$input_path"
17603    fi
17604  fi
17605
17606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17607  if test "x$test_cygdrive_prefix" = x; then
17608    # As a simple fix, exclude /usr/bin since it's not a real path.
17609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17611      # a path prefixed by /cygdrive for fixpath to work.
17612      new_path="$CYGWIN_ROOT_PATH$input_path"
17613    fi
17614  fi
17615
17616
17617  if test "x$path" != "x$new_path"; then
17618    dxsdk_path="$new_path"
17619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17620$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17621  fi
17622
17623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17624
17625  path="$dxsdk_path"
17626  has_colon=`$ECHO $path | $GREP ^.:`
17627  new_path="$path"
17628  if test "x$has_colon" = x; then
17629    # Not in mixed or Windows style, start by that.
17630    new_path=`cmd //c echo $path`
17631  fi
17632
17633
17634  input_path="$new_path"
17635  # Check if we need to convert this using DOS-style short mode. If the path
17636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17637  # take no chances and rewrite it.
17638  # Note: m4 eats our [], so we need to use [ and ] instead.
17639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17640  if test "x$has_forbidden_chars" != x; then
17641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17643  fi
17644
17645
17646  windows_path="$new_path"
17647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17648    unix_path=`$CYGPATH -u "$windows_path"`
17649    new_path="$unix_path"
17650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17652    new_path="$unix_path"
17653  fi
17654
17655  if test "x$path" != "x$new_path"; then
17656    dxsdk_path="$new_path"
17657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17658$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17659  fi
17660
17661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17663
17664  else
17665    # We're on a posix platform. Hooray! :)
17666    path="$dxsdk_path"
17667    has_space=`$ECHO "$path" | $GREP " "`
17668    if test "x$has_space" != x; then
17669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17670$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17671      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17672    fi
17673
17674    # Use eval to expand a potential ~
17675    eval path="$path"
17676    if test ! -f "$path" && test ! -d "$path"; then
17677      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17678    fi
17679
17680    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17681  fi
17682
17683
17684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17685$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17686  if test "x$with_dxsdk_lib" != x; then
17687    DXSDK_LIB_PATH="$with_dxsdk_lib"
17688  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17689    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17690  else
17691    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17692  fi
17693  # dsound.lib is linked to in jsoundds
17694  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17695    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17696  fi
17697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17698$as_echo "$DXSDK_LIB_PATH" >&6; }
17699
17700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17701
17702  # Input might be given as Windows format, start by converting to
17703  # unix format.
17704  path="$DXSDK_LIB_PATH"
17705  new_path=`$CYGPATH -u "$path"`
17706
17707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17710  # "foo.exe" is OK but "foo" is an error.
17711  #
17712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17713  # It is also a way to make sure we got the proper file name for the real test later on.
17714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17715  if test "x$test_shortpath" = x; then
17716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17717$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17718    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17719  fi
17720
17721  # Call helper function which possibly converts this using DOS-style short mode.
17722  # If so, the updated path is stored in $new_path.
17723
17724  input_path="$new_path"
17725  # Check if we need to convert this using DOS-style short mode. If the path
17726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17727  # take no chances and rewrite it.
17728  # Note: m4 eats our [], so we need to use [ and ] instead.
17729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17730  if test "x$has_forbidden_chars" != x; then
17731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17735      # Going to short mode and back again did indeed matter. Since short mode is
17736      # case insensitive, let's make it lowercase to improve readability.
17737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17738      # Now convert it back to Unix-stile (cygpath)
17739      input_path=`$CYGPATH -u "$shortmode_path"`
17740      new_path="$input_path"
17741    fi
17742  fi
17743
17744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17745  if test "x$test_cygdrive_prefix" = x; then
17746    # As a simple fix, exclude /usr/bin since it's not a real path.
17747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17749      # a path prefixed by /cygdrive for fixpath to work.
17750      new_path="$CYGWIN_ROOT_PATH$input_path"
17751    fi
17752  fi
17753
17754
17755  if test "x$path" != "x$new_path"; then
17756    DXSDK_LIB_PATH="$new_path"
17757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17758$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17759  fi
17760
17761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17762
17763  path="$DXSDK_LIB_PATH"
17764  has_colon=`$ECHO $path | $GREP ^.:`
17765  new_path="$path"
17766  if test "x$has_colon" = x; then
17767    # Not in mixed or Windows style, start by that.
17768    new_path=`cmd //c echo $path`
17769  fi
17770
17771
17772  input_path="$new_path"
17773  # Check if we need to convert this using DOS-style short mode. If the path
17774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17775  # take no chances and rewrite it.
17776  # Note: m4 eats our [], so we need to use [ and ] instead.
17777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17778  if test "x$has_forbidden_chars" != x; then
17779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17781  fi
17782
17783
17784  windows_path="$new_path"
17785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17786    unix_path=`$CYGPATH -u "$windows_path"`
17787    new_path="$unix_path"
17788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17790    new_path="$unix_path"
17791  fi
17792
17793  if test "x$path" != "x$new_path"; then
17794    DXSDK_LIB_PATH="$new_path"
17795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17796$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17797  fi
17798
17799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17801
17802  else
17803    # We're on a posix platform. Hooray! :)
17804    path="$DXSDK_LIB_PATH"
17805    has_space=`$ECHO "$path" | $GREP " "`
17806    if test "x$has_space" != x; then
17807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17808$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17809      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17810    fi
17811
17812    # Use eval to expand a potential ~
17813    eval path="$path"
17814    if test ! -f "$path" && test ! -d "$path"; then
17815      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17816    fi
17817
17818    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17819  fi
17820
17821
17822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17823$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17824  if test "x$with_dxsdk_include" != x; then
17825    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17826  else
17827    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17828  fi
17829  # dsound.h is included in jsoundds
17830  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17831    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17832  fi
17833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17834$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17835
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837
17838  # Input might be given as Windows format, start by converting to
17839  # unix format.
17840  path="$DXSDK_INCLUDE_PATH"
17841  new_path=`$CYGPATH -u "$path"`
17842
17843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17846  # "foo.exe" is OK but "foo" is an error.
17847  #
17848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17849  # It is also a way to make sure we got the proper file name for the real test later on.
17850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17851  if test "x$test_shortpath" = x; then
17852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17853$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17854    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17855  fi
17856
17857  # Call helper function which possibly converts this using DOS-style short mode.
17858  # If so, the updated path is stored in $new_path.
17859
17860  input_path="$new_path"
17861  # Check if we need to convert this using DOS-style short mode. If the path
17862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17863  # take no chances and rewrite it.
17864  # Note: m4 eats our [], so we need to use [ and ] instead.
17865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17866  if test "x$has_forbidden_chars" != x; then
17867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17871      # Going to short mode and back again did indeed matter. Since short mode is
17872      # case insensitive, let's make it lowercase to improve readability.
17873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17874      # Now convert it back to Unix-stile (cygpath)
17875      input_path=`$CYGPATH -u "$shortmode_path"`
17876      new_path="$input_path"
17877    fi
17878  fi
17879
17880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17881  if test "x$test_cygdrive_prefix" = x; then
17882    # As a simple fix, exclude /usr/bin since it's not a real path.
17883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17885      # a path prefixed by /cygdrive for fixpath to work.
17886      new_path="$CYGWIN_ROOT_PATH$input_path"
17887    fi
17888  fi
17889
17890
17891  if test "x$path" != "x$new_path"; then
17892    DXSDK_INCLUDE_PATH="$new_path"
17893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17894$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17895  fi
17896
17897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17898
17899  path="$DXSDK_INCLUDE_PATH"
17900  has_colon=`$ECHO $path | $GREP ^.:`
17901  new_path="$path"
17902  if test "x$has_colon" = x; then
17903    # Not in mixed or Windows style, start by that.
17904    new_path=`cmd //c echo $path`
17905  fi
17906
17907
17908  input_path="$new_path"
17909  # Check if we need to convert this using DOS-style short mode. If the path
17910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17911  # take no chances and rewrite it.
17912  # Note: m4 eats our [], so we need to use [ and ] instead.
17913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17914  if test "x$has_forbidden_chars" != x; then
17915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17917  fi
17918
17919
17920  windows_path="$new_path"
17921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922    unix_path=`$CYGPATH -u "$windows_path"`
17923    new_path="$unix_path"
17924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17926    new_path="$unix_path"
17927  fi
17928
17929  if test "x$path" != "x$new_path"; then
17930    DXSDK_INCLUDE_PATH="$new_path"
17931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17932$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17933  fi
17934
17935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17937
17938  else
17939    # We're on a posix platform. Hooray! :)
17940    path="$DXSDK_INCLUDE_PATH"
17941    has_space=`$ECHO "$path" | $GREP " "`
17942    if test "x$has_space" != x; then
17943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17944$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17946    fi
17947
17948    # Use eval to expand a potential ~
17949    eval path="$path"
17950    if test ! -f "$path" && test ! -d "$path"; then
17951      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17952    fi
17953
17954    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17955  fi
17956
17957
17958
17959
17960  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17961
17962fi
17963
17964
17965
17966# If --build AND --host is set, then the configure script will find any
17967# cross compilation tools in the PATH. Cross compilation tools
17968# follows the cross compilation standard where they are prefixed with ${host}.
17969# For example the binary i686-sun-solaris2.10-gcc
17970# will cross compile for i686-sun-solaris2.10
17971# If neither of build and host is not set, then build=host and the
17972# default compiler found in the path will be used.
17973# Setting only --host, does not seem to be really supported.
17974# Please set both --build and --host if you want to cross compile.
17975
17976if test "x$COMPILE_TYPE" = "xcross"; then
17977    # Now we to find a C/C++ compiler that can build executables for the build
17978    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17979    # once. Also, we need to do this before adding a tools dir to the path,
17980    # otherwise we might pick up cross-compilers which don't use standard naming.
17981    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17982    # to wait until they are properly discovered.
17983    for ac_prog in cl cc gcc
17984do
17985  # Extract the first word of "$ac_prog", so it can be a program name with args.
17986set dummy $ac_prog; ac_word=$2
17987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17988$as_echo_n "checking for $ac_word... " >&6; }
17989if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17990  $as_echo_n "(cached) " >&6
17991else
17992  case $BUILD_CC in
17993  [\\/]* | ?:[\\/]*)
17994  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17995  ;;
17996  *)
17997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17998for as_dir in $PATH
17999do
18000  IFS=$as_save_IFS
18001  test -z "$as_dir" && as_dir=.
18002    for ac_exec_ext in '' $ac_executable_extensions; do
18003  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18004    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18006    break 2
18007  fi
18008done
18009  done
18010IFS=$as_save_IFS
18011
18012  ;;
18013esac
18014fi
18015BUILD_CC=$ac_cv_path_BUILD_CC
18016if test -n "$BUILD_CC"; then
18017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18018$as_echo "$BUILD_CC" >&6; }
18019else
18020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18021$as_echo "no" >&6; }
18022fi
18023
18024
18025  test -n "$BUILD_CC" && break
18026done
18027
18028
18029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18030
18031  # First separate the path from the arguments. This will split at the first
18032  # space.
18033  complete="$BUILD_CC"
18034  path="${complete%% *}"
18035  tmp="$complete EOL"
18036  arguments="${tmp#* }"
18037
18038  # Input might be given as Windows format, start by converting to
18039  # unix format.
18040  new_path=`$CYGPATH -u "$path"`
18041
18042  # Now try to locate executable using which
18043  new_path=`$WHICH "$new_path" 2> /dev/null`
18044  # bat and cmd files are not always considered executable in cygwin causing which
18045  # to not find them
18046  if test "x$new_path" = x \
18047           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18048           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18049    new_path=`$CYGPATH -u "$path"`
18050  fi
18051  if test "x$new_path" = x; then
18052    # Oops. Which didn't find the executable.
18053    # The splitting of arguments from the executable at a space might have been incorrect,
18054    # since paths with space are more likely in Windows. Give it another try with the whole
18055    # argument.
18056    path="$complete"
18057    arguments="EOL"
18058    new_path=`$CYGPATH -u "$path"`
18059    new_path=`$WHICH "$new_path" 2> /dev/null`
18060    # bat and cmd files are not always considered executable in cygwin causing which
18061    # to not find them
18062    if test "x$new_path" = x \
18063             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18064             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18065      new_path=`$CYGPATH -u "$path"`
18066    fi
18067    if test "x$new_path" = x; then
18068      # It's still not found. Now this is an unrecoverable error.
18069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18070$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18071      has_space=`$ECHO "$complete" | $GREP " "`
18072      if test "x$has_space" != x; then
18073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18075      fi
18076      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18077    fi
18078  fi
18079
18080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18083  # "foo.exe" is OK but "foo" is an error.
18084  #
18085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18086  # It is also a way to make sure we got the proper file name for the real test later on.
18087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18088  if test "x$test_shortpath" = x; then
18089    # Short path failed, file does not exist as specified.
18090    # Try adding .exe or .cmd
18091    if test -f "${new_path}.exe"; then
18092       input_to_shortpath="${new_path}.exe"
18093    elif test -f "${new_path}.cmd"; then
18094       input_to_shortpath="${new_path}.cmd"
18095    else
18096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18097$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18098      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18099$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18100      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18101    fi
18102  else
18103    input_to_shortpath="$new_path"
18104  fi
18105
18106  # Call helper function which possibly converts this using DOS-style short mode.
18107  # If so, the updated path is stored in $new_path.
18108  new_path="$input_to_shortpath"
18109
18110  input_path="$input_to_shortpath"
18111  # Check if we need to convert this using DOS-style short mode. If the path
18112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18113  # take no chances and rewrite it.
18114  # Note: m4 eats our [], so we need to use [ and ] instead.
18115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18116  if test "x$has_forbidden_chars" != x; then
18117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18121      # Going to short mode and back again did indeed matter. Since short mode is
18122      # case insensitive, let's make it lowercase to improve readability.
18123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18124      # Now convert it back to Unix-stile (cygpath)
18125      input_path=`$CYGPATH -u "$shortmode_path"`
18126      new_path="$input_path"
18127    fi
18128  fi
18129
18130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18131  if test "x$test_cygdrive_prefix" = x; then
18132    # As a simple fix, exclude /usr/bin since it's not a real path.
18133    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18135      # a path prefixed by /cygdrive for fixpath to work.
18136      new_path="$CYGWIN_ROOT_PATH$input_path"
18137    fi
18138  fi
18139
18140  # remove trailing .exe if any
18141  new_path="${new_path/%.exe/}"
18142
18143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18144
18145  # First separate the path from the arguments. This will split at the first
18146  # space.
18147  complete="$BUILD_CC"
18148  path="${complete%% *}"
18149  tmp="$complete EOL"
18150  arguments="${tmp#* }"
18151
18152  # Input might be given as Windows format, start by converting to
18153  # unix format.
18154  new_path="$path"
18155
18156  windows_path="$new_path"
18157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18158    unix_path=`$CYGPATH -u "$windows_path"`
18159    new_path="$unix_path"
18160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18162    new_path="$unix_path"
18163  fi
18164
18165
18166  # Now try to locate executable using which
18167  new_path=`$WHICH "$new_path" 2> /dev/null`
18168
18169  if test "x$new_path" = x; then
18170    # Oops. Which didn't find the executable.
18171    # The splitting of arguments from the executable at a space might have been incorrect,
18172    # since paths with space are more likely in Windows. Give it another try with the whole
18173    # argument.
18174    path="$complete"
18175    arguments="EOL"
18176    new_path="$path"
18177
18178  windows_path="$new_path"
18179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18180    unix_path=`$CYGPATH -u "$windows_path"`
18181    new_path="$unix_path"
18182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18184    new_path="$unix_path"
18185  fi
18186
18187
18188    new_path=`$WHICH "$new_path" 2> /dev/null`
18189
18190    if test "x$new_path" = x; then
18191      # It's still not found. Now this is an unrecoverable error.
18192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18193$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18194      has_space=`$ECHO "$complete" | $GREP " "`
18195      if test "x$has_space" != x; then
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18198      fi
18199      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18200    fi
18201  fi
18202
18203  # Now new_path has a complete unix path to the binary
18204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18205    # Keep paths in /bin as-is, but remove trailing .exe if any
18206    new_path="${new_path/%.exe/}"
18207    # Do not save /bin paths to all_fixpath_prefixes!
18208  else
18209    # Not in mixed or Windows style, start by that.
18210    new_path=`cmd //c echo $new_path`
18211
18212  input_path="$new_path"
18213  # Check if we need to convert this using DOS-style short mode. If the path
18214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18215  # take no chances and rewrite it.
18216  # Note: m4 eats our [], so we need to use [ and ] instead.
18217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18218  if test "x$has_forbidden_chars" != x; then
18219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18221  fi
18222
18223    # Output is in $new_path
18224
18225  windows_path="$new_path"
18226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18227    unix_path=`$CYGPATH -u "$windows_path"`
18228    new_path="$unix_path"
18229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18231    new_path="$unix_path"
18232  fi
18233
18234    # remove trailing .exe if any
18235    new_path="${new_path/%.exe/}"
18236
18237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18239  fi
18240
18241  else
18242    # We're on a posix platform. Hooray! :)
18243    # First separate the path from the arguments. This will split at the first
18244    # space.
18245    complete="$BUILD_CC"
18246    path="${complete%% *}"
18247    tmp="$complete EOL"
18248    arguments="${tmp#* }"
18249
18250    # Cannot rely on the command "which" here since it doesn't always work.
18251    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18252    if test -z "$is_absolute_path"; then
18253      # Path to executable is not absolute. Find it.
18254      IFS_save="$IFS"
18255      IFS=:
18256      for p in $PATH; do
18257        if test -f "$p/$path" && test -x "$p/$path"; then
18258          new_path="$p/$path"
18259          break
18260        fi
18261      done
18262      IFS="$IFS_save"
18263    else
18264      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18265$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18266      new_path="$path"
18267    fi
18268
18269    if test "x$new_path" = x; then
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18271$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18272        has_space=`$ECHO "$complete" | $GREP " "`
18273        if test "x$has_space" != x; then
18274          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18276        fi
18277        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18278      fi
18279  fi
18280
18281      # Now join together the path and the arguments once again
18282      if test "x$arguments" != xEOL; then
18283        new_complete="$new_path ${arguments% *}"
18284      else
18285        new_complete="$new_path"
18286      fi
18287
18288  if test "x$complete" != "x$new_complete"; then
18289      BUILD_CC="$new_complete"
18290      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18291$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18292    fi
18293
18294    for ac_prog in cl CC g++
18295do
18296  # Extract the first word of "$ac_prog", so it can be a program name with args.
18297set dummy $ac_prog; ac_word=$2
18298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18299$as_echo_n "checking for $ac_word... " >&6; }
18300if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18301  $as_echo_n "(cached) " >&6
18302else
18303  case $BUILD_CXX in
18304  [\\/]* | ?:[\\/]*)
18305  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18306  ;;
18307  *)
18308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18309for as_dir in $PATH
18310do
18311  IFS=$as_save_IFS
18312  test -z "$as_dir" && as_dir=.
18313    for ac_exec_ext in '' $ac_executable_extensions; do
18314  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18315    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18317    break 2
18318  fi
18319done
18320  done
18321IFS=$as_save_IFS
18322
18323  ;;
18324esac
18325fi
18326BUILD_CXX=$ac_cv_path_BUILD_CXX
18327if test -n "$BUILD_CXX"; then
18328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18329$as_echo "$BUILD_CXX" >&6; }
18330else
18331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18332$as_echo "no" >&6; }
18333fi
18334
18335
18336  test -n "$BUILD_CXX" && break
18337done
18338
18339
18340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18341
18342  # First separate the path from the arguments. This will split at the first
18343  # space.
18344  complete="$BUILD_CXX"
18345  path="${complete%% *}"
18346  tmp="$complete EOL"
18347  arguments="${tmp#* }"
18348
18349  # Input might be given as Windows format, start by converting to
18350  # unix format.
18351  new_path=`$CYGPATH -u "$path"`
18352
18353  # Now try to locate executable using which
18354  new_path=`$WHICH "$new_path" 2> /dev/null`
18355  # bat and cmd files are not always considered executable in cygwin causing which
18356  # to not find them
18357  if test "x$new_path" = x \
18358           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18359           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18360    new_path=`$CYGPATH -u "$path"`
18361  fi
18362  if test "x$new_path" = x; then
18363    # Oops. Which didn't find the executable.
18364    # The splitting of arguments from the executable at a space might have been incorrect,
18365    # since paths with space are more likely in Windows. Give it another try with the whole
18366    # argument.
18367    path="$complete"
18368    arguments="EOL"
18369    new_path=`$CYGPATH -u "$path"`
18370    new_path=`$WHICH "$new_path" 2> /dev/null`
18371    # bat and cmd files are not always considered executable in cygwin causing which
18372    # to not find them
18373    if test "x$new_path" = x \
18374             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18375             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18376      new_path=`$CYGPATH -u "$path"`
18377    fi
18378    if test "x$new_path" = x; then
18379      # It's still not found. Now this is an unrecoverable error.
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18381$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18382      has_space=`$ECHO "$complete" | $GREP " "`
18383      if test "x$has_space" != x; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18386      fi
18387      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18388    fi
18389  fi
18390
18391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18394  # "foo.exe" is OK but "foo" is an error.
18395  #
18396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18397  # It is also a way to make sure we got the proper file name for the real test later on.
18398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18399  if test "x$test_shortpath" = x; then
18400    # Short path failed, file does not exist as specified.
18401    # Try adding .exe or .cmd
18402    if test -f "${new_path}.exe"; then
18403       input_to_shortpath="${new_path}.exe"
18404    elif test -f "${new_path}.cmd"; then
18405       input_to_shortpath="${new_path}.cmd"
18406    else
18407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18408$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18411      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18412    fi
18413  else
18414    input_to_shortpath="$new_path"
18415  fi
18416
18417  # Call helper function which possibly converts this using DOS-style short mode.
18418  # If so, the updated path is stored in $new_path.
18419  new_path="$input_to_shortpath"
18420
18421  input_path="$input_to_shortpath"
18422  # Check if we need to convert this using DOS-style short mode. If the path
18423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18424  # take no chances and rewrite it.
18425  # Note: m4 eats our [], so we need to use [ and ] instead.
18426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18427  if test "x$has_forbidden_chars" != x; then
18428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18432      # Going to short mode and back again did indeed matter. Since short mode is
18433      # case insensitive, let's make it lowercase to improve readability.
18434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18435      # Now convert it back to Unix-stile (cygpath)
18436      input_path=`$CYGPATH -u "$shortmode_path"`
18437      new_path="$input_path"
18438    fi
18439  fi
18440
18441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18442  if test "x$test_cygdrive_prefix" = x; then
18443    # As a simple fix, exclude /usr/bin since it's not a real path.
18444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18446      # a path prefixed by /cygdrive for fixpath to work.
18447      new_path="$CYGWIN_ROOT_PATH$input_path"
18448    fi
18449  fi
18450
18451  # remove trailing .exe if any
18452  new_path="${new_path/%.exe/}"
18453
18454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18455
18456  # First separate the path from the arguments. This will split at the first
18457  # space.
18458  complete="$BUILD_CXX"
18459  path="${complete%% *}"
18460  tmp="$complete EOL"
18461  arguments="${tmp#* }"
18462
18463  # Input might be given as Windows format, start by converting to
18464  # unix format.
18465  new_path="$path"
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476
18477  # Now try to locate executable using which
18478  new_path=`$WHICH "$new_path" 2> /dev/null`
18479
18480  if test "x$new_path" = x; then
18481    # Oops. Which didn't find the executable.
18482    # The splitting of arguments from the executable at a space might have been incorrect,
18483    # since paths with space are more likely in Windows. Give it another try with the whole
18484    # argument.
18485    path="$complete"
18486    arguments="EOL"
18487    new_path="$path"
18488
18489  windows_path="$new_path"
18490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18491    unix_path=`$CYGPATH -u "$windows_path"`
18492    new_path="$unix_path"
18493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18495    new_path="$unix_path"
18496  fi
18497
18498
18499    new_path=`$WHICH "$new_path" 2> /dev/null`
18500
18501    if test "x$new_path" = x; then
18502      # It's still not found. Now this is an unrecoverable error.
18503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18504$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18505      has_space=`$ECHO "$complete" | $GREP " "`
18506      if test "x$has_space" != x; then
18507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18509      fi
18510      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18511    fi
18512  fi
18513
18514  # Now new_path has a complete unix path to the binary
18515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18516    # Keep paths in /bin as-is, but remove trailing .exe if any
18517    new_path="${new_path/%.exe/}"
18518    # Do not save /bin paths to all_fixpath_prefixes!
18519  else
18520    # Not in mixed or Windows style, start by that.
18521    new_path=`cmd //c echo $new_path`
18522
18523  input_path="$new_path"
18524  # Check if we need to convert this using DOS-style short mode. If the path
18525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18526  # take no chances and rewrite it.
18527  # Note: m4 eats our [], so we need to use [ and ] instead.
18528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18529  if test "x$has_forbidden_chars" != x; then
18530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18532  fi
18533
18534    # Output is in $new_path
18535
18536  windows_path="$new_path"
18537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18538    unix_path=`$CYGPATH -u "$windows_path"`
18539    new_path="$unix_path"
18540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18542    new_path="$unix_path"
18543  fi
18544
18545    # remove trailing .exe if any
18546    new_path="${new_path/%.exe/}"
18547
18548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18550  fi
18551
18552  else
18553    # We're on a posix platform. Hooray! :)
18554    # First separate the path from the arguments. This will split at the first
18555    # space.
18556    complete="$BUILD_CXX"
18557    path="${complete%% *}"
18558    tmp="$complete EOL"
18559    arguments="${tmp#* }"
18560
18561    # Cannot rely on the command "which" here since it doesn't always work.
18562    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18563    if test -z "$is_absolute_path"; then
18564      # Path to executable is not absolute. Find it.
18565      IFS_save="$IFS"
18566      IFS=:
18567      for p in $PATH; do
18568        if test -f "$p/$path" && test -x "$p/$path"; then
18569          new_path="$p/$path"
18570          break
18571        fi
18572      done
18573      IFS="$IFS_save"
18574    else
18575      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18576$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18577      new_path="$path"
18578    fi
18579
18580    if test "x$new_path" = x; then
18581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18582$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18583        has_space=`$ECHO "$complete" | $GREP " "`
18584        if test "x$has_space" != x; then
18585          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18586$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18587        fi
18588        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18589      fi
18590  fi
18591
18592      # Now join together the path and the arguments once again
18593      if test "x$arguments" != xEOL; then
18594        new_complete="$new_path ${arguments% *}"
18595      else
18596        new_complete="$new_path"
18597      fi
18598
18599  if test "x$complete" != "x$new_complete"; then
18600      BUILD_CXX="$new_complete"
18601      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18602$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18603    fi
18604
18605    # Extract the first word of "ld", so it can be a program name with args.
18606set dummy ld; ac_word=$2
18607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18608$as_echo_n "checking for $ac_word... " >&6; }
18609if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18610  $as_echo_n "(cached) " >&6
18611else
18612  case $BUILD_LD in
18613  [\\/]* | ?:[\\/]*)
18614  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18615  ;;
18616  *)
18617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18618for as_dir in $PATH
18619do
18620  IFS=$as_save_IFS
18621  test -z "$as_dir" && as_dir=.
18622    for ac_exec_ext in '' $ac_executable_extensions; do
18623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18624    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18626    break 2
18627  fi
18628done
18629  done
18630IFS=$as_save_IFS
18631
18632  ;;
18633esac
18634fi
18635BUILD_LD=$ac_cv_path_BUILD_LD
18636if test -n "$BUILD_LD"; then
18637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18638$as_echo "$BUILD_LD" >&6; }
18639else
18640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18641$as_echo "no" >&6; }
18642fi
18643
18644
18645
18646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18647
18648  # First separate the path from the arguments. This will split at the first
18649  # space.
18650  complete="$BUILD_LD"
18651  path="${complete%% *}"
18652  tmp="$complete EOL"
18653  arguments="${tmp#* }"
18654
18655  # Input might be given as Windows format, start by converting to
18656  # unix format.
18657  new_path=`$CYGPATH -u "$path"`
18658
18659  # Now try to locate executable using which
18660  new_path=`$WHICH "$new_path" 2> /dev/null`
18661  # bat and cmd files are not always considered executable in cygwin causing which
18662  # to not find them
18663  if test "x$new_path" = x \
18664           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18665           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18666    new_path=`$CYGPATH -u "$path"`
18667  fi
18668  if test "x$new_path" = x; then
18669    # Oops. Which didn't find the executable.
18670    # The splitting of arguments from the executable at a space might have been incorrect,
18671    # since paths with space are more likely in Windows. Give it another try with the whole
18672    # argument.
18673    path="$complete"
18674    arguments="EOL"
18675    new_path=`$CYGPATH -u "$path"`
18676    new_path=`$WHICH "$new_path" 2> /dev/null`
18677    # bat and cmd files are not always considered executable in cygwin causing which
18678    # to not find them
18679    if test "x$new_path" = x \
18680             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18681             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18682      new_path=`$CYGPATH -u "$path"`
18683    fi
18684    if test "x$new_path" = x; then
18685      # It's still not found. Now this is an unrecoverable error.
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18687$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18688      has_space=`$ECHO "$complete" | $GREP " "`
18689      if test "x$has_space" != x; then
18690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18692      fi
18693      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18694    fi
18695  fi
18696
18697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18700  # "foo.exe" is OK but "foo" is an error.
18701  #
18702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18703  # It is also a way to make sure we got the proper file name for the real test later on.
18704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18705  if test "x$test_shortpath" = x; then
18706    # Short path failed, file does not exist as specified.
18707    # Try adding .exe or .cmd
18708    if test -f "${new_path}.exe"; then
18709       input_to_shortpath="${new_path}.exe"
18710    elif test -f "${new_path}.cmd"; then
18711       input_to_shortpath="${new_path}.cmd"
18712    else
18713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18714$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18717      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18718    fi
18719  else
18720    input_to_shortpath="$new_path"
18721  fi
18722
18723  # Call helper function which possibly converts this using DOS-style short mode.
18724  # If so, the updated path is stored in $new_path.
18725  new_path="$input_to_shortpath"
18726
18727  input_path="$input_to_shortpath"
18728  # Check if we need to convert this using DOS-style short mode. If the path
18729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18730  # take no chances and rewrite it.
18731  # Note: m4 eats our [], so we need to use [ and ] instead.
18732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18733  if test "x$has_forbidden_chars" != x; then
18734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18738      # Going to short mode and back again did indeed matter. Since short mode is
18739      # case insensitive, let's make it lowercase to improve readability.
18740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18741      # Now convert it back to Unix-stile (cygpath)
18742      input_path=`$CYGPATH -u "$shortmode_path"`
18743      new_path="$input_path"
18744    fi
18745  fi
18746
18747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18748  if test "x$test_cygdrive_prefix" = x; then
18749    # As a simple fix, exclude /usr/bin since it's not a real path.
18750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18752      # a path prefixed by /cygdrive for fixpath to work.
18753      new_path="$CYGWIN_ROOT_PATH$input_path"
18754    fi
18755  fi
18756
18757  # remove trailing .exe if any
18758  new_path="${new_path/%.exe/}"
18759
18760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18761
18762  # First separate the path from the arguments. This will split at the first
18763  # space.
18764  complete="$BUILD_LD"
18765  path="${complete%% *}"
18766  tmp="$complete EOL"
18767  arguments="${tmp#* }"
18768
18769  # Input might be given as Windows format, start by converting to
18770  # unix format.
18771  new_path="$path"
18772
18773  windows_path="$new_path"
18774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18775    unix_path=`$CYGPATH -u "$windows_path"`
18776    new_path="$unix_path"
18777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18779    new_path="$unix_path"
18780  fi
18781
18782
18783  # Now try to locate executable using which
18784  new_path=`$WHICH "$new_path" 2> /dev/null`
18785
18786  if test "x$new_path" = x; then
18787    # Oops. Which didn't find the executable.
18788    # The splitting of arguments from the executable at a space might have been incorrect,
18789    # since paths with space are more likely in Windows. Give it another try with the whole
18790    # argument.
18791    path="$complete"
18792    arguments="EOL"
18793    new_path="$path"
18794
18795  windows_path="$new_path"
18796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18797    unix_path=`$CYGPATH -u "$windows_path"`
18798    new_path="$unix_path"
18799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18801    new_path="$unix_path"
18802  fi
18803
18804
18805    new_path=`$WHICH "$new_path" 2> /dev/null`
18806
18807    if test "x$new_path" = x; then
18808      # It's still not found. Now this is an unrecoverable error.
18809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18810$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18811      has_space=`$ECHO "$complete" | $GREP " "`
18812      if test "x$has_space" != x; then
18813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18815      fi
18816      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18817    fi
18818  fi
18819
18820  # Now new_path has a complete unix path to the binary
18821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18822    # Keep paths in /bin as-is, but remove trailing .exe if any
18823    new_path="${new_path/%.exe/}"
18824    # Do not save /bin paths to all_fixpath_prefixes!
18825  else
18826    # Not in mixed or Windows style, start by that.
18827    new_path=`cmd //c echo $new_path`
18828
18829  input_path="$new_path"
18830  # Check if we need to convert this using DOS-style short mode. If the path
18831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18832  # take no chances and rewrite it.
18833  # Note: m4 eats our [], so we need to use [ and ] instead.
18834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18835  if test "x$has_forbidden_chars" != x; then
18836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18838  fi
18839
18840    # Output is in $new_path
18841
18842  windows_path="$new_path"
18843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844    unix_path=`$CYGPATH -u "$windows_path"`
18845    new_path="$unix_path"
18846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18848    new_path="$unix_path"
18849  fi
18850
18851    # remove trailing .exe if any
18852    new_path="${new_path/%.exe/}"
18853
18854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18856  fi
18857
18858  else
18859    # We're on a posix platform. Hooray! :)
18860    # First separate the path from the arguments. This will split at the first
18861    # space.
18862    complete="$BUILD_LD"
18863    path="${complete%% *}"
18864    tmp="$complete EOL"
18865    arguments="${tmp#* }"
18866
18867    # Cannot rely on the command "which" here since it doesn't always work.
18868    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18869    if test -z "$is_absolute_path"; then
18870      # Path to executable is not absolute. Find it.
18871      IFS_save="$IFS"
18872      IFS=:
18873      for p in $PATH; do
18874        if test -f "$p/$path" && test -x "$p/$path"; then
18875          new_path="$p/$path"
18876          break
18877        fi
18878      done
18879      IFS="$IFS_save"
18880    else
18881      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18882$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18883      new_path="$path"
18884    fi
18885
18886    if test "x$new_path" = x; then
18887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18888$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18889        has_space=`$ECHO "$complete" | $GREP " "`
18890        if test "x$has_space" != x; then
18891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18893        fi
18894        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18895      fi
18896  fi
18897
18898      # Now join together the path and the arguments once again
18899      if test "x$arguments" != xEOL; then
18900        new_complete="$new_path ${arguments% *}"
18901      else
18902        new_complete="$new_path"
18903      fi
18904
18905  if test "x$complete" != "x$new_complete"; then
18906      BUILD_LD="$new_complete"
18907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18908$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18909    fi
18910
18911fi
18912
18913
18914
18915
18916# If a devkit is found on the builddeps server, then prepend its path to the
18917# PATH variable. If there are cross compilers available in the devkit, these
18918# will be found by AC_PROG_CC et al.
18919DEVKIT=
18920
18921
18922    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18923        # Source the builddeps file again, to make sure it uses the latest variables!
18924        . $builddepsfile
18925        # Look for a target and build machine specific resource!
18926        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18927        if test "x$resource" = x; then
18928            # Ok, lets instead look for a target specific resource
18929            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18930        fi
18931        if test "x$resource" = x; then
18932            # Ok, lets instead look for a build specific resource
18933            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18934        fi
18935        if test "x$resource" = x; then
18936            # Ok, lets instead look for a generic resource
18937            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18938            resource=${builddep_devkit}
18939        fi
18940        if test "x$resource" != x; then
18941            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18942$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18943	    # If the resource in the builddeps.conf file is an existing directory,
18944	    # for example /java/linux/cups
18945	    if test -d ${resource}; then
18946	       depdir=${resource}
18947	    else
18948
18949# devkit is for example mymodule
18950# $resource is for example libs/general/libmymod_1_2_3.zip
18951# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18952# $with_builddeps_dir is for example /localhome/builddeps
18953# depdir is the name of the variable into which we store the depdir, eg MYMOD
18954# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18955# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18956    filename=`basename $resource`
18957    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18958    filebase=${filename%%.*}
18959    extension=${filename#*.}
18960    installdir=$with_builddeps_dir/$filebase
18961    if test ! -f $installdir/$filename.unpacked; then
18962        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18963$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18964        if test ! -d $installdir; then
18965            mkdir -p $installdir
18966        fi
18967        if test ! -d $installdir; then
18968            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18969        fi
18970        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18971        touch $tmpfile
18972        if test ! -f $tmpfile; then
18973            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18974        fi
18975
18976    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18977    # $tmpfile is the local file name for the downloaded file.
18978    VALID_TOOL=no
18979    if test "x$BDEPS_FTP" = xwget; then
18980       VALID_TOOL=yes
18981       wget -O $tmpfile $with_builddeps_server/$resource
18982    fi
18983    if test "x$BDEPS_FTP" = xlftp; then
18984       VALID_TOOL=yes
18985       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18986    fi
18987    if test "x$BDEPS_FTP" = xftp; then
18988        VALID_TOOL=yes
18989        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18990        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18991        FTPUSERPWD=${FTPSERVER%%@*}
18992        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18993            FTPUSER=${userpwd%%:*}
18994            FTPPWD=${userpwd#*@}
18995            FTPSERVER=${FTPSERVER#*@}
18996        else
18997            FTPUSER=ftp
18998            FTPPWD=ftp
18999        fi
19000        # the "pass" command does not work on some
19001        # ftp clients (read ftp.exe) but if it works,
19002        # passive mode is better!
19003        (\
19004            echo "user $FTPUSER $FTPPWD"        ;\
19005            echo "pass"                         ;\
19006            echo "bin"                          ;\
19007            echo "get $FTPPATH $tmpfile"              ;\
19008        ) | ftp -in $FTPSERVER
19009    fi
19010    if test "x$VALID_TOOL" != xyes; then
19011       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19012    fi
19013
19014        mv $tmpfile $installdir/$filename
19015        if test ! -s $installdir/$filename; then
19016            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19017        fi
19018        case "$extension" in
19019            zip)  echo "Unzipping $installdir/$filename..."
19020               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19021            ;;
19022            tar.gz) echo "Untaring $installdir/$filename..."
19023               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19024            ;;
19025            tgz) echo "Untaring $installdir/$filename..."
19026               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19027            ;;
19028            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19029            ;;
19030        esac
19031    fi
19032    if test -f $installdir/$filename.unpacked; then
19033        depdir=$installdir
19034    fi
19035
19036	    fi
19037            # Source the builddeps file again, because in the previous command, the depdir
19038            # was updated to point at the current build dependency install directory.
19039            . $builddepsfile
19040            # Now extract variables from the builddeps.conf files.
19041            theroot=${builddep_devkit_ROOT}
19042            thecflags=${builddep_devkit_CFLAGS}
19043            thelibs=${builddep_devkit_LIBS}
19044            if test "x$depdir" = x; then
19045                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19046            fi
19047            DEVKIT=$depdir
19048            if test "x$theroot" != x; then
19049               DEVKIT="$theroot"
19050            fi
19051            if test "x$thecflags" != x; then
19052               DEVKIT_CFLAGS="$thecflags"
19053            fi
19054            if test "x$thelibs" != x; then
19055               DEVKIT_LIBS="$thelibs"
19056            fi
19057            # Found devkit
19058                     PATH="$DEVKIT/bin:$PATH"
19059                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19060                     if test "x$x_includes" = "xNONE"; then
19061                         x_includes="$SYS_ROOT/usr/include/X11"
19062                     fi
19063                     if test "x$x_libraries" = "xNONE"; then
19064                         x_libraries="$SYS_ROOT/usr/lib"
19065                     fi
19066
19067
19068        fi
19069
19070    fi
19071
19072
19073# Store the CFLAGS etal passed to the configure script.
19074ORG_CFLAGS="$CFLAGS"
19075ORG_CXXFLAGS="$CXXFLAGS"
19076ORG_OBJCFLAGS="$OBJCFLAGS"
19077
19078# autoconf magic only relies on PATH, so update it if tools dir is specified
19079OLD_PATH="$PATH"
19080if test "x$TOOLS_DIR" != x; then
19081  PATH=$TOOLS_DIR:$PATH
19082fi
19083
19084
19085### Locate C compiler (CC)
19086
19087# On windows, only cl.exe is supported.
19088# On Solaris, cc is preferred to gcc.
19089# Elsewhere, gcc is preferred to cc.
19090
19091if test "x$CC" != x; then
19092  COMPILER_CHECK_LIST="$CC"
19093elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19094  COMPILER_CHECK_LIST="cl"
19095elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19096  COMPILER_CHECK_LIST="cc gcc"
19097else
19098  COMPILER_CHECK_LIST="gcc cc"
19099fi
19100
19101
19102  COMPILER_NAME=C
19103
19104  CC=
19105  # If TOOLS_DIR is set, check for all compiler names in there first
19106  # before checking the rest of the PATH.
19107  if test -n "$TOOLS_DIR"; then
19108    PATH_save="$PATH"
19109    PATH="$TOOLS_DIR"
19110    for ac_prog in $COMPILER_CHECK_LIST
19111do
19112  # Extract the first word of "$ac_prog", so it can be a program name with args.
19113set dummy $ac_prog; ac_word=$2
19114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19115$as_echo_n "checking for $ac_word... " >&6; }
19116if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
19117  $as_echo_n "(cached) " >&6
19118else
19119  case $TOOLS_DIR_CC in
19120  [\\/]* | ?:[\\/]*)
19121  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19122  ;;
19123  *)
19124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19125for as_dir in $PATH
19126do
19127  IFS=$as_save_IFS
19128  test -z "$as_dir" && as_dir=.
19129    for ac_exec_ext in '' $ac_executable_extensions; do
19130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19131    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19133    break 2
19134  fi
19135done
19136  done
19137IFS=$as_save_IFS
19138
19139  ;;
19140esac
19141fi
19142TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19143if test -n "$TOOLS_DIR_CC"; then
19144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19145$as_echo "$TOOLS_DIR_CC" >&6; }
19146else
19147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19148$as_echo "no" >&6; }
19149fi
19150
19151
19152  test -n "$TOOLS_DIR_CC" && break
19153done
19154
19155    CC=$TOOLS_DIR_CC
19156    PATH="$PATH_save"
19157  fi
19158
19159  # AC_PATH_PROGS can't be run multiple times with the same variable,
19160  # so create a new name for this run.
19161  if test "x$CC" = x; then
19162    for ac_prog in $COMPILER_CHECK_LIST
19163do
19164  # Extract the first word of "$ac_prog", so it can be a program name with args.
19165set dummy $ac_prog; ac_word=$2
19166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19167$as_echo_n "checking for $ac_word... " >&6; }
19168if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19169  $as_echo_n "(cached) " >&6
19170else
19171  case $POTENTIAL_CC in
19172  [\\/]* | ?:[\\/]*)
19173  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19174  ;;
19175  *)
19176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19177for as_dir in $PATH
19178do
19179  IFS=$as_save_IFS
19180  test -z "$as_dir" && as_dir=.
19181    for ac_exec_ext in '' $ac_executable_extensions; do
19182  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19183    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19185    break 2
19186  fi
19187done
19188  done
19189IFS=$as_save_IFS
19190
19191  ;;
19192esac
19193fi
19194POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19195if test -n "$POTENTIAL_CC"; then
19196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19197$as_echo "$POTENTIAL_CC" >&6; }
19198else
19199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19200$as_echo "no" >&6; }
19201fi
19202
19203
19204  test -n "$POTENTIAL_CC" && break
19205done
19206
19207    CC=$POTENTIAL_CC
19208  fi
19209
19210  if test "x$CC" = x; then
19211
19212    # Print a helpful message on how to acquire the necessary build dependency.
19213    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19214    MISSING_DEPENDENCY=devkit
19215    PKGHANDLER_COMMAND=
19216
19217    case $PKGHANDLER in
19218	apt-get)
19219                apt_help     $MISSING_DEPENDENCY ;;
19220    yum)
19221                yum_help     $MISSING_DEPENDENCY ;;
19222	port)
19223                port_help    $MISSING_DEPENDENCY ;;
19224	pkgutil)
19225                pkgutil_help $MISSING_DEPENDENCY ;;
19226	pkgadd)
19227                pkgadd_help  $MISSING_DEPENDENCY ;;
19228    * )
19229      break ;;
19230    esac
19231
19232    if test "x$PKGHANDLER_COMMAND" != x; then
19233        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19234    fi
19235
19236      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19237  fi
19238
19239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19240
19241  # First separate the path from the arguments. This will split at the first
19242  # space.
19243  complete="$CC"
19244  path="${complete%% *}"
19245  tmp="$complete EOL"
19246  arguments="${tmp#* }"
19247
19248  # Input might be given as Windows format, start by converting to
19249  # unix format.
19250  new_path=`$CYGPATH -u "$path"`
19251
19252  # Now try to locate executable using which
19253  new_path=`$WHICH "$new_path" 2> /dev/null`
19254  # bat and cmd files are not always considered executable in cygwin causing which
19255  # to not find them
19256  if test "x$new_path" = x \
19257           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19258           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19259    new_path=`$CYGPATH -u "$path"`
19260  fi
19261  if test "x$new_path" = x; then
19262    # Oops. Which didn't find the executable.
19263    # The splitting of arguments from the executable at a space might have been incorrect,
19264    # since paths with space are more likely in Windows. Give it another try with the whole
19265    # argument.
19266    path="$complete"
19267    arguments="EOL"
19268    new_path=`$CYGPATH -u "$path"`
19269    new_path=`$WHICH "$new_path" 2> /dev/null`
19270    # bat and cmd files are not always considered executable in cygwin causing which
19271    # to not find them
19272    if test "x$new_path" = x \
19273             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19274             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19275      new_path=`$CYGPATH -u "$path"`
19276    fi
19277    if test "x$new_path" = x; then
19278      # It's still not found. Now this is an unrecoverable error.
19279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19280$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19281      has_space=`$ECHO "$complete" | $GREP " "`
19282      if test "x$has_space" != x; then
19283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19285      fi
19286      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19287    fi
19288  fi
19289
19290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19293  # "foo.exe" is OK but "foo" is an error.
19294  #
19295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19296  # It is also a way to make sure we got the proper file name for the real test later on.
19297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19298  if test "x$test_shortpath" = x; then
19299    # Short path failed, file does not exist as specified.
19300    # Try adding .exe or .cmd
19301    if test -f "${new_path}.exe"; then
19302       input_to_shortpath="${new_path}.exe"
19303    elif test -f "${new_path}.cmd"; then
19304       input_to_shortpath="${new_path}.cmd"
19305    else
19306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19307$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19310      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19311    fi
19312  else
19313    input_to_shortpath="$new_path"
19314  fi
19315
19316  # Call helper function which possibly converts this using DOS-style short mode.
19317  # If so, the updated path is stored in $new_path.
19318  new_path="$input_to_shortpath"
19319
19320  input_path="$input_to_shortpath"
19321  # Check if we need to convert this using DOS-style short mode. If the path
19322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19323  # take no chances and rewrite it.
19324  # Note: m4 eats our [], so we need to use [ and ] instead.
19325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19326  if test "x$has_forbidden_chars" != x; then
19327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19331      # Going to short mode and back again did indeed matter. Since short mode is
19332      # case insensitive, let's make it lowercase to improve readability.
19333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19334      # Now convert it back to Unix-stile (cygpath)
19335      input_path=`$CYGPATH -u "$shortmode_path"`
19336      new_path="$input_path"
19337    fi
19338  fi
19339
19340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19341  if test "x$test_cygdrive_prefix" = x; then
19342    # As a simple fix, exclude /usr/bin since it's not a real path.
19343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19345      # a path prefixed by /cygdrive for fixpath to work.
19346      new_path="$CYGWIN_ROOT_PATH$input_path"
19347    fi
19348  fi
19349
19350  # remove trailing .exe if any
19351  new_path="${new_path/%.exe/}"
19352
19353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19354
19355  # First separate the path from the arguments. This will split at the first
19356  # space.
19357  complete="$CC"
19358  path="${complete%% *}"
19359  tmp="$complete EOL"
19360  arguments="${tmp#* }"
19361
19362  # Input might be given as Windows format, start by converting to
19363  # unix format.
19364  new_path="$path"
19365
19366  windows_path="$new_path"
19367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19368    unix_path=`$CYGPATH -u "$windows_path"`
19369    new_path="$unix_path"
19370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19372    new_path="$unix_path"
19373  fi
19374
19375
19376  # Now try to locate executable using which
19377  new_path=`$WHICH "$new_path" 2> /dev/null`
19378
19379  if test "x$new_path" = x; then
19380    # Oops. Which didn't find the executable.
19381    # The splitting of arguments from the executable at a space might have been incorrect,
19382    # since paths with space are more likely in Windows. Give it another try with the whole
19383    # argument.
19384    path="$complete"
19385    arguments="EOL"
19386    new_path="$path"
19387
19388  windows_path="$new_path"
19389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19390    unix_path=`$CYGPATH -u "$windows_path"`
19391    new_path="$unix_path"
19392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19394    new_path="$unix_path"
19395  fi
19396
19397
19398    new_path=`$WHICH "$new_path" 2> /dev/null`
19399
19400    if test "x$new_path" = x; then
19401      # It's still not found. Now this is an unrecoverable error.
19402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19403$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19404      has_space=`$ECHO "$complete" | $GREP " "`
19405      if test "x$has_space" != x; then
19406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19408      fi
19409      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19410    fi
19411  fi
19412
19413  # Now new_path has a complete unix path to the binary
19414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19415    # Keep paths in /bin as-is, but remove trailing .exe if any
19416    new_path="${new_path/%.exe/}"
19417    # Do not save /bin paths to all_fixpath_prefixes!
19418  else
19419    # Not in mixed or Windows style, start by that.
19420    new_path=`cmd //c echo $new_path`
19421
19422  input_path="$new_path"
19423  # Check if we need to convert this using DOS-style short mode. If the path
19424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19425  # take no chances and rewrite it.
19426  # Note: m4 eats our [], so we need to use [ and ] instead.
19427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19428  if test "x$has_forbidden_chars" != x; then
19429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19431  fi
19432
19433    # Output is in $new_path
19434
19435  windows_path="$new_path"
19436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19437    unix_path=`$CYGPATH -u "$windows_path"`
19438    new_path="$unix_path"
19439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19441    new_path="$unix_path"
19442  fi
19443
19444    # remove trailing .exe if any
19445    new_path="${new_path/%.exe/}"
19446
19447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19449  fi
19450
19451  else
19452    # We're on a posix platform. Hooray! :)
19453    # First separate the path from the arguments. This will split at the first
19454    # space.
19455    complete="$CC"
19456    path="${complete%% *}"
19457    tmp="$complete EOL"
19458    arguments="${tmp#* }"
19459
19460    # Cannot rely on the command "which" here since it doesn't always work.
19461    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19462    if test -z "$is_absolute_path"; then
19463      # Path to executable is not absolute. Find it.
19464      IFS_save="$IFS"
19465      IFS=:
19466      for p in $PATH; do
19467        if test -f "$p/$path" && test -x "$p/$path"; then
19468          new_path="$p/$path"
19469          break
19470        fi
19471      done
19472      IFS="$IFS_save"
19473    else
19474      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19475$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19476      new_path="$path"
19477    fi
19478
19479    if test "x$new_path" = x; then
19480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19481$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19482        has_space=`$ECHO "$complete" | $GREP " "`
19483        if test "x$has_space" != x; then
19484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19486        fi
19487        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19488      fi
19489  fi
19490
19491      # Now join together the path and the arguments once again
19492      if test "x$arguments" != xEOL; then
19493        new_complete="$new_path ${arguments% *}"
19494      else
19495        new_complete="$new_path"
19496      fi
19497
19498  if test "x$complete" != "x$new_complete"; then
19499      CC="$new_complete"
19500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19501$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19502    fi
19503
19504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19505$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19506  TEST_COMPILER="$CC"
19507
19508    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19509        # Follow a chain of symbolic links. Use readlink
19510        # where it exists, else fall back to horribly
19511        # complicated shell code.
19512        if test "x$READLINK_TESTED" != yes; then
19513            # On MacOSX there is a readlink tool with a different
19514            # purpose than the GNU readlink tool. Check the found readlink.
19515            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19516            if test "x$ISGNU" = x; then
19517                 # A readlink that we do not know how to use.
19518                 # Are there other non-GNU readlinks out there?
19519                 READLINK_TESTED=yes
19520                 READLINK=
19521            fi
19522        fi
19523
19524        if test "x$READLINK" != x; then
19525            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19526        else
19527            # Save the current directory for restoring afterwards
19528            STARTDIR=$PWD
19529            COUNTER=0
19530            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19531            sym_link_file=`$BASENAME $TEST_COMPILER`
19532            cd $sym_link_dir
19533            # Use -P flag to resolve symlinks in directories.
19534            cd `$THEPWDCMD -P`
19535            sym_link_dir=`$THEPWDCMD -P`
19536            # Resolve file symlinks
19537            while test $COUNTER -lt 20; do
19538                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19539                if test "x$ISLINK" == x; then
19540                    # This is not a symbolic link! We are done!
19541                    break
19542                fi
19543                # Again resolve directory symlinks since the target of the just found
19544                # link could be in a different directory
19545                cd `$DIRNAME $ISLINK`
19546                sym_link_dir=`$THEPWDCMD -P`
19547                sym_link_file=`$BASENAME $ISLINK`
19548                let COUNTER=COUNTER+1
19549            done
19550            cd $STARTDIR
19551            TEST_COMPILER=$sym_link_dir/$sym_link_file
19552        fi
19553    fi
19554
19555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19556$as_echo "$TEST_COMPILER" >&6; }
19557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19558$as_echo_n "checking if CC is disguised ccache... " >&6; }
19559
19560  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19561  if test "x$COMPILER_BASENAME" = "xccache"; then
19562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19563$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19564    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19565    # We want to control ccache invocation ourselves, so ignore this cc and try
19566    # searching again.
19567
19568    # Remove the path to the fake ccache cc from the PATH
19569    RETRY_COMPILER_SAVED_PATH="$PATH"
19570    COMPILER_DIRNAME=`$DIRNAME $CC`
19571    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19572
19573    # Try again looking for our compiler
19574    if test -n "$ac_tool_prefix"; then
19575  for ac_prog in $COMPILER_CHECK_LIST
19576  do
19577    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19578set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19580$as_echo_n "checking for $ac_word... " >&6; }
19581if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19582  $as_echo_n "(cached) " >&6
19583else
19584  if test -n "$PROPER_COMPILER_CC"; then
19585  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19586else
19587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19588for as_dir in $PATH
19589do
19590  IFS=$as_save_IFS
19591  test -z "$as_dir" && as_dir=.
19592    for ac_exec_ext in '' $ac_executable_extensions; do
19593  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19594    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19596    break 2
19597  fi
19598done
19599  done
19600IFS=$as_save_IFS
19601
19602fi
19603fi
19604PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19605if test -n "$PROPER_COMPILER_CC"; then
19606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19607$as_echo "$PROPER_COMPILER_CC" >&6; }
19608else
19609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19610$as_echo "no" >&6; }
19611fi
19612
19613
19614    test -n "$PROPER_COMPILER_CC" && break
19615  done
19616fi
19617if test -z "$PROPER_COMPILER_CC"; then
19618  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19619  for ac_prog in $COMPILER_CHECK_LIST
19620do
19621  # Extract the first word of "$ac_prog", so it can be a program name with args.
19622set dummy $ac_prog; ac_word=$2
19623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19624$as_echo_n "checking for $ac_word... " >&6; }
19625if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19626  $as_echo_n "(cached) " >&6
19627else
19628  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19629  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19630else
19631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19632for as_dir in $PATH
19633do
19634  IFS=$as_save_IFS
19635  test -z "$as_dir" && as_dir=.
19636    for ac_exec_ext in '' $ac_executable_extensions; do
19637  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19638    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19640    break 2
19641  fi
19642done
19643  done
19644IFS=$as_save_IFS
19645
19646fi
19647fi
19648ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19649if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19651$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19652else
19653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19654$as_echo "no" >&6; }
19655fi
19656
19657
19658  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19659done
19660
19661  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19662    PROPER_COMPILER_CC=""
19663  else
19664    case $cross_compiling:$ac_tool_warned in
19665yes:)
19666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19668ac_tool_warned=yes ;;
19669esac
19670    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19671  fi
19672fi
19673
19674
19675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19676
19677  # First separate the path from the arguments. This will split at the first
19678  # space.
19679  complete="$PROPER_COMPILER_CC"
19680  path="${complete%% *}"
19681  tmp="$complete EOL"
19682  arguments="${tmp#* }"
19683
19684  # Input might be given as Windows format, start by converting to
19685  # unix format.
19686  new_path=`$CYGPATH -u "$path"`
19687
19688  # Now try to locate executable using which
19689  new_path=`$WHICH "$new_path" 2> /dev/null`
19690  # bat and cmd files are not always considered executable in cygwin causing which
19691  # to not find them
19692  if test "x$new_path" = x \
19693           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19694           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19695    new_path=`$CYGPATH -u "$path"`
19696  fi
19697  if test "x$new_path" = x; then
19698    # Oops. Which didn't find the executable.
19699    # The splitting of arguments from the executable at a space might have been incorrect,
19700    # since paths with space are more likely in Windows. Give it another try with the whole
19701    # argument.
19702    path="$complete"
19703    arguments="EOL"
19704    new_path=`$CYGPATH -u "$path"`
19705    new_path=`$WHICH "$new_path" 2> /dev/null`
19706    # bat and cmd files are not always considered executable in cygwin causing which
19707    # to not find them
19708    if test "x$new_path" = x \
19709             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19710             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19711      new_path=`$CYGPATH -u "$path"`
19712    fi
19713    if test "x$new_path" = x; then
19714      # It's still not found. Now this is an unrecoverable error.
19715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19716$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19717      has_space=`$ECHO "$complete" | $GREP " "`
19718      if test "x$has_space" != x; then
19719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19721      fi
19722      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19723    fi
19724  fi
19725
19726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19729  # "foo.exe" is OK but "foo" is an error.
19730  #
19731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19732  # It is also a way to make sure we got the proper file name for the real test later on.
19733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19734  if test "x$test_shortpath" = x; then
19735    # Short path failed, file does not exist as specified.
19736    # Try adding .exe or .cmd
19737    if test -f "${new_path}.exe"; then
19738       input_to_shortpath="${new_path}.exe"
19739    elif test -f "${new_path}.cmd"; then
19740       input_to_shortpath="${new_path}.cmd"
19741    else
19742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19743$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19746      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19747    fi
19748  else
19749    input_to_shortpath="$new_path"
19750  fi
19751
19752  # Call helper function which possibly converts this using DOS-style short mode.
19753  # If so, the updated path is stored in $new_path.
19754  new_path="$input_to_shortpath"
19755
19756  input_path="$input_to_shortpath"
19757  # Check if we need to convert this using DOS-style short mode. If the path
19758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19759  # take no chances and rewrite it.
19760  # Note: m4 eats our [], so we need to use [ and ] instead.
19761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19762  if test "x$has_forbidden_chars" != x; then
19763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19767      # Going to short mode and back again did indeed matter. Since short mode is
19768      # case insensitive, let's make it lowercase to improve readability.
19769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19770      # Now convert it back to Unix-stile (cygpath)
19771      input_path=`$CYGPATH -u "$shortmode_path"`
19772      new_path="$input_path"
19773    fi
19774  fi
19775
19776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19777  if test "x$test_cygdrive_prefix" = x; then
19778    # As a simple fix, exclude /usr/bin since it's not a real path.
19779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19781      # a path prefixed by /cygdrive for fixpath to work.
19782      new_path="$CYGWIN_ROOT_PATH$input_path"
19783    fi
19784  fi
19785
19786  # remove trailing .exe if any
19787  new_path="${new_path/%.exe/}"
19788
19789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790
19791  # First separate the path from the arguments. This will split at the first
19792  # space.
19793  complete="$PROPER_COMPILER_CC"
19794  path="${complete%% *}"
19795  tmp="$complete EOL"
19796  arguments="${tmp#* }"
19797
19798  # Input might be given as Windows format, start by converting to
19799  # unix format.
19800  new_path="$path"
19801
19802  windows_path="$new_path"
19803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19804    unix_path=`$CYGPATH -u "$windows_path"`
19805    new_path="$unix_path"
19806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19808    new_path="$unix_path"
19809  fi
19810
19811
19812  # Now try to locate executable using which
19813  new_path=`$WHICH "$new_path" 2> /dev/null`
19814
19815  if test "x$new_path" = x; then
19816    # Oops. Which didn't find the executable.
19817    # The splitting of arguments from the executable at a space might have been incorrect,
19818    # since paths with space are more likely in Windows. Give it another try with the whole
19819    # argument.
19820    path="$complete"
19821    arguments="EOL"
19822    new_path="$path"
19823
19824  windows_path="$new_path"
19825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826    unix_path=`$CYGPATH -u "$windows_path"`
19827    new_path="$unix_path"
19828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19830    new_path="$unix_path"
19831  fi
19832
19833
19834    new_path=`$WHICH "$new_path" 2> /dev/null`
19835
19836    if test "x$new_path" = x; then
19837      # It's still not found. Now this is an unrecoverable error.
19838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19839$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19840      has_space=`$ECHO "$complete" | $GREP " "`
19841      if test "x$has_space" != x; then
19842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19844      fi
19845      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19846    fi
19847  fi
19848
19849  # Now new_path has a complete unix path to the binary
19850  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19851    # Keep paths in /bin as-is, but remove trailing .exe if any
19852    new_path="${new_path/%.exe/}"
19853    # Do not save /bin paths to all_fixpath_prefixes!
19854  else
19855    # Not in mixed or Windows style, start by that.
19856    new_path=`cmd //c echo $new_path`
19857
19858  input_path="$new_path"
19859  # Check if we need to convert this using DOS-style short mode. If the path
19860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19861  # take no chances and rewrite it.
19862  # Note: m4 eats our [], so we need to use [ and ] instead.
19863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19864  if test "x$has_forbidden_chars" != x; then
19865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19867  fi
19868
19869    # Output is in $new_path
19870
19871  windows_path="$new_path"
19872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19873    unix_path=`$CYGPATH -u "$windows_path"`
19874    new_path="$unix_path"
19875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19877    new_path="$unix_path"
19878  fi
19879
19880    # remove trailing .exe if any
19881    new_path="${new_path/%.exe/}"
19882
19883    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19884    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19885  fi
19886
19887  else
19888    # We're on a posix platform. Hooray! :)
19889    # First separate the path from the arguments. This will split at the first
19890    # space.
19891    complete="$PROPER_COMPILER_CC"
19892    path="${complete%% *}"
19893    tmp="$complete EOL"
19894    arguments="${tmp#* }"
19895
19896    # Cannot rely on the command "which" here since it doesn't always work.
19897    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19898    if test -z "$is_absolute_path"; then
19899      # Path to executable is not absolute. Find it.
19900      IFS_save="$IFS"
19901      IFS=:
19902      for p in $PATH; do
19903        if test -f "$p/$path" && test -x "$p/$path"; then
19904          new_path="$p/$path"
19905          break
19906        fi
19907      done
19908      IFS="$IFS_save"
19909    else
19910      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19911$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19912      new_path="$path"
19913    fi
19914
19915    if test "x$new_path" = x; then
19916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19917$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19918        has_space=`$ECHO "$complete" | $GREP " "`
19919        if test "x$has_space" != x; then
19920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19922        fi
19923        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19924      fi
19925  fi
19926
19927      # Now join together the path and the arguments once again
19928      if test "x$arguments" != xEOL; then
19929        new_complete="$new_path ${arguments% *}"
19930      else
19931        new_complete="$new_path"
19932      fi
19933
19934  if test "x$complete" != "x$new_complete"; then
19935      PROPER_COMPILER_CC="$new_complete"
19936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19937$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19938    fi
19939
19940    PATH="$RETRY_COMPILER_SAVED_PATH"
19941
19942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19943$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19944
19945    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19946        # Follow a chain of symbolic links. Use readlink
19947        # where it exists, else fall back to horribly
19948        # complicated shell code.
19949        if test "x$READLINK_TESTED" != yes; then
19950            # On MacOSX there is a readlink tool with a different
19951            # purpose than the GNU readlink tool. Check the found readlink.
19952            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19953            if test "x$ISGNU" = x; then
19954                 # A readlink that we do not know how to use.
19955                 # Are there other non-GNU readlinks out there?
19956                 READLINK_TESTED=yes
19957                 READLINK=
19958            fi
19959        fi
19960
19961        if test "x$READLINK" != x; then
19962            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19963        else
19964            # Save the current directory for restoring afterwards
19965            STARTDIR=$PWD
19966            COUNTER=0
19967            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19968            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19969            cd $sym_link_dir
19970            # Use -P flag to resolve symlinks in directories.
19971            cd `$THEPWDCMD -P`
19972            sym_link_dir=`$THEPWDCMD -P`
19973            # Resolve file symlinks
19974            while test $COUNTER -lt 20; do
19975                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19976                if test "x$ISLINK" == x; then
19977                    # This is not a symbolic link! We are done!
19978                    break
19979                fi
19980                # Again resolve directory symlinks since the target of the just found
19981                # link could be in a different directory
19982                cd `$DIRNAME $ISLINK`
19983                sym_link_dir=`$THEPWDCMD -P`
19984                sym_link_file=`$BASENAME $ISLINK`
19985                let COUNTER=COUNTER+1
19986            done
19987            cd $STARTDIR
19988            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19989        fi
19990    fi
19991
19992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19993$as_echo "$PROPER_COMPILER_CC" >&6; }
19994    CC="$PROPER_COMPILER_CC"
19995  else
19996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19997$as_echo "no, keeping CC" >&6; }
19998    CC="$TEST_COMPILER"
19999  fi
20000
20001  COMPILER=$CC
20002  COMPILER_NAME=$COMPILER_NAME
20003
20004  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20005    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20006    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20007    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20008    if test $? -ne 0; then
20009      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20010
20011      { $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
20012$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20013      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20014$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20015      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20016    else
20017      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20018      COMPILER_VENDOR="Sun Studio"
20019    fi
20020  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20021    # First line typically looks something like:
20022    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20023    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20024    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20025    COMPILER_VENDOR="Microsoft CL.EXE"
20026    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20027    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20028      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20029        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20030      fi
20031    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20032      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20033        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20034      fi
20035    fi
20036  else
20037    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20038    # Check that this is likely to be GCC.
20039    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20040    if test $? -ne 0; then
20041      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20042$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20043      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20044$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20045      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20046    fi
20047
20048    # First line typically looks something like:
20049    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20050    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20051    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20052  fi
20053  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20054  CC_VERSION="$COMPILER_VERSION"
20055  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20056  CC_VENDOR="$COMPILER_VENDOR"
20057
20058  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20059$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20060
20061
20062# Now that we have resolved CC ourself, let autoconf have its go at it
20063ac_ext=c
20064ac_cpp='$CPP $CPPFLAGS'
20065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20067ac_compiler_gnu=$ac_cv_c_compiler_gnu
20068if test -n "$ac_tool_prefix"; then
20069  for ac_prog in $CC
20070  do
20071    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20074$as_echo_n "checking for $ac_word... " >&6; }
20075if test "${ac_cv_prog_CC+set}" = set; then :
20076  $as_echo_n "(cached) " >&6
20077else
20078  if test -n "$CC"; then
20079  ac_cv_prog_CC="$CC" # Let the user override the test.
20080else
20081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20082for as_dir in $PATH
20083do
20084  IFS=$as_save_IFS
20085  test -z "$as_dir" && as_dir=.
20086    for ac_exec_ext in '' $ac_executable_extensions; do
20087  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20088    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20090    break 2
20091  fi
20092done
20093  done
20094IFS=$as_save_IFS
20095
20096fi
20097fi
20098CC=$ac_cv_prog_CC
20099if test -n "$CC"; then
20100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20101$as_echo "$CC" >&6; }
20102else
20103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20104$as_echo "no" >&6; }
20105fi
20106
20107
20108    test -n "$CC" && break
20109  done
20110fi
20111if test -z "$CC"; then
20112  ac_ct_CC=$CC
20113  for ac_prog in $CC
20114do
20115  # Extract the first word of "$ac_prog", so it can be a program name with args.
20116set dummy $ac_prog; ac_word=$2
20117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20118$as_echo_n "checking for $ac_word... " >&6; }
20119if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
20120  $as_echo_n "(cached) " >&6
20121else
20122  if test -n "$ac_ct_CC"; then
20123  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20124else
20125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20126for as_dir in $PATH
20127do
20128  IFS=$as_save_IFS
20129  test -z "$as_dir" && as_dir=.
20130    for ac_exec_ext in '' $ac_executable_extensions; do
20131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20132    ac_cv_prog_ac_ct_CC="$ac_prog"
20133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20134    break 2
20135  fi
20136done
20137  done
20138IFS=$as_save_IFS
20139
20140fi
20141fi
20142ac_ct_CC=$ac_cv_prog_ac_ct_CC
20143if test -n "$ac_ct_CC"; then
20144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20145$as_echo "$ac_ct_CC" >&6; }
20146else
20147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20148$as_echo "no" >&6; }
20149fi
20150
20151
20152  test -n "$ac_ct_CC" && break
20153done
20154
20155  if test "x$ac_ct_CC" = x; then
20156    CC=""
20157  else
20158    case $cross_compiling:$ac_tool_warned in
20159yes:)
20160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20162ac_tool_warned=yes ;;
20163esac
20164    CC=$ac_ct_CC
20165  fi
20166fi
20167
20168
20169test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20171as_fn_error $? "no acceptable C compiler found in \$PATH
20172See \`config.log' for more details" "$LINENO" 5 ; }
20173
20174# Provide some information about the compiler.
20175$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20176set X $ac_compile
20177ac_compiler=$2
20178for ac_option in --version -v -V -qversion; do
20179  { { ac_try="$ac_compiler $ac_option >&5"
20180case "(($ac_try" in
20181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20182  *) ac_try_echo=$ac_try;;
20183esac
20184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20185$as_echo "$ac_try_echo"; } >&5
20186  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20187  ac_status=$?
20188  if test -s conftest.err; then
20189    sed '10a\
20190... rest of stderr output deleted ...
20191         10q' conftest.err >conftest.er1
20192    cat conftest.er1 >&5
20193  fi
20194  rm -f conftest.er1 conftest.err
20195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20196  test $ac_status = 0; }
20197done
20198
20199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20200/* end confdefs.h.  */
20201
20202int
20203main ()
20204{
20205
20206  ;
20207  return 0;
20208}
20209_ACEOF
20210ac_clean_files_save=$ac_clean_files
20211ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20212# Try to create an executable without -o first, disregard a.out.
20213# It will help us diagnose broken compilers, and finding out an intuition
20214# of exeext.
20215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20216$as_echo_n "checking whether the C compiler works... " >&6; }
20217ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20218
20219# The possible output files:
20220ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20221
20222ac_rmfiles=
20223for ac_file in $ac_files
20224do
20225  case $ac_file in
20226    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20227    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20228  esac
20229done
20230rm -f $ac_rmfiles
20231
20232if { { ac_try="$ac_link_default"
20233case "(($ac_try" in
20234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20235  *) ac_try_echo=$ac_try;;
20236esac
20237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20238$as_echo "$ac_try_echo"; } >&5
20239  (eval "$ac_link_default") 2>&5
20240  ac_status=$?
20241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20242  test $ac_status = 0; }; then :
20243  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20244# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20245# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20246# so that the user can short-circuit this test for compilers unknown to
20247# Autoconf.
20248for ac_file in $ac_files ''
20249do
20250  test -f "$ac_file" || continue
20251  case $ac_file in
20252    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20253	;;
20254    [ab].out )
20255	# We found the default executable, but exeext='' is most
20256	# certainly right.
20257	break;;
20258    *.* )
20259	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20260	then :; else
20261	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20262	fi
20263	# We set ac_cv_exeext here because the later test for it is not
20264	# safe: cross compilers may not add the suffix if given an `-o'
20265	# argument, so we may need to know it at that point already.
20266	# Even if this section looks crufty: it has the advantage of
20267	# actually working.
20268	break;;
20269    * )
20270	break;;
20271  esac
20272done
20273test "$ac_cv_exeext" = no && ac_cv_exeext=
20274
20275else
20276  ac_file=''
20277fi
20278if test -z "$ac_file"; then :
20279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20280$as_echo "no" >&6; }
20281$as_echo "$as_me: failed program was:" >&5
20282sed 's/^/| /' conftest.$ac_ext >&5
20283
20284{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20286as_fn_error 77 "C compiler cannot create executables
20287See \`config.log' for more details" "$LINENO" 5 ; }
20288else
20289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20290$as_echo "yes" >&6; }
20291fi
20292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20293$as_echo_n "checking for C compiler default output file name... " >&6; }
20294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20295$as_echo "$ac_file" >&6; }
20296ac_exeext=$ac_cv_exeext
20297
20298rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20299ac_clean_files=$ac_clean_files_save
20300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20301$as_echo_n "checking for suffix of executables... " >&6; }
20302if { { ac_try="$ac_link"
20303case "(($ac_try" in
20304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20305  *) ac_try_echo=$ac_try;;
20306esac
20307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20308$as_echo "$ac_try_echo"; } >&5
20309  (eval "$ac_link") 2>&5
20310  ac_status=$?
20311  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20312  test $ac_status = 0; }; then :
20313  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20314# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20315# work properly (i.e., refer to `conftest.exe'), while it won't with
20316# `rm'.
20317for ac_file in conftest.exe conftest conftest.*; do
20318  test -f "$ac_file" || continue
20319  case $ac_file in
20320    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20321    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20322	  break;;
20323    * ) break;;
20324  esac
20325done
20326else
20327  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20329as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20330See \`config.log' for more details" "$LINENO" 5 ; }
20331fi
20332rm -f conftest conftest$ac_cv_exeext
20333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20334$as_echo "$ac_cv_exeext" >&6; }
20335
20336rm -f conftest.$ac_ext
20337EXEEXT=$ac_cv_exeext
20338ac_exeext=$EXEEXT
20339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20340/* end confdefs.h.  */
20341#include <stdio.h>
20342int
20343main ()
20344{
20345FILE *f = fopen ("conftest.out", "w");
20346 return ferror (f) || fclose (f) != 0;
20347
20348  ;
20349  return 0;
20350}
20351_ACEOF
20352ac_clean_files="$ac_clean_files conftest.out"
20353# Check that the compiler produces executables we can run.  If not, either
20354# the compiler is broken, or we cross compile.
20355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20356$as_echo_n "checking whether we are cross compiling... " >&6; }
20357if test "$cross_compiling" != yes; then
20358  { { ac_try="$ac_link"
20359case "(($ac_try" in
20360  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20361  *) ac_try_echo=$ac_try;;
20362esac
20363eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20364$as_echo "$ac_try_echo"; } >&5
20365  (eval "$ac_link") 2>&5
20366  ac_status=$?
20367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20368  test $ac_status = 0; }
20369  if { ac_try='./conftest$ac_cv_exeext'
20370  { { case "(($ac_try" in
20371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20372  *) ac_try_echo=$ac_try;;
20373esac
20374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20375$as_echo "$ac_try_echo"; } >&5
20376  (eval "$ac_try") 2>&5
20377  ac_status=$?
20378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20379  test $ac_status = 0; }; }; then
20380    cross_compiling=no
20381  else
20382    if test "$cross_compiling" = maybe; then
20383	cross_compiling=yes
20384    else
20385	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20387as_fn_error $? "cannot run C compiled programs.
20388If you meant to cross compile, use \`--host'.
20389See \`config.log' for more details" "$LINENO" 5 ; }
20390    fi
20391  fi
20392fi
20393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20394$as_echo "$cross_compiling" >&6; }
20395
20396rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20397ac_clean_files=$ac_clean_files_save
20398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20399$as_echo_n "checking for suffix of object files... " >&6; }
20400if test "${ac_cv_objext+set}" = set; then :
20401  $as_echo_n "(cached) " >&6
20402else
20403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20404/* end confdefs.h.  */
20405
20406int
20407main ()
20408{
20409
20410  ;
20411  return 0;
20412}
20413_ACEOF
20414rm -f conftest.o conftest.obj
20415if { { ac_try="$ac_compile"
20416case "(($ac_try" in
20417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20418  *) ac_try_echo=$ac_try;;
20419esac
20420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20421$as_echo "$ac_try_echo"; } >&5
20422  (eval "$ac_compile") 2>&5
20423  ac_status=$?
20424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20425  test $ac_status = 0; }; then :
20426  for ac_file in conftest.o conftest.obj conftest.*; do
20427  test -f "$ac_file" || continue;
20428  case $ac_file in
20429    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20430    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20431       break;;
20432  esac
20433done
20434else
20435  $as_echo "$as_me: failed program was:" >&5
20436sed 's/^/| /' conftest.$ac_ext >&5
20437
20438{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20440as_fn_error $? "cannot compute suffix of object files: cannot compile
20441See \`config.log' for more details" "$LINENO" 5 ; }
20442fi
20443rm -f conftest.$ac_cv_objext conftest.$ac_ext
20444fi
20445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20446$as_echo "$ac_cv_objext" >&6; }
20447OBJEXT=$ac_cv_objext
20448ac_objext=$OBJEXT
20449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20450$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20451if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20452  $as_echo_n "(cached) " >&6
20453else
20454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20455/* end confdefs.h.  */
20456
20457int
20458main ()
20459{
20460#ifndef __GNUC__
20461       choke me
20462#endif
20463
20464  ;
20465  return 0;
20466}
20467_ACEOF
20468if ac_fn_c_try_compile "$LINENO"; then :
20469  ac_compiler_gnu=yes
20470else
20471  ac_compiler_gnu=no
20472fi
20473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20474ac_cv_c_compiler_gnu=$ac_compiler_gnu
20475
20476fi
20477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20478$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20479if test $ac_compiler_gnu = yes; then
20480  GCC=yes
20481else
20482  GCC=
20483fi
20484ac_test_CFLAGS=${CFLAGS+set}
20485ac_save_CFLAGS=$CFLAGS
20486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20487$as_echo_n "checking whether $CC accepts -g... " >&6; }
20488if test "${ac_cv_prog_cc_g+set}" = set; then :
20489  $as_echo_n "(cached) " >&6
20490else
20491  ac_save_c_werror_flag=$ac_c_werror_flag
20492   ac_c_werror_flag=yes
20493   ac_cv_prog_cc_g=no
20494   CFLAGS="-g"
20495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20496/* end confdefs.h.  */
20497
20498int
20499main ()
20500{
20501
20502  ;
20503  return 0;
20504}
20505_ACEOF
20506if ac_fn_c_try_compile "$LINENO"; then :
20507  ac_cv_prog_cc_g=yes
20508else
20509  CFLAGS=""
20510      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20511/* end confdefs.h.  */
20512
20513int
20514main ()
20515{
20516
20517  ;
20518  return 0;
20519}
20520_ACEOF
20521if ac_fn_c_try_compile "$LINENO"; then :
20522
20523else
20524  ac_c_werror_flag=$ac_save_c_werror_flag
20525	 CFLAGS="-g"
20526	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20527/* end confdefs.h.  */
20528
20529int
20530main ()
20531{
20532
20533  ;
20534  return 0;
20535}
20536_ACEOF
20537if ac_fn_c_try_compile "$LINENO"; then :
20538  ac_cv_prog_cc_g=yes
20539fi
20540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20541fi
20542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20543fi
20544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20545   ac_c_werror_flag=$ac_save_c_werror_flag
20546fi
20547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20548$as_echo "$ac_cv_prog_cc_g" >&6; }
20549if test "$ac_test_CFLAGS" = set; then
20550  CFLAGS=$ac_save_CFLAGS
20551elif test $ac_cv_prog_cc_g = yes; then
20552  if test "$GCC" = yes; then
20553    CFLAGS="-g -O2"
20554  else
20555    CFLAGS="-g"
20556  fi
20557else
20558  if test "$GCC" = yes; then
20559    CFLAGS="-O2"
20560  else
20561    CFLAGS=
20562  fi
20563fi
20564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20565$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20566if test "${ac_cv_prog_cc_c89+set}" = set; then :
20567  $as_echo_n "(cached) " >&6
20568else
20569  ac_cv_prog_cc_c89=no
20570ac_save_CC=$CC
20571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20572/* end confdefs.h.  */
20573#include <stdarg.h>
20574#include <stdio.h>
20575#include <sys/types.h>
20576#include <sys/stat.h>
20577/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20578struct buf { int x; };
20579FILE * (*rcsopen) (struct buf *, struct stat *, int);
20580static char *e (p, i)
20581     char **p;
20582     int i;
20583{
20584  return p[i];
20585}
20586static char *f (char * (*g) (char **, int), char **p, ...)
20587{
20588  char *s;
20589  va_list v;
20590  va_start (v,p);
20591  s = g (p, va_arg (v,int));
20592  va_end (v);
20593  return s;
20594}
20595
20596/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20597   function prototypes and stuff, but not '\xHH' hex character constants.
20598   These don't provoke an error unfortunately, instead are silently treated
20599   as 'x'.  The following induces an error, until -std is added to get
20600   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20601   array size at least.  It's necessary to write '\x00'==0 to get something
20602   that's true only with -std.  */
20603int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20604
20605/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20606   inside strings and character constants.  */
20607#define FOO(x) 'x'
20608int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20609
20610int test (int i, double x);
20611struct s1 {int (*f) (int a);};
20612struct s2 {int (*f) (double a);};
20613int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20614int argc;
20615char **argv;
20616int
20617main ()
20618{
20619return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20620  ;
20621  return 0;
20622}
20623_ACEOF
20624for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20625	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20626do
20627  CC="$ac_save_CC $ac_arg"
20628  if ac_fn_c_try_compile "$LINENO"; then :
20629  ac_cv_prog_cc_c89=$ac_arg
20630fi
20631rm -f core conftest.err conftest.$ac_objext
20632  test "x$ac_cv_prog_cc_c89" != "xno" && break
20633done
20634rm -f conftest.$ac_ext
20635CC=$ac_save_CC
20636
20637fi
20638# AC_CACHE_VAL
20639case "x$ac_cv_prog_cc_c89" in
20640  x)
20641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20642$as_echo "none needed" >&6; } ;;
20643  xno)
20644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20645$as_echo "unsupported" >&6; } ;;
20646  *)
20647    CC="$CC $ac_cv_prog_cc_c89"
20648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20649$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20650esac
20651if test "x$ac_cv_prog_cc_c89" != xno; then :
20652
20653fi
20654
20655ac_ext=cpp
20656ac_cpp='$CXXCPP $CPPFLAGS'
20657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20660
20661
20662### Locate C++ compiler (CXX)
20663
20664if test "x$CXX" != x; then
20665  COMPILER_CHECK_LIST="$CXX"
20666elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20667  COMPILER_CHECK_LIST="cl"
20668elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20669  COMPILER_CHECK_LIST="CC g++"
20670else
20671  COMPILER_CHECK_LIST="g++ CC"
20672fi
20673
20674
20675  COMPILER_NAME=C++
20676
20677  CXX=
20678  # If TOOLS_DIR is set, check for all compiler names in there first
20679  # before checking the rest of the PATH.
20680  if test -n "$TOOLS_DIR"; then
20681    PATH_save="$PATH"
20682    PATH="$TOOLS_DIR"
20683    for ac_prog in $COMPILER_CHECK_LIST
20684do
20685  # Extract the first word of "$ac_prog", so it can be a program name with args.
20686set dummy $ac_prog; ac_word=$2
20687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20688$as_echo_n "checking for $ac_word... " >&6; }
20689if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20690  $as_echo_n "(cached) " >&6
20691else
20692  case $TOOLS_DIR_CXX in
20693  [\\/]* | ?:[\\/]*)
20694  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20695  ;;
20696  *)
20697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20698for as_dir in $PATH
20699do
20700  IFS=$as_save_IFS
20701  test -z "$as_dir" && as_dir=.
20702    for ac_exec_ext in '' $ac_executable_extensions; do
20703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20704    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20706    break 2
20707  fi
20708done
20709  done
20710IFS=$as_save_IFS
20711
20712  ;;
20713esac
20714fi
20715TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20716if test -n "$TOOLS_DIR_CXX"; then
20717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20718$as_echo "$TOOLS_DIR_CXX" >&6; }
20719else
20720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20721$as_echo "no" >&6; }
20722fi
20723
20724
20725  test -n "$TOOLS_DIR_CXX" && break
20726done
20727
20728    CXX=$TOOLS_DIR_CXX
20729    PATH="$PATH_save"
20730  fi
20731
20732  # AC_PATH_PROGS can't be run multiple times with the same variable,
20733  # so create a new name for this run.
20734  if test "x$CXX" = x; then
20735    for ac_prog in $COMPILER_CHECK_LIST
20736do
20737  # Extract the first word of "$ac_prog", so it can be a program name with args.
20738set dummy $ac_prog; ac_word=$2
20739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20740$as_echo_n "checking for $ac_word... " >&6; }
20741if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20742  $as_echo_n "(cached) " >&6
20743else
20744  case $POTENTIAL_CXX in
20745  [\\/]* | ?:[\\/]*)
20746  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20747  ;;
20748  *)
20749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20750for as_dir in $PATH
20751do
20752  IFS=$as_save_IFS
20753  test -z "$as_dir" && as_dir=.
20754    for ac_exec_ext in '' $ac_executable_extensions; do
20755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20756    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20758    break 2
20759  fi
20760done
20761  done
20762IFS=$as_save_IFS
20763
20764  ;;
20765esac
20766fi
20767POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20768if test -n "$POTENTIAL_CXX"; then
20769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20770$as_echo "$POTENTIAL_CXX" >&6; }
20771else
20772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20773$as_echo "no" >&6; }
20774fi
20775
20776
20777  test -n "$POTENTIAL_CXX" && break
20778done
20779
20780    CXX=$POTENTIAL_CXX
20781  fi
20782
20783  if test "x$CXX" = x; then
20784
20785    # Print a helpful message on how to acquire the necessary build dependency.
20786    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20787    MISSING_DEPENDENCY=devkit
20788    PKGHANDLER_COMMAND=
20789
20790    case $PKGHANDLER in
20791	apt-get)
20792                apt_help     $MISSING_DEPENDENCY ;;
20793    yum)
20794                yum_help     $MISSING_DEPENDENCY ;;
20795	port)
20796                port_help    $MISSING_DEPENDENCY ;;
20797	pkgutil)
20798                pkgutil_help $MISSING_DEPENDENCY ;;
20799	pkgadd)
20800                pkgadd_help  $MISSING_DEPENDENCY ;;
20801    * )
20802      break ;;
20803    esac
20804
20805    if test "x$PKGHANDLER_COMMAND" != x; then
20806        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20807    fi
20808
20809      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20810  fi
20811
20812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20813
20814  # First separate the path from the arguments. This will split at the first
20815  # space.
20816  complete="$CXX"
20817  path="${complete%% *}"
20818  tmp="$complete EOL"
20819  arguments="${tmp#* }"
20820
20821  # Input might be given as Windows format, start by converting to
20822  # unix format.
20823  new_path=`$CYGPATH -u "$path"`
20824
20825  # Now try to locate executable using which
20826  new_path=`$WHICH "$new_path" 2> /dev/null`
20827  # bat and cmd files are not always considered executable in cygwin causing which
20828  # to not find them
20829  if test "x$new_path" = x \
20830           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20831           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20832    new_path=`$CYGPATH -u "$path"`
20833  fi
20834  if test "x$new_path" = x; then
20835    # Oops. Which didn't find the executable.
20836    # The splitting of arguments from the executable at a space might have been incorrect,
20837    # since paths with space are more likely in Windows. Give it another try with the whole
20838    # argument.
20839    path="$complete"
20840    arguments="EOL"
20841    new_path=`$CYGPATH -u "$path"`
20842    new_path=`$WHICH "$new_path" 2> /dev/null`
20843    # bat and cmd files are not always considered executable in cygwin causing which
20844    # to not find them
20845    if test "x$new_path" = x \
20846             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20847             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20848      new_path=`$CYGPATH -u "$path"`
20849    fi
20850    if test "x$new_path" = x; then
20851      # It's still not found. Now this is an unrecoverable error.
20852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20853$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20854      has_space=`$ECHO "$complete" | $GREP " "`
20855      if test "x$has_space" != x; then
20856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20858      fi
20859      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20860    fi
20861  fi
20862
20863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20866  # "foo.exe" is OK but "foo" is an error.
20867  #
20868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20869  # It is also a way to make sure we got the proper file name for the real test later on.
20870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20871  if test "x$test_shortpath" = x; then
20872    # Short path failed, file does not exist as specified.
20873    # Try adding .exe or .cmd
20874    if test -f "${new_path}.exe"; then
20875       input_to_shortpath="${new_path}.exe"
20876    elif test -f "${new_path}.cmd"; then
20877       input_to_shortpath="${new_path}.cmd"
20878    else
20879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20880$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20883      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20884    fi
20885  else
20886    input_to_shortpath="$new_path"
20887  fi
20888
20889  # Call helper function which possibly converts this using DOS-style short mode.
20890  # If so, the updated path is stored in $new_path.
20891  new_path="$input_to_shortpath"
20892
20893  input_path="$input_to_shortpath"
20894  # Check if we need to convert this using DOS-style short mode. If the path
20895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20896  # take no chances and rewrite it.
20897  # Note: m4 eats our [], so we need to use [ and ] instead.
20898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20899  if test "x$has_forbidden_chars" != x; then
20900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20904      # Going to short mode and back again did indeed matter. Since short mode is
20905      # case insensitive, let's make it lowercase to improve readability.
20906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20907      # Now convert it back to Unix-stile (cygpath)
20908      input_path=`$CYGPATH -u "$shortmode_path"`
20909      new_path="$input_path"
20910    fi
20911  fi
20912
20913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20914  if test "x$test_cygdrive_prefix" = x; then
20915    # As a simple fix, exclude /usr/bin since it's not a real path.
20916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20918      # a path prefixed by /cygdrive for fixpath to work.
20919      new_path="$CYGWIN_ROOT_PATH$input_path"
20920    fi
20921  fi
20922
20923  # remove trailing .exe if any
20924  new_path="${new_path/%.exe/}"
20925
20926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20927
20928  # First separate the path from the arguments. This will split at the first
20929  # space.
20930  complete="$CXX"
20931  path="${complete%% *}"
20932  tmp="$complete EOL"
20933  arguments="${tmp#* }"
20934
20935  # Input might be given as Windows format, start by converting to
20936  # unix format.
20937  new_path="$path"
20938
20939  windows_path="$new_path"
20940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20941    unix_path=`$CYGPATH -u "$windows_path"`
20942    new_path="$unix_path"
20943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20945    new_path="$unix_path"
20946  fi
20947
20948
20949  # Now try to locate executable using which
20950  new_path=`$WHICH "$new_path" 2> /dev/null`
20951
20952  if test "x$new_path" = x; then
20953    # Oops. Which didn't find the executable.
20954    # The splitting of arguments from the executable at a space might have been incorrect,
20955    # since paths with space are more likely in Windows. Give it another try with the whole
20956    # argument.
20957    path="$complete"
20958    arguments="EOL"
20959    new_path="$path"
20960
20961  windows_path="$new_path"
20962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20963    unix_path=`$CYGPATH -u "$windows_path"`
20964    new_path="$unix_path"
20965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20967    new_path="$unix_path"
20968  fi
20969
20970
20971    new_path=`$WHICH "$new_path" 2> /dev/null`
20972
20973    if test "x$new_path" = x; then
20974      # It's still not found. Now this is an unrecoverable error.
20975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20976$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20977      has_space=`$ECHO "$complete" | $GREP " "`
20978      if test "x$has_space" != x; then
20979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20981      fi
20982      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20983    fi
20984  fi
20985
20986  # Now new_path has a complete unix path to the binary
20987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20988    # Keep paths in /bin as-is, but remove trailing .exe if any
20989    new_path="${new_path/%.exe/}"
20990    # Do not save /bin paths to all_fixpath_prefixes!
20991  else
20992    # Not in mixed or Windows style, start by that.
20993    new_path=`cmd //c echo $new_path`
20994
20995  input_path="$new_path"
20996  # Check if we need to convert this using DOS-style short mode. If the path
20997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20998  # take no chances and rewrite it.
20999  # Note: m4 eats our [], so we need to use [ and ] instead.
21000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21001  if test "x$has_forbidden_chars" != x; then
21002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21004  fi
21005
21006    # Output is in $new_path
21007
21008  windows_path="$new_path"
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010    unix_path=`$CYGPATH -u "$windows_path"`
21011    new_path="$unix_path"
21012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21014    new_path="$unix_path"
21015  fi
21016
21017    # remove trailing .exe if any
21018    new_path="${new_path/%.exe/}"
21019
21020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21022  fi
21023
21024  else
21025    # We're on a posix platform. Hooray! :)
21026    # First separate the path from the arguments. This will split at the first
21027    # space.
21028    complete="$CXX"
21029    path="${complete%% *}"
21030    tmp="$complete EOL"
21031    arguments="${tmp#* }"
21032
21033    # Cannot rely on the command "which" here since it doesn't always work.
21034    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21035    if test -z "$is_absolute_path"; then
21036      # Path to executable is not absolute. Find it.
21037      IFS_save="$IFS"
21038      IFS=:
21039      for p in $PATH; do
21040        if test -f "$p/$path" && test -x "$p/$path"; then
21041          new_path="$p/$path"
21042          break
21043        fi
21044      done
21045      IFS="$IFS_save"
21046    else
21047      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21048$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21049      new_path="$path"
21050    fi
21051
21052    if test "x$new_path" = x; then
21053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21054$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21055        has_space=`$ECHO "$complete" | $GREP " "`
21056        if test "x$has_space" != x; then
21057          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21059        fi
21060        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21061      fi
21062  fi
21063
21064      # Now join together the path and the arguments once again
21065      if test "x$arguments" != xEOL; then
21066        new_complete="$new_path ${arguments% *}"
21067      else
21068        new_complete="$new_path"
21069      fi
21070
21071  if test "x$complete" != "x$new_complete"; then
21072      CXX="$new_complete"
21073      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21074$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21075    fi
21076
21077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21078$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21079  TEST_COMPILER="$CXX"
21080
21081    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21082        # Follow a chain of symbolic links. Use readlink
21083        # where it exists, else fall back to horribly
21084        # complicated shell code.
21085        if test "x$READLINK_TESTED" != yes; then
21086            # On MacOSX there is a readlink tool with a different
21087            # purpose than the GNU readlink tool. Check the found readlink.
21088            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21089            if test "x$ISGNU" = x; then
21090                 # A readlink that we do not know how to use.
21091                 # Are there other non-GNU readlinks out there?
21092                 READLINK_TESTED=yes
21093                 READLINK=
21094            fi
21095        fi
21096
21097        if test "x$READLINK" != x; then
21098            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21099        else
21100            # Save the current directory for restoring afterwards
21101            STARTDIR=$PWD
21102            COUNTER=0
21103            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21104            sym_link_file=`$BASENAME $TEST_COMPILER`
21105            cd $sym_link_dir
21106            # Use -P flag to resolve symlinks in directories.
21107            cd `$THEPWDCMD -P`
21108            sym_link_dir=`$THEPWDCMD -P`
21109            # Resolve file symlinks
21110            while test $COUNTER -lt 20; do
21111                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21112                if test "x$ISLINK" == x; then
21113                    # This is not a symbolic link! We are done!
21114                    break
21115                fi
21116                # Again resolve directory symlinks since the target of the just found
21117                # link could be in a different directory
21118                cd `$DIRNAME $ISLINK`
21119                sym_link_dir=`$THEPWDCMD -P`
21120                sym_link_file=`$BASENAME $ISLINK`
21121                let COUNTER=COUNTER+1
21122            done
21123            cd $STARTDIR
21124            TEST_COMPILER=$sym_link_dir/$sym_link_file
21125        fi
21126    fi
21127
21128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21129$as_echo "$TEST_COMPILER" >&6; }
21130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21131$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21132
21133  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21134  if test "x$COMPILER_BASENAME" = "xccache"; then
21135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21136$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21137    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21138    # We want to control ccache invocation ourselves, so ignore this cc and try
21139    # searching again.
21140
21141    # Remove the path to the fake ccache cc from the PATH
21142    RETRY_COMPILER_SAVED_PATH="$PATH"
21143    COMPILER_DIRNAME=`$DIRNAME $CXX`
21144    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21145
21146    # Try again looking for our compiler
21147    if test -n "$ac_tool_prefix"; then
21148  for ac_prog in $COMPILER_CHECK_LIST
21149  do
21150    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21151set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21153$as_echo_n "checking for $ac_word... " >&6; }
21154if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21155  $as_echo_n "(cached) " >&6
21156else
21157  if test -n "$PROPER_COMPILER_CXX"; then
21158  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21159else
21160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21161for as_dir in $PATH
21162do
21163  IFS=$as_save_IFS
21164  test -z "$as_dir" && as_dir=.
21165    for ac_exec_ext in '' $ac_executable_extensions; do
21166  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21167    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21169    break 2
21170  fi
21171done
21172  done
21173IFS=$as_save_IFS
21174
21175fi
21176fi
21177PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21178if test -n "$PROPER_COMPILER_CXX"; then
21179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21180$as_echo "$PROPER_COMPILER_CXX" >&6; }
21181else
21182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21183$as_echo "no" >&6; }
21184fi
21185
21186
21187    test -n "$PROPER_COMPILER_CXX" && break
21188  done
21189fi
21190if test -z "$PROPER_COMPILER_CXX"; then
21191  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21192  for ac_prog in $COMPILER_CHECK_LIST
21193do
21194  # Extract the first word of "$ac_prog", so it can be a program name with args.
21195set dummy $ac_prog; ac_word=$2
21196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21197$as_echo_n "checking for $ac_word... " >&6; }
21198if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21199  $as_echo_n "(cached) " >&6
21200else
21201  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21202  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21203else
21204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21205for as_dir in $PATH
21206do
21207  IFS=$as_save_IFS
21208  test -z "$as_dir" && as_dir=.
21209    for ac_exec_ext in '' $ac_executable_extensions; do
21210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21211    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21213    break 2
21214  fi
21215done
21216  done
21217IFS=$as_save_IFS
21218
21219fi
21220fi
21221ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21222if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21224$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21225else
21226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21227$as_echo "no" >&6; }
21228fi
21229
21230
21231  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21232done
21233
21234  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21235    PROPER_COMPILER_CXX=""
21236  else
21237    case $cross_compiling:$ac_tool_warned in
21238yes:)
21239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21241ac_tool_warned=yes ;;
21242esac
21243    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21244  fi
21245fi
21246
21247
21248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21249
21250  # First separate the path from the arguments. This will split at the first
21251  # space.
21252  complete="$PROPER_COMPILER_CXX"
21253  path="${complete%% *}"
21254  tmp="$complete EOL"
21255  arguments="${tmp#* }"
21256
21257  # Input might be given as Windows format, start by converting to
21258  # unix format.
21259  new_path=`$CYGPATH -u "$path"`
21260
21261  # Now try to locate executable using which
21262  new_path=`$WHICH "$new_path" 2> /dev/null`
21263  # bat and cmd files are not always considered executable in cygwin causing which
21264  # to not find them
21265  if test "x$new_path" = x \
21266           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21267           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21268    new_path=`$CYGPATH -u "$path"`
21269  fi
21270  if test "x$new_path" = x; then
21271    # Oops. Which didn't find the executable.
21272    # The splitting of arguments from the executable at a space might have been incorrect,
21273    # since paths with space are more likely in Windows. Give it another try with the whole
21274    # argument.
21275    path="$complete"
21276    arguments="EOL"
21277    new_path=`$CYGPATH -u "$path"`
21278    new_path=`$WHICH "$new_path" 2> /dev/null`
21279    # bat and cmd files are not always considered executable in cygwin causing which
21280    # to not find them
21281    if test "x$new_path" = x \
21282             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21283             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21284      new_path=`$CYGPATH -u "$path"`
21285    fi
21286    if test "x$new_path" = x; then
21287      # It's still not found. Now this is an unrecoverable error.
21288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21289$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21290      has_space=`$ECHO "$complete" | $GREP " "`
21291      if test "x$has_space" != x; then
21292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21294      fi
21295      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21296    fi
21297  fi
21298
21299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21302  # "foo.exe" is OK but "foo" is an error.
21303  #
21304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21305  # It is also a way to make sure we got the proper file name for the real test later on.
21306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21307  if test "x$test_shortpath" = x; then
21308    # Short path failed, file does not exist as specified.
21309    # Try adding .exe or .cmd
21310    if test -f "${new_path}.exe"; then
21311       input_to_shortpath="${new_path}.exe"
21312    elif test -f "${new_path}.cmd"; then
21313       input_to_shortpath="${new_path}.cmd"
21314    else
21315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21316$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21319      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21320    fi
21321  else
21322    input_to_shortpath="$new_path"
21323  fi
21324
21325  # Call helper function which possibly converts this using DOS-style short mode.
21326  # If so, the updated path is stored in $new_path.
21327  new_path="$input_to_shortpath"
21328
21329  input_path="$input_to_shortpath"
21330  # Check if we need to convert this using DOS-style short mode. If the path
21331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21332  # take no chances and rewrite it.
21333  # Note: m4 eats our [], so we need to use [ and ] instead.
21334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21335  if test "x$has_forbidden_chars" != x; then
21336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21340      # Going to short mode and back again did indeed matter. Since short mode is
21341      # case insensitive, let's make it lowercase to improve readability.
21342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21343      # Now convert it back to Unix-stile (cygpath)
21344      input_path=`$CYGPATH -u "$shortmode_path"`
21345      new_path="$input_path"
21346    fi
21347  fi
21348
21349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21350  if test "x$test_cygdrive_prefix" = x; then
21351    # As a simple fix, exclude /usr/bin since it's not a real path.
21352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21354      # a path prefixed by /cygdrive for fixpath to work.
21355      new_path="$CYGWIN_ROOT_PATH$input_path"
21356    fi
21357  fi
21358
21359  # remove trailing .exe if any
21360  new_path="${new_path/%.exe/}"
21361
21362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21363
21364  # First separate the path from the arguments. This will split at the first
21365  # space.
21366  complete="$PROPER_COMPILER_CXX"
21367  path="${complete%% *}"
21368  tmp="$complete EOL"
21369  arguments="${tmp#* }"
21370
21371  # Input might be given as Windows format, start by converting to
21372  # unix format.
21373  new_path="$path"
21374
21375  windows_path="$new_path"
21376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21377    unix_path=`$CYGPATH -u "$windows_path"`
21378    new_path="$unix_path"
21379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21381    new_path="$unix_path"
21382  fi
21383
21384
21385  # Now try to locate executable using which
21386  new_path=`$WHICH "$new_path" 2> /dev/null`
21387
21388  if test "x$new_path" = x; then
21389    # Oops. Which didn't find the executable.
21390    # The splitting of arguments from the executable at a space might have been incorrect,
21391    # since paths with space are more likely in Windows. Give it another try with the whole
21392    # argument.
21393    path="$complete"
21394    arguments="EOL"
21395    new_path="$path"
21396
21397  windows_path="$new_path"
21398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21399    unix_path=`$CYGPATH -u "$windows_path"`
21400    new_path="$unix_path"
21401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21403    new_path="$unix_path"
21404  fi
21405
21406
21407    new_path=`$WHICH "$new_path" 2> /dev/null`
21408
21409    if test "x$new_path" = x; then
21410      # It's still not found. Now this is an unrecoverable error.
21411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21412$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21413      has_space=`$ECHO "$complete" | $GREP " "`
21414      if test "x$has_space" != x; then
21415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21417      fi
21418      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21419    fi
21420  fi
21421
21422  # Now new_path has a complete unix path to the binary
21423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21424    # Keep paths in /bin as-is, but remove trailing .exe if any
21425    new_path="${new_path/%.exe/}"
21426    # Do not save /bin paths to all_fixpath_prefixes!
21427  else
21428    # Not in mixed or Windows style, start by that.
21429    new_path=`cmd //c echo $new_path`
21430
21431  input_path="$new_path"
21432  # Check if we need to convert this using DOS-style short mode. If the path
21433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21434  # take no chances and rewrite it.
21435  # Note: m4 eats our [], so we need to use [ and ] instead.
21436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21437  if test "x$has_forbidden_chars" != x; then
21438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21440  fi
21441
21442    # Output is in $new_path
21443
21444  windows_path="$new_path"
21445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21446    unix_path=`$CYGPATH -u "$windows_path"`
21447    new_path="$unix_path"
21448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21450    new_path="$unix_path"
21451  fi
21452
21453    # remove trailing .exe if any
21454    new_path="${new_path/%.exe/}"
21455
21456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21458  fi
21459
21460  else
21461    # We're on a posix platform. Hooray! :)
21462    # First separate the path from the arguments. This will split at the first
21463    # space.
21464    complete="$PROPER_COMPILER_CXX"
21465    path="${complete%% *}"
21466    tmp="$complete EOL"
21467    arguments="${tmp#* }"
21468
21469    # Cannot rely on the command "which" here since it doesn't always work.
21470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21471    if test -z "$is_absolute_path"; then
21472      # Path to executable is not absolute. Find it.
21473      IFS_save="$IFS"
21474      IFS=:
21475      for p in $PATH; do
21476        if test -f "$p/$path" && test -x "$p/$path"; then
21477          new_path="$p/$path"
21478          break
21479        fi
21480      done
21481      IFS="$IFS_save"
21482    else
21483      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21484$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21485      new_path="$path"
21486    fi
21487
21488    if test "x$new_path" = x; then
21489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21490$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21491        has_space=`$ECHO "$complete" | $GREP " "`
21492        if test "x$has_space" != x; then
21493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21495        fi
21496        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21497      fi
21498  fi
21499
21500      # Now join together the path and the arguments once again
21501      if test "x$arguments" != xEOL; then
21502        new_complete="$new_path ${arguments% *}"
21503      else
21504        new_complete="$new_path"
21505      fi
21506
21507  if test "x$complete" != "x$new_complete"; then
21508      PROPER_COMPILER_CXX="$new_complete"
21509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21510$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21511    fi
21512
21513    PATH="$RETRY_COMPILER_SAVED_PATH"
21514
21515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21516$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21517
21518    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21519        # Follow a chain of symbolic links. Use readlink
21520        # where it exists, else fall back to horribly
21521        # complicated shell code.
21522        if test "x$READLINK_TESTED" != yes; then
21523            # On MacOSX there is a readlink tool with a different
21524            # purpose than the GNU readlink tool. Check the found readlink.
21525            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21526            if test "x$ISGNU" = x; then
21527                 # A readlink that we do not know how to use.
21528                 # Are there other non-GNU readlinks out there?
21529                 READLINK_TESTED=yes
21530                 READLINK=
21531            fi
21532        fi
21533
21534        if test "x$READLINK" != x; then
21535            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21536        else
21537            # Save the current directory for restoring afterwards
21538            STARTDIR=$PWD
21539            COUNTER=0
21540            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21541            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21542            cd $sym_link_dir
21543            # Use -P flag to resolve symlinks in directories.
21544            cd `$THEPWDCMD -P`
21545            sym_link_dir=`$THEPWDCMD -P`
21546            # Resolve file symlinks
21547            while test $COUNTER -lt 20; do
21548                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21549                if test "x$ISLINK" == x; then
21550                    # This is not a symbolic link! We are done!
21551                    break
21552                fi
21553                # Again resolve directory symlinks since the target of the just found
21554                # link could be in a different directory
21555                cd `$DIRNAME $ISLINK`
21556                sym_link_dir=`$THEPWDCMD -P`
21557                sym_link_file=`$BASENAME $ISLINK`
21558                let COUNTER=COUNTER+1
21559            done
21560            cd $STARTDIR
21561            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21562        fi
21563    fi
21564
21565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21566$as_echo "$PROPER_COMPILER_CXX" >&6; }
21567    CXX="$PROPER_COMPILER_CXX"
21568  else
21569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21570$as_echo "no, keeping CXX" >&6; }
21571    CXX="$TEST_COMPILER"
21572  fi
21573
21574  COMPILER=$CXX
21575  COMPILER_NAME=$COMPILER_NAME
21576
21577  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21578    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21579    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21580    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21581    if test $? -ne 0; then
21582      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21583
21584      { $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
21585$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21587$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21588      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21589    else
21590      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21591      COMPILER_VENDOR="Sun Studio"
21592    fi
21593  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21594    # First line typically looks something like:
21595    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21596    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21597    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21598    COMPILER_VENDOR="Microsoft CL.EXE"
21599    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21600    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21601      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21602        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21603      fi
21604    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21605      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21606        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21607      fi
21608    fi
21609  else
21610    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21611    # Check that this is likely to be GCC.
21612    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21613    if test $? -ne 0; then
21614      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21615$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21616      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21617$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21618      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21619    fi
21620
21621    # First line typically looks something like:
21622    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21623    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21624    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21625  fi
21626  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21627  CXX_VERSION="$COMPILER_VERSION"
21628  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21629  CXX_VENDOR="$COMPILER_VENDOR"
21630
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21632$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21633
21634
21635# Now that we have resolved CXX ourself, let autoconf have its go at it
21636ac_ext=cpp
21637ac_cpp='$CXXCPP $CPPFLAGS'
21638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21641if test -z "$CXX"; then
21642  if test -n "$CCC"; then
21643    CXX=$CCC
21644  else
21645    if test -n "$ac_tool_prefix"; then
21646  for ac_prog in $CXX
21647  do
21648    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21649set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21651$as_echo_n "checking for $ac_word... " >&6; }
21652if test "${ac_cv_prog_CXX+set}" = set; then :
21653  $as_echo_n "(cached) " >&6
21654else
21655  if test -n "$CXX"; then
21656  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21657else
21658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21659for as_dir in $PATH
21660do
21661  IFS=$as_save_IFS
21662  test -z "$as_dir" && as_dir=.
21663    for ac_exec_ext in '' $ac_executable_extensions; do
21664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21665    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21667    break 2
21668  fi
21669done
21670  done
21671IFS=$as_save_IFS
21672
21673fi
21674fi
21675CXX=$ac_cv_prog_CXX
21676if test -n "$CXX"; then
21677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21678$as_echo "$CXX" >&6; }
21679else
21680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21681$as_echo "no" >&6; }
21682fi
21683
21684
21685    test -n "$CXX" && break
21686  done
21687fi
21688if test -z "$CXX"; then
21689  ac_ct_CXX=$CXX
21690  for ac_prog in $CXX
21691do
21692  # Extract the first word of "$ac_prog", so it can be a program name with args.
21693set dummy $ac_prog; ac_word=$2
21694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21695$as_echo_n "checking for $ac_word... " >&6; }
21696if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21697  $as_echo_n "(cached) " >&6
21698else
21699  if test -n "$ac_ct_CXX"; then
21700  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21701else
21702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21703for as_dir in $PATH
21704do
21705  IFS=$as_save_IFS
21706  test -z "$as_dir" && as_dir=.
21707    for ac_exec_ext in '' $ac_executable_extensions; do
21708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21709    ac_cv_prog_ac_ct_CXX="$ac_prog"
21710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21711    break 2
21712  fi
21713done
21714  done
21715IFS=$as_save_IFS
21716
21717fi
21718fi
21719ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21720if test -n "$ac_ct_CXX"; then
21721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21722$as_echo "$ac_ct_CXX" >&6; }
21723else
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21725$as_echo "no" >&6; }
21726fi
21727
21728
21729  test -n "$ac_ct_CXX" && break
21730done
21731
21732  if test "x$ac_ct_CXX" = x; then
21733    CXX="g++"
21734  else
21735    case $cross_compiling:$ac_tool_warned in
21736yes:)
21737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21739ac_tool_warned=yes ;;
21740esac
21741    CXX=$ac_ct_CXX
21742  fi
21743fi
21744
21745  fi
21746fi
21747# Provide some information about the compiler.
21748$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21749set X $ac_compile
21750ac_compiler=$2
21751for ac_option in --version -v -V -qversion; do
21752  { { ac_try="$ac_compiler $ac_option >&5"
21753case "(($ac_try" in
21754  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21755  *) ac_try_echo=$ac_try;;
21756esac
21757eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21758$as_echo "$ac_try_echo"; } >&5
21759  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21760  ac_status=$?
21761  if test -s conftest.err; then
21762    sed '10a\
21763... rest of stderr output deleted ...
21764         10q' conftest.err >conftest.er1
21765    cat conftest.er1 >&5
21766  fi
21767  rm -f conftest.er1 conftest.err
21768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21769  test $ac_status = 0; }
21770done
21771
21772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21773$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21774if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21775  $as_echo_n "(cached) " >&6
21776else
21777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21778/* end confdefs.h.  */
21779
21780int
21781main ()
21782{
21783#ifndef __GNUC__
21784       choke me
21785#endif
21786
21787  ;
21788  return 0;
21789}
21790_ACEOF
21791if ac_fn_cxx_try_compile "$LINENO"; then :
21792  ac_compiler_gnu=yes
21793else
21794  ac_compiler_gnu=no
21795fi
21796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21797ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21798
21799fi
21800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21801$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21802if test $ac_compiler_gnu = yes; then
21803  GXX=yes
21804else
21805  GXX=
21806fi
21807ac_test_CXXFLAGS=${CXXFLAGS+set}
21808ac_save_CXXFLAGS=$CXXFLAGS
21809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21810$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21811if test "${ac_cv_prog_cxx_g+set}" = set; then :
21812  $as_echo_n "(cached) " >&6
21813else
21814  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21815   ac_cxx_werror_flag=yes
21816   ac_cv_prog_cxx_g=no
21817   CXXFLAGS="-g"
21818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21819/* end confdefs.h.  */
21820
21821int
21822main ()
21823{
21824
21825  ;
21826  return 0;
21827}
21828_ACEOF
21829if ac_fn_cxx_try_compile "$LINENO"; then :
21830  ac_cv_prog_cxx_g=yes
21831else
21832  CXXFLAGS=""
21833      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21834/* end confdefs.h.  */
21835
21836int
21837main ()
21838{
21839
21840  ;
21841  return 0;
21842}
21843_ACEOF
21844if ac_fn_cxx_try_compile "$LINENO"; then :
21845
21846else
21847  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21848	 CXXFLAGS="-g"
21849	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21850/* end confdefs.h.  */
21851
21852int
21853main ()
21854{
21855
21856  ;
21857  return 0;
21858}
21859_ACEOF
21860if ac_fn_cxx_try_compile "$LINENO"; then :
21861  ac_cv_prog_cxx_g=yes
21862fi
21863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21864fi
21865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21866fi
21867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21868   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21869fi
21870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21871$as_echo "$ac_cv_prog_cxx_g" >&6; }
21872if test "$ac_test_CXXFLAGS" = set; then
21873  CXXFLAGS=$ac_save_CXXFLAGS
21874elif test $ac_cv_prog_cxx_g = yes; then
21875  if test "$GXX" = yes; then
21876    CXXFLAGS="-g -O2"
21877  else
21878    CXXFLAGS="-g"
21879  fi
21880else
21881  if test "$GXX" = yes; then
21882    CXXFLAGS="-O2"
21883  else
21884    CXXFLAGS=
21885  fi
21886fi
21887ac_ext=cpp
21888ac_cpp='$CXXCPP $CPPFLAGS'
21889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21892
21893
21894### Locate other tools
21895
21896if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21897    ac_ext=m
21898ac_cpp='$OBJCPP $CPPFLAGS'
21899ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21900ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21901ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21902if test -n "$ac_tool_prefix"; then
21903  for ac_prog in gcc objcc objc cc CC
21904  do
21905    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21906set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21908$as_echo_n "checking for $ac_word... " >&6; }
21909if test "${ac_cv_prog_OBJC+set}" = set; then :
21910  $as_echo_n "(cached) " >&6
21911else
21912  if test -n "$OBJC"; then
21913  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21914else
21915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21916for as_dir in $PATH
21917do
21918  IFS=$as_save_IFS
21919  test -z "$as_dir" && as_dir=.
21920    for ac_exec_ext in '' $ac_executable_extensions; do
21921  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21922    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21924    break 2
21925  fi
21926done
21927  done
21928IFS=$as_save_IFS
21929
21930fi
21931fi
21932OBJC=$ac_cv_prog_OBJC
21933if test -n "$OBJC"; then
21934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21935$as_echo "$OBJC" >&6; }
21936else
21937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21938$as_echo "no" >&6; }
21939fi
21940
21941
21942    test -n "$OBJC" && break
21943  done
21944fi
21945if test -z "$OBJC"; then
21946  ac_ct_OBJC=$OBJC
21947  for ac_prog in gcc objcc objc cc CC
21948do
21949  # Extract the first word of "$ac_prog", so it can be a program name with args.
21950set dummy $ac_prog; ac_word=$2
21951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21952$as_echo_n "checking for $ac_word... " >&6; }
21953if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21954  $as_echo_n "(cached) " >&6
21955else
21956  if test -n "$ac_ct_OBJC"; then
21957  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21958else
21959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21960for as_dir in $PATH
21961do
21962  IFS=$as_save_IFS
21963  test -z "$as_dir" && as_dir=.
21964    for ac_exec_ext in '' $ac_executable_extensions; do
21965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21966    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21968    break 2
21969  fi
21970done
21971  done
21972IFS=$as_save_IFS
21973
21974fi
21975fi
21976ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21977if test -n "$ac_ct_OBJC"; then
21978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21979$as_echo "$ac_ct_OBJC" >&6; }
21980else
21981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21982$as_echo "no" >&6; }
21983fi
21984
21985
21986  test -n "$ac_ct_OBJC" && break
21987done
21988
21989  if test "x$ac_ct_OBJC" = x; then
21990    OBJC="gcc"
21991  else
21992    case $cross_compiling:$ac_tool_warned in
21993yes:)
21994{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21995$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21996ac_tool_warned=yes ;;
21997esac
21998    OBJC=$ac_ct_OBJC
21999  fi
22000fi
22001
22002# Provide some information about the compiler.
22003$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22004set X $ac_compile
22005ac_compiler=$2
22006for ac_option in --version -v -V -qversion; do
22007  { { ac_try="$ac_compiler $ac_option >&5"
22008case "(($ac_try" in
22009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22010  *) ac_try_echo=$ac_try;;
22011esac
22012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22013$as_echo "$ac_try_echo"; } >&5
22014  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22015  ac_status=$?
22016  if test -s conftest.err; then
22017    sed '10a\
22018... rest of stderr output deleted ...
22019         10q' conftest.err >conftest.er1
22020    cat conftest.er1 >&5
22021  fi
22022  rm -f conftest.er1 conftest.err
22023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22024  test $ac_status = 0; }
22025done
22026
22027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22028$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22029if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
22030  $as_echo_n "(cached) " >&6
22031else
22032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22033/* end confdefs.h.  */
22034
22035int
22036main ()
22037{
22038#ifndef __GNUC__
22039       choke me
22040#endif
22041
22042  ;
22043  return 0;
22044}
22045_ACEOF
22046if ac_fn_objc_try_compile "$LINENO"; then :
22047  ac_compiler_gnu=yes
22048else
22049  ac_compiler_gnu=no
22050fi
22051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22052ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22053
22054fi
22055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22056$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22057if test $ac_compiler_gnu = yes; then
22058  GOBJC=yes
22059else
22060  GOBJC=
22061fi
22062ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22063ac_save_OBJCFLAGS=$OBJCFLAGS
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22065$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22066if test "${ac_cv_prog_objc_g+set}" = set; then :
22067  $as_echo_n "(cached) " >&6
22068else
22069  ac_save_objc_werror_flag=$ac_objc_werror_flag
22070   ac_objc_werror_flag=yes
22071   ac_cv_prog_objc_g=no
22072   OBJCFLAGS="-g"
22073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22074/* end confdefs.h.  */
22075
22076int
22077main ()
22078{
22079
22080  ;
22081  return 0;
22082}
22083_ACEOF
22084if ac_fn_objc_try_compile "$LINENO"; then :
22085  ac_cv_prog_objc_g=yes
22086else
22087  OBJCFLAGS=""
22088      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22089/* end confdefs.h.  */
22090
22091int
22092main ()
22093{
22094
22095  ;
22096  return 0;
22097}
22098_ACEOF
22099if ac_fn_objc_try_compile "$LINENO"; then :
22100
22101else
22102  ac_objc_werror_flag=$ac_save_objc_werror_flag
22103	 OBJCFLAGS="-g"
22104	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22105/* end confdefs.h.  */
22106
22107int
22108main ()
22109{
22110
22111  ;
22112  return 0;
22113}
22114_ACEOF
22115if ac_fn_objc_try_compile "$LINENO"; then :
22116  ac_cv_prog_objc_g=yes
22117fi
22118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22119fi
22120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22121fi
22122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22123   ac_objc_werror_flag=$ac_save_objc_werror_flag
22124fi
22125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22126$as_echo "$ac_cv_prog_objc_g" >&6; }
22127if test "$ac_test_OBJCFLAGS" = set; then
22128  OBJCFLAGS=$ac_save_OBJCFLAGS
22129elif test $ac_cv_prog_objc_g = yes; then
22130  if test "$GOBJC" = yes; then
22131    OBJCFLAGS="-g -O2"
22132  else
22133    OBJCFLAGS="-g"
22134  fi
22135else
22136  if test "$GOBJC" = yes; then
22137    OBJCFLAGS="-O2"
22138  else
22139    OBJCFLAGS=
22140  fi
22141fi
22142ac_ext=cpp
22143ac_cpp='$CXXCPP $CPPFLAGS'
22144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22147
22148
22149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22150
22151  # First separate the path from the arguments. This will split at the first
22152  # space.
22153  complete="$OBJC"
22154  path="${complete%% *}"
22155  tmp="$complete EOL"
22156  arguments="${tmp#* }"
22157
22158  # Input might be given as Windows format, start by converting to
22159  # unix format.
22160  new_path=`$CYGPATH -u "$path"`
22161
22162  # Now try to locate executable using which
22163  new_path=`$WHICH "$new_path" 2> /dev/null`
22164  # bat and cmd files are not always considered executable in cygwin causing which
22165  # to not find them
22166  if test "x$new_path" = x \
22167           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22168           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22169    new_path=`$CYGPATH -u "$path"`
22170  fi
22171  if test "x$new_path" = x; then
22172    # Oops. Which didn't find the executable.
22173    # The splitting of arguments from the executable at a space might have been incorrect,
22174    # since paths with space are more likely in Windows. Give it another try with the whole
22175    # argument.
22176    path="$complete"
22177    arguments="EOL"
22178    new_path=`$CYGPATH -u "$path"`
22179    new_path=`$WHICH "$new_path" 2> /dev/null`
22180    # bat and cmd files are not always considered executable in cygwin causing which
22181    # to not find them
22182    if test "x$new_path" = x \
22183             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22184             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22185      new_path=`$CYGPATH -u "$path"`
22186    fi
22187    if test "x$new_path" = x; then
22188      # It's still not found. Now this is an unrecoverable error.
22189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22190$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22191      has_space=`$ECHO "$complete" | $GREP " "`
22192      if test "x$has_space" != x; then
22193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22195      fi
22196      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22197    fi
22198  fi
22199
22200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22203  # "foo.exe" is OK but "foo" is an error.
22204  #
22205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22206  # It is also a way to make sure we got the proper file name for the real test later on.
22207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22208  if test "x$test_shortpath" = x; then
22209    # Short path failed, file does not exist as specified.
22210    # Try adding .exe or .cmd
22211    if test -f "${new_path}.exe"; then
22212       input_to_shortpath="${new_path}.exe"
22213    elif test -f "${new_path}.cmd"; then
22214       input_to_shortpath="${new_path}.cmd"
22215    else
22216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22217$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22218      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22219$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22220      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22221    fi
22222  else
22223    input_to_shortpath="$new_path"
22224  fi
22225
22226  # Call helper function which possibly converts this using DOS-style short mode.
22227  # If so, the updated path is stored in $new_path.
22228  new_path="$input_to_shortpath"
22229
22230  input_path="$input_to_shortpath"
22231  # Check if we need to convert this using DOS-style short mode. If the path
22232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22233  # take no chances and rewrite it.
22234  # Note: m4 eats our [], so we need to use [ and ] instead.
22235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22236  if test "x$has_forbidden_chars" != x; then
22237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22241      # Going to short mode and back again did indeed matter. Since short mode is
22242      # case insensitive, let's make it lowercase to improve readability.
22243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22244      # Now convert it back to Unix-stile (cygpath)
22245      input_path=`$CYGPATH -u "$shortmode_path"`
22246      new_path="$input_path"
22247    fi
22248  fi
22249
22250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22251  if test "x$test_cygdrive_prefix" = x; then
22252    # As a simple fix, exclude /usr/bin since it's not a real path.
22253    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22255      # a path prefixed by /cygdrive for fixpath to work.
22256      new_path="$CYGWIN_ROOT_PATH$input_path"
22257    fi
22258  fi
22259
22260  # remove trailing .exe if any
22261  new_path="${new_path/%.exe/}"
22262
22263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22264
22265  # First separate the path from the arguments. This will split at the first
22266  # space.
22267  complete="$OBJC"
22268  path="${complete%% *}"
22269  tmp="$complete EOL"
22270  arguments="${tmp#* }"
22271
22272  # Input might be given as Windows format, start by converting to
22273  # unix format.
22274  new_path="$path"
22275
22276  windows_path="$new_path"
22277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22278    unix_path=`$CYGPATH -u "$windows_path"`
22279    new_path="$unix_path"
22280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22282    new_path="$unix_path"
22283  fi
22284
22285
22286  # Now try to locate executable using which
22287  new_path=`$WHICH "$new_path" 2> /dev/null`
22288
22289  if test "x$new_path" = x; then
22290    # Oops. Which didn't find the executable.
22291    # The splitting of arguments from the executable at a space might have been incorrect,
22292    # since paths with space are more likely in Windows. Give it another try with the whole
22293    # argument.
22294    path="$complete"
22295    arguments="EOL"
22296    new_path="$path"
22297
22298  windows_path="$new_path"
22299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22300    unix_path=`$CYGPATH -u "$windows_path"`
22301    new_path="$unix_path"
22302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22304    new_path="$unix_path"
22305  fi
22306
22307
22308    new_path=`$WHICH "$new_path" 2> /dev/null`
22309
22310    if test "x$new_path" = x; then
22311      # It's still not found. Now this is an unrecoverable error.
22312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22313$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22314      has_space=`$ECHO "$complete" | $GREP " "`
22315      if test "x$has_space" != x; then
22316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22318      fi
22319      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22320    fi
22321  fi
22322
22323  # Now new_path has a complete unix path to the binary
22324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22325    # Keep paths in /bin as-is, but remove trailing .exe if any
22326    new_path="${new_path/%.exe/}"
22327    # Do not save /bin paths to all_fixpath_prefixes!
22328  else
22329    # Not in mixed or Windows style, start by that.
22330    new_path=`cmd //c echo $new_path`
22331
22332  input_path="$new_path"
22333  # Check if we need to convert this using DOS-style short mode. If the path
22334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22335  # take no chances and rewrite it.
22336  # Note: m4 eats our [], so we need to use [ and ] instead.
22337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22338  if test "x$has_forbidden_chars" != x; then
22339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22341  fi
22342
22343    # Output is in $new_path
22344
22345  windows_path="$new_path"
22346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347    unix_path=`$CYGPATH -u "$windows_path"`
22348    new_path="$unix_path"
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22351    new_path="$unix_path"
22352  fi
22353
22354    # remove trailing .exe if any
22355    new_path="${new_path/%.exe/}"
22356
22357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22359  fi
22360
22361  else
22362    # We're on a posix platform. Hooray! :)
22363    # First separate the path from the arguments. This will split at the first
22364    # space.
22365    complete="$OBJC"
22366    path="${complete%% *}"
22367    tmp="$complete EOL"
22368    arguments="${tmp#* }"
22369
22370    # Cannot rely on the command "which" here since it doesn't always work.
22371    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22372    if test -z "$is_absolute_path"; then
22373      # Path to executable is not absolute. Find it.
22374      IFS_save="$IFS"
22375      IFS=:
22376      for p in $PATH; do
22377        if test -f "$p/$path" && test -x "$p/$path"; then
22378          new_path="$p/$path"
22379          break
22380        fi
22381      done
22382      IFS="$IFS_save"
22383    else
22384      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22385$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22386      new_path="$path"
22387    fi
22388
22389    if test "x$new_path" = x; then
22390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22391$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22392        has_space=`$ECHO "$complete" | $GREP " "`
22393        if test "x$has_space" != x; then
22394          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22395$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22396        fi
22397        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22398      fi
22399  fi
22400
22401      # Now join together the path and the arguments once again
22402      if test "x$arguments" != xEOL; then
22403        new_complete="$new_path ${arguments% *}"
22404      else
22405        new_complete="$new_path"
22406      fi
22407
22408  if test "x$complete" != "x$new_complete"; then
22409      OBJC="$new_complete"
22410      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22411$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22412    fi
22413
22414else
22415    OBJC=
22416fi
22417
22418# Restore the flags to the user specified values.
22419# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22420CFLAGS="$ORG_CFLAGS"
22421CXXFLAGS="$ORG_CXXFLAGS"
22422OBJCFLAGS="$ORG_OBJCFLAGS"
22423
22424LD="$CC"
22425LDEXE="$CC"
22426LDCXX="$CXX"
22427LDEXECXX="$CXX"
22428
22429# LDEXE is the linker to use, when creating executables.
22430
22431# Linking C++ libraries.
22432
22433# Linking C++ executables.
22434
22435
22436if test "x$OPENJDK_TARGET_OS" != xwindows; then
22437    if test -n "$ac_tool_prefix"; then
22438  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22439set dummy ${ac_tool_prefix}ar; ac_word=$2
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22441$as_echo_n "checking for $ac_word... " >&6; }
22442if test "${ac_cv_prog_AR+set}" = set; then :
22443  $as_echo_n "(cached) " >&6
22444else
22445  if test -n "$AR"; then
22446  ac_cv_prog_AR="$AR" # Let the user override the test.
22447else
22448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22449for as_dir in $PATH
22450do
22451  IFS=$as_save_IFS
22452  test -z "$as_dir" && as_dir=.
22453    for ac_exec_ext in '' $ac_executable_extensions; do
22454  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22455    ac_cv_prog_AR="${ac_tool_prefix}ar"
22456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22457    break 2
22458  fi
22459done
22460  done
22461IFS=$as_save_IFS
22462
22463fi
22464fi
22465AR=$ac_cv_prog_AR
22466if test -n "$AR"; then
22467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22468$as_echo "$AR" >&6; }
22469else
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22471$as_echo "no" >&6; }
22472fi
22473
22474
22475fi
22476if test -z "$ac_cv_prog_AR"; then
22477  ac_ct_AR=$AR
22478  # Extract the first word of "ar", so it can be a program name with args.
22479set dummy ar; ac_word=$2
22480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22481$as_echo_n "checking for $ac_word... " >&6; }
22482if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22483  $as_echo_n "(cached) " >&6
22484else
22485  if test -n "$ac_ct_AR"; then
22486  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22487else
22488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22489for as_dir in $PATH
22490do
22491  IFS=$as_save_IFS
22492  test -z "$as_dir" && as_dir=.
22493    for ac_exec_ext in '' $ac_executable_extensions; do
22494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22495    ac_cv_prog_ac_ct_AR="ar"
22496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22497    break 2
22498  fi
22499done
22500  done
22501IFS=$as_save_IFS
22502
22503fi
22504fi
22505ac_ct_AR=$ac_cv_prog_ac_ct_AR
22506if test -n "$ac_ct_AR"; then
22507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22508$as_echo "$ac_ct_AR" >&6; }
22509else
22510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22511$as_echo "no" >&6; }
22512fi
22513
22514  if test "x$ac_ct_AR" = x; then
22515    AR=""
22516  else
22517    case $cross_compiling:$ac_tool_warned in
22518yes:)
22519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22521ac_tool_warned=yes ;;
22522esac
22523    AR=$ac_ct_AR
22524  fi
22525else
22526  AR="$ac_cv_prog_AR"
22527fi
22528
22529
22530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22531
22532  # First separate the path from the arguments. This will split at the first
22533  # space.
22534  complete="$AR"
22535  path="${complete%% *}"
22536  tmp="$complete EOL"
22537  arguments="${tmp#* }"
22538
22539  # Input might be given as Windows format, start by converting to
22540  # unix format.
22541  new_path=`$CYGPATH -u "$path"`
22542
22543  # Now try to locate executable using which
22544  new_path=`$WHICH "$new_path" 2> /dev/null`
22545  # bat and cmd files are not always considered executable in cygwin causing which
22546  # to not find them
22547  if test "x$new_path" = x \
22548           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22549           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22550    new_path=`$CYGPATH -u "$path"`
22551  fi
22552  if test "x$new_path" = x; then
22553    # Oops. Which didn't find the executable.
22554    # The splitting of arguments from the executable at a space might have been incorrect,
22555    # since paths with space are more likely in Windows. Give it another try with the whole
22556    # argument.
22557    path="$complete"
22558    arguments="EOL"
22559    new_path=`$CYGPATH -u "$path"`
22560    new_path=`$WHICH "$new_path" 2> /dev/null`
22561    # bat and cmd files are not always considered executable in cygwin causing which
22562    # to not find them
22563    if test "x$new_path" = x \
22564             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22565             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22566      new_path=`$CYGPATH -u "$path"`
22567    fi
22568    if test "x$new_path" = x; then
22569      # It's still not found. Now this is an unrecoverable error.
22570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22571$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22572      has_space=`$ECHO "$complete" | $GREP " "`
22573      if test "x$has_space" != x; then
22574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22576      fi
22577      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22578    fi
22579  fi
22580
22581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22584  # "foo.exe" is OK but "foo" is an error.
22585  #
22586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22587  # It is also a way to make sure we got the proper file name for the real test later on.
22588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22589  if test "x$test_shortpath" = x; then
22590    # Short path failed, file does not exist as specified.
22591    # Try adding .exe or .cmd
22592    if test -f "${new_path}.exe"; then
22593       input_to_shortpath="${new_path}.exe"
22594    elif test -f "${new_path}.cmd"; then
22595       input_to_shortpath="${new_path}.cmd"
22596    else
22597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22598$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22601      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22602    fi
22603  else
22604    input_to_shortpath="$new_path"
22605  fi
22606
22607  # Call helper function which possibly converts this using DOS-style short mode.
22608  # If so, the updated path is stored in $new_path.
22609  new_path="$input_to_shortpath"
22610
22611  input_path="$input_to_shortpath"
22612  # Check if we need to convert this using DOS-style short mode. If the path
22613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22614  # take no chances and rewrite it.
22615  # Note: m4 eats our [], so we need to use [ and ] instead.
22616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22617  if test "x$has_forbidden_chars" != x; then
22618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22622      # Going to short mode and back again did indeed matter. Since short mode is
22623      # case insensitive, let's make it lowercase to improve readability.
22624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22625      # Now convert it back to Unix-stile (cygpath)
22626      input_path=`$CYGPATH -u "$shortmode_path"`
22627      new_path="$input_path"
22628    fi
22629  fi
22630
22631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22632  if test "x$test_cygdrive_prefix" = x; then
22633    # As a simple fix, exclude /usr/bin since it's not a real path.
22634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22636      # a path prefixed by /cygdrive for fixpath to work.
22637      new_path="$CYGWIN_ROOT_PATH$input_path"
22638    fi
22639  fi
22640
22641  # remove trailing .exe if any
22642  new_path="${new_path/%.exe/}"
22643
22644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22645
22646  # First separate the path from the arguments. This will split at the first
22647  # space.
22648  complete="$AR"
22649  path="${complete%% *}"
22650  tmp="$complete EOL"
22651  arguments="${tmp#* }"
22652
22653  # Input might be given as Windows format, start by converting to
22654  # unix format.
22655  new_path="$path"
22656
22657  windows_path="$new_path"
22658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22659    unix_path=`$CYGPATH -u "$windows_path"`
22660    new_path="$unix_path"
22661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22663    new_path="$unix_path"
22664  fi
22665
22666
22667  # Now try to locate executable using which
22668  new_path=`$WHICH "$new_path" 2> /dev/null`
22669
22670  if test "x$new_path" = x; then
22671    # Oops. Which didn't find the executable.
22672    # The splitting of arguments from the executable at a space might have been incorrect,
22673    # since paths with space are more likely in Windows. Give it another try with the whole
22674    # argument.
22675    path="$complete"
22676    arguments="EOL"
22677    new_path="$path"
22678
22679  windows_path="$new_path"
22680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22681    unix_path=`$CYGPATH -u "$windows_path"`
22682    new_path="$unix_path"
22683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22685    new_path="$unix_path"
22686  fi
22687
22688
22689    new_path=`$WHICH "$new_path" 2> /dev/null`
22690
22691    if test "x$new_path" = x; then
22692      # It's still not found. Now this is an unrecoverable error.
22693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22694$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22695      has_space=`$ECHO "$complete" | $GREP " "`
22696      if test "x$has_space" != x; then
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22699      fi
22700      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22701    fi
22702  fi
22703
22704  # Now new_path has a complete unix path to the binary
22705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22706    # Keep paths in /bin as-is, but remove trailing .exe if any
22707    new_path="${new_path/%.exe/}"
22708    # Do not save /bin paths to all_fixpath_prefixes!
22709  else
22710    # Not in mixed or Windows style, start by that.
22711    new_path=`cmd //c echo $new_path`
22712
22713  input_path="$new_path"
22714  # Check if we need to convert this using DOS-style short mode. If the path
22715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22716  # take no chances and rewrite it.
22717  # Note: m4 eats our [], so we need to use [ and ] instead.
22718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22719  if test "x$has_forbidden_chars" != x; then
22720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22722  fi
22723
22724    # Output is in $new_path
22725
22726  windows_path="$new_path"
22727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22728    unix_path=`$CYGPATH -u "$windows_path"`
22729    new_path="$unix_path"
22730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22732    new_path="$unix_path"
22733  fi
22734
22735    # remove trailing .exe if any
22736    new_path="${new_path/%.exe/}"
22737
22738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22740  fi
22741
22742  else
22743    # We're on a posix platform. Hooray! :)
22744    # First separate the path from the arguments. This will split at the first
22745    # space.
22746    complete="$AR"
22747    path="${complete%% *}"
22748    tmp="$complete EOL"
22749    arguments="${tmp#* }"
22750
22751    # Cannot rely on the command "which" here since it doesn't always work.
22752    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22753    if test -z "$is_absolute_path"; then
22754      # Path to executable is not absolute. Find it.
22755      IFS_save="$IFS"
22756      IFS=:
22757      for p in $PATH; do
22758        if test -f "$p/$path" && test -x "$p/$path"; then
22759          new_path="$p/$path"
22760          break
22761        fi
22762      done
22763      IFS="$IFS_save"
22764    else
22765      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22766$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22767      new_path="$path"
22768    fi
22769
22770    if test "x$new_path" = x; then
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22772$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22773        has_space=`$ECHO "$complete" | $GREP " "`
22774        if test "x$has_space" != x; then
22775          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22777        fi
22778        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22779      fi
22780  fi
22781
22782      # Now join together the path and the arguments once again
22783      if test "x$arguments" != xEOL; then
22784        new_complete="$new_path ${arguments% *}"
22785      else
22786        new_complete="$new_path"
22787      fi
22788
22789  if test "x$complete" != "x$new_complete"; then
22790      AR="$new_complete"
22791      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22792$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22793    fi
22794
22795fi
22796if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22797    ARFLAGS="-r"
22798else
22799    ARFLAGS=""
22800fi
22801
22802
22803# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22804HOTSPOT_CXX="$CXX"
22805HOTSPOT_LD="$LD"
22806
22807
22808
22809COMPILER_NAME=gcc
22810COMPILER_TYPE=CC
22811if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22812
22813    # For now, assume that we are always compiling using cl.exe.
22814    CC_OUT_OPTION=-Fo
22815    EXE_OUT_OPTION=-out:
22816    LD_OUT_OPTION=-out:
22817    AR_OUT_OPTION=-out:
22818    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22819    # program for something completely different.
22820    # Extract the first word of "link", so it can be a program name with args.
22821set dummy link; ac_word=$2
22822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22823$as_echo_n "checking for $ac_word... " >&6; }
22824if test "${ac_cv_prog_WINLD+set}" = set; then :
22825  $as_echo_n "(cached) " >&6
22826else
22827  if test -n "$WINLD"; then
22828  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22829else
22830  ac_prog_rejected=no
22831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22832for as_dir in $PATH
22833do
22834  IFS=$as_save_IFS
22835  test -z "$as_dir" && as_dir=.
22836    for ac_exec_ext in '' $ac_executable_extensions; do
22837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22838    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22839       ac_prog_rejected=yes
22840       continue
22841     fi
22842    ac_cv_prog_WINLD="link"
22843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22844    break 2
22845  fi
22846done
22847  done
22848IFS=$as_save_IFS
22849
22850if test $ac_prog_rejected = yes; then
22851  # We found a bogon in the path, so make sure we never use it.
22852  set dummy $ac_cv_prog_WINLD
22853  shift
22854  if test $# != 0; then
22855    # We chose a different compiler from the bogus one.
22856    # However, it has the same basename, so the bogon will be chosen
22857    # first if we set WINLD to just the basename; use the full file name.
22858    shift
22859    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22860  fi
22861fi
22862fi
22863fi
22864WINLD=$ac_cv_prog_WINLD
22865if test -n "$WINLD"; then
22866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22867$as_echo "$WINLD" >&6; }
22868else
22869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22870$as_echo "no" >&6; }
22871fi
22872
22873
22874    # Since we must ignore the first found link, WINLD will contain
22875    # the full path to the link.exe program.
22876
22877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22878
22879  # First separate the path from the arguments. This will split at the first
22880  # space.
22881  complete="$WINLD"
22882  path="${complete%% *}"
22883  tmp="$complete EOL"
22884  arguments="${tmp#* }"
22885
22886  # Input might be given as Windows format, start by converting to
22887  # unix format.
22888  new_path=`$CYGPATH -u "$path"`
22889
22890  # Now try to locate executable using which
22891  new_path=`$WHICH "$new_path" 2> /dev/null`
22892  # bat and cmd files are not always considered executable in cygwin causing which
22893  # to not find them
22894  if test "x$new_path" = x \
22895           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22896           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22897    new_path=`$CYGPATH -u "$path"`
22898  fi
22899  if test "x$new_path" = x; then
22900    # Oops. Which didn't find the executable.
22901    # The splitting of arguments from the executable at a space might have been incorrect,
22902    # since paths with space are more likely in Windows. Give it another try with the whole
22903    # argument.
22904    path="$complete"
22905    arguments="EOL"
22906    new_path=`$CYGPATH -u "$path"`
22907    new_path=`$WHICH "$new_path" 2> /dev/null`
22908    # bat and cmd files are not always considered executable in cygwin causing which
22909    # to not find them
22910    if test "x$new_path" = x \
22911             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22912             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22913      new_path=`$CYGPATH -u "$path"`
22914    fi
22915    if test "x$new_path" = x; then
22916      # It's still not found. Now this is an unrecoverable error.
22917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22918$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22919      has_space=`$ECHO "$complete" | $GREP " "`
22920      if test "x$has_space" != x; then
22921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22923      fi
22924      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22925    fi
22926  fi
22927
22928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22931  # "foo.exe" is OK but "foo" is an error.
22932  #
22933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22934  # It is also a way to make sure we got the proper file name for the real test later on.
22935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22936  if test "x$test_shortpath" = x; then
22937    # Short path failed, file does not exist as specified.
22938    # Try adding .exe or .cmd
22939    if test -f "${new_path}.exe"; then
22940       input_to_shortpath="${new_path}.exe"
22941    elif test -f "${new_path}.cmd"; then
22942       input_to_shortpath="${new_path}.cmd"
22943    else
22944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22945$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22946      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22947$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22948      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22949    fi
22950  else
22951    input_to_shortpath="$new_path"
22952  fi
22953
22954  # Call helper function which possibly converts this using DOS-style short mode.
22955  # If so, the updated path is stored in $new_path.
22956  new_path="$input_to_shortpath"
22957
22958  input_path="$input_to_shortpath"
22959  # Check if we need to convert this using DOS-style short mode. If the path
22960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22961  # take no chances and rewrite it.
22962  # Note: m4 eats our [], so we need to use [ and ] instead.
22963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22964  if test "x$has_forbidden_chars" != x; then
22965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22969      # Going to short mode and back again did indeed matter. Since short mode is
22970      # case insensitive, let's make it lowercase to improve readability.
22971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22972      # Now convert it back to Unix-stile (cygpath)
22973      input_path=`$CYGPATH -u "$shortmode_path"`
22974      new_path="$input_path"
22975    fi
22976  fi
22977
22978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22979  if test "x$test_cygdrive_prefix" = x; then
22980    # As a simple fix, exclude /usr/bin since it's not a real path.
22981    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22983      # a path prefixed by /cygdrive for fixpath to work.
22984      new_path="$CYGWIN_ROOT_PATH$input_path"
22985    fi
22986  fi
22987
22988  # remove trailing .exe if any
22989  new_path="${new_path/%.exe/}"
22990
22991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992
22993  # First separate the path from the arguments. This will split at the first
22994  # space.
22995  complete="$WINLD"
22996  path="${complete%% *}"
22997  tmp="$complete EOL"
22998  arguments="${tmp#* }"
22999
23000  # Input might be given as Windows format, start by converting to
23001  # unix format.
23002  new_path="$path"
23003
23004  windows_path="$new_path"
23005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23006    unix_path=`$CYGPATH -u "$windows_path"`
23007    new_path="$unix_path"
23008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23010    new_path="$unix_path"
23011  fi
23012
23013
23014  # Now try to locate executable using which
23015  new_path=`$WHICH "$new_path" 2> /dev/null`
23016
23017  if test "x$new_path" = x; then
23018    # Oops. Which didn't find the executable.
23019    # The splitting of arguments from the executable at a space might have been incorrect,
23020    # since paths with space are more likely in Windows. Give it another try with the whole
23021    # argument.
23022    path="$complete"
23023    arguments="EOL"
23024    new_path="$path"
23025
23026  windows_path="$new_path"
23027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23028    unix_path=`$CYGPATH -u "$windows_path"`
23029    new_path="$unix_path"
23030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23032    new_path="$unix_path"
23033  fi
23034
23035
23036    new_path=`$WHICH "$new_path" 2> /dev/null`
23037
23038    if test "x$new_path" = x; then
23039      # It's still not found. Now this is an unrecoverable error.
23040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23041$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23042      has_space=`$ECHO "$complete" | $GREP " "`
23043      if test "x$has_space" != x; then
23044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23046      fi
23047      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23048    fi
23049  fi
23050
23051  # Now new_path has a complete unix path to the binary
23052  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23053    # Keep paths in /bin as-is, but remove trailing .exe if any
23054    new_path="${new_path/%.exe/}"
23055    # Do not save /bin paths to all_fixpath_prefixes!
23056  else
23057    # Not in mixed or Windows style, start by that.
23058    new_path=`cmd //c echo $new_path`
23059
23060  input_path="$new_path"
23061  # Check if we need to convert this using DOS-style short mode. If the path
23062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23063  # take no chances and rewrite it.
23064  # Note: m4 eats our [], so we need to use [ and ] instead.
23065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23066  if test "x$has_forbidden_chars" != x; then
23067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23069  fi
23070
23071    # Output is in $new_path
23072
23073  windows_path="$new_path"
23074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23075    unix_path=`$CYGPATH -u "$windows_path"`
23076    new_path="$unix_path"
23077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23079    new_path="$unix_path"
23080  fi
23081
23082    # remove trailing .exe if any
23083    new_path="${new_path/%.exe/}"
23084
23085    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23086    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23087  fi
23088
23089  else
23090    # We're on a posix platform. Hooray! :)
23091    # First separate the path from the arguments. This will split at the first
23092    # space.
23093    complete="$WINLD"
23094    path="${complete%% *}"
23095    tmp="$complete EOL"
23096    arguments="${tmp#* }"
23097
23098    # Cannot rely on the command "which" here since it doesn't always work.
23099    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23100    if test -z "$is_absolute_path"; then
23101      # Path to executable is not absolute. Find it.
23102      IFS_save="$IFS"
23103      IFS=:
23104      for p in $PATH; do
23105        if test -f "$p/$path" && test -x "$p/$path"; then
23106          new_path="$p/$path"
23107          break
23108        fi
23109      done
23110      IFS="$IFS_save"
23111    else
23112      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23113$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23114      new_path="$path"
23115    fi
23116
23117    if test "x$new_path" = x; then
23118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23119$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23120        has_space=`$ECHO "$complete" | $GREP " "`
23121        if test "x$has_space" != x; then
23122          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23123$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23124        fi
23125        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23126      fi
23127  fi
23128
23129      # Now join together the path and the arguments once again
23130      if test "x$arguments" != xEOL; then
23131        new_complete="$new_path ${arguments% *}"
23132      else
23133        new_complete="$new_path"
23134      fi
23135
23136  if test "x$complete" != "x$new_complete"; then
23137      WINLD="$new_complete"
23138      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23139$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23140    fi
23141
23142    printf "Windows linker was found at $WINLD\n"
23143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23144$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23145    "$WINLD" --version > /dev/null
23146    if test $? -eq 0 ; then
23147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23148$as_echo "no" >&6; }
23149      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23150    else
23151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23152$as_echo "yes" >&6; }
23153    fi
23154    LD="$WINLD"
23155    LDEXE="$WINLD"
23156    LDCXX="$WINLD"
23157    LDEXECXX="$WINLD"
23158
23159    # Extract the first word of "mt", so it can be a program name with args.
23160set dummy mt; ac_word=$2
23161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23162$as_echo_n "checking for $ac_word... " >&6; }
23163if test "${ac_cv_prog_MT+set}" = set; then :
23164  $as_echo_n "(cached) " >&6
23165else
23166  if test -n "$MT"; then
23167  ac_cv_prog_MT="$MT" # Let the user override the test.
23168else
23169  ac_prog_rejected=no
23170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23171for as_dir in $PATH
23172do
23173  IFS=$as_save_IFS
23174  test -z "$as_dir" && as_dir=.
23175    for ac_exec_ext in '' $ac_executable_extensions; do
23176  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23177    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23178       ac_prog_rejected=yes
23179       continue
23180     fi
23181    ac_cv_prog_MT="mt"
23182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23183    break 2
23184  fi
23185done
23186  done
23187IFS=$as_save_IFS
23188
23189if test $ac_prog_rejected = yes; then
23190  # We found a bogon in the path, so make sure we never use it.
23191  set dummy $ac_cv_prog_MT
23192  shift
23193  if test $# != 0; then
23194    # We chose a different compiler from the bogus one.
23195    # However, it has the same basename, so the bogon will be chosen
23196    # first if we set MT to just the basename; use the full file name.
23197    shift
23198    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23199  fi
23200fi
23201fi
23202fi
23203MT=$ac_cv_prog_MT
23204if test -n "$MT"; then
23205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23206$as_echo "$MT" >&6; }
23207else
23208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23209$as_echo "no" >&6; }
23210fi
23211
23212
23213
23214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23215
23216  # First separate the path from the arguments. This will split at the first
23217  # space.
23218  complete="$MT"
23219  path="${complete%% *}"
23220  tmp="$complete EOL"
23221  arguments="${tmp#* }"
23222
23223  # Input might be given as Windows format, start by converting to
23224  # unix format.
23225  new_path=`$CYGPATH -u "$path"`
23226
23227  # Now try to locate executable using which
23228  new_path=`$WHICH "$new_path" 2> /dev/null`
23229  # bat and cmd files are not always considered executable in cygwin causing which
23230  # to not find them
23231  if test "x$new_path" = x \
23232           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23233           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23234    new_path=`$CYGPATH -u "$path"`
23235  fi
23236  if test "x$new_path" = x; then
23237    # Oops. Which didn't find the executable.
23238    # The splitting of arguments from the executable at a space might have been incorrect,
23239    # since paths with space are more likely in Windows. Give it another try with the whole
23240    # argument.
23241    path="$complete"
23242    arguments="EOL"
23243    new_path=`$CYGPATH -u "$path"`
23244    new_path=`$WHICH "$new_path" 2> /dev/null`
23245    # bat and cmd files are not always considered executable in cygwin causing which
23246    # to not find them
23247    if test "x$new_path" = x \
23248             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23249             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23250      new_path=`$CYGPATH -u "$path"`
23251    fi
23252    if test "x$new_path" = x; then
23253      # It's still not found. Now this is an unrecoverable error.
23254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23255$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23256      has_space=`$ECHO "$complete" | $GREP " "`
23257      if test "x$has_space" != x; then
23258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23260      fi
23261      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23262    fi
23263  fi
23264
23265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23268  # "foo.exe" is OK but "foo" is an error.
23269  #
23270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23271  # It is also a way to make sure we got the proper file name for the real test later on.
23272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23273  if test "x$test_shortpath" = x; then
23274    # Short path failed, file does not exist as specified.
23275    # Try adding .exe or .cmd
23276    if test -f "${new_path}.exe"; then
23277       input_to_shortpath="${new_path}.exe"
23278    elif test -f "${new_path}.cmd"; then
23279       input_to_shortpath="${new_path}.cmd"
23280    else
23281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23282$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23285      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23286    fi
23287  else
23288    input_to_shortpath="$new_path"
23289  fi
23290
23291  # Call helper function which possibly converts this using DOS-style short mode.
23292  # If so, the updated path is stored in $new_path.
23293  new_path="$input_to_shortpath"
23294
23295  input_path="$input_to_shortpath"
23296  # Check if we need to convert this using DOS-style short mode. If the path
23297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23298  # take no chances and rewrite it.
23299  # Note: m4 eats our [], so we need to use [ and ] instead.
23300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23301  if test "x$has_forbidden_chars" != x; then
23302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23306      # Going to short mode and back again did indeed matter. Since short mode is
23307      # case insensitive, let's make it lowercase to improve readability.
23308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23309      # Now convert it back to Unix-stile (cygpath)
23310      input_path=`$CYGPATH -u "$shortmode_path"`
23311      new_path="$input_path"
23312    fi
23313  fi
23314
23315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23316  if test "x$test_cygdrive_prefix" = x; then
23317    # As a simple fix, exclude /usr/bin since it's not a real path.
23318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23320      # a path prefixed by /cygdrive for fixpath to work.
23321      new_path="$CYGWIN_ROOT_PATH$input_path"
23322    fi
23323  fi
23324
23325  # remove trailing .exe if any
23326  new_path="${new_path/%.exe/}"
23327
23328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23329
23330  # First separate the path from the arguments. This will split at the first
23331  # space.
23332  complete="$MT"
23333  path="${complete%% *}"
23334  tmp="$complete EOL"
23335  arguments="${tmp#* }"
23336
23337  # Input might be given as Windows format, start by converting to
23338  # unix format.
23339  new_path="$path"
23340
23341  windows_path="$new_path"
23342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23343    unix_path=`$CYGPATH -u "$windows_path"`
23344    new_path="$unix_path"
23345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23347    new_path="$unix_path"
23348  fi
23349
23350
23351  # Now try to locate executable using which
23352  new_path=`$WHICH "$new_path" 2> /dev/null`
23353
23354  if test "x$new_path" = x; then
23355    # Oops. Which didn't find the executable.
23356    # The splitting of arguments from the executable at a space might have been incorrect,
23357    # since paths with space are more likely in Windows. Give it another try with the whole
23358    # argument.
23359    path="$complete"
23360    arguments="EOL"
23361    new_path="$path"
23362
23363  windows_path="$new_path"
23364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23365    unix_path=`$CYGPATH -u "$windows_path"`
23366    new_path="$unix_path"
23367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23369    new_path="$unix_path"
23370  fi
23371
23372
23373    new_path=`$WHICH "$new_path" 2> /dev/null`
23374
23375    if test "x$new_path" = x; then
23376      # It's still not found. Now this is an unrecoverable error.
23377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23378$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23379      has_space=`$ECHO "$complete" | $GREP " "`
23380      if test "x$has_space" != x; then
23381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23383      fi
23384      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23385    fi
23386  fi
23387
23388  # Now new_path has a complete unix path to the binary
23389  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23390    # Keep paths in /bin as-is, but remove trailing .exe if any
23391    new_path="${new_path/%.exe/}"
23392    # Do not save /bin paths to all_fixpath_prefixes!
23393  else
23394    # Not in mixed or Windows style, start by that.
23395    new_path=`cmd //c echo $new_path`
23396
23397  input_path="$new_path"
23398  # Check if we need to convert this using DOS-style short mode. If the path
23399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23400  # take no chances and rewrite it.
23401  # Note: m4 eats our [], so we need to use [ and ] instead.
23402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23403  if test "x$has_forbidden_chars" != x; then
23404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23406  fi
23407
23408    # Output is in $new_path
23409
23410  windows_path="$new_path"
23411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23412    unix_path=`$CYGPATH -u "$windows_path"`
23413    new_path="$unix_path"
23414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23416    new_path="$unix_path"
23417  fi
23418
23419    # remove trailing .exe if any
23420    new_path="${new_path/%.exe/}"
23421
23422    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23423    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23424  fi
23425
23426  else
23427    # We're on a posix platform. Hooray! :)
23428    # First separate the path from the arguments. This will split at the first
23429    # space.
23430    complete="$MT"
23431    path="${complete%% *}"
23432    tmp="$complete EOL"
23433    arguments="${tmp#* }"
23434
23435    # Cannot rely on the command "which" here since it doesn't always work.
23436    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23437    if test -z "$is_absolute_path"; then
23438      # Path to executable is not absolute. Find it.
23439      IFS_save="$IFS"
23440      IFS=:
23441      for p in $PATH; do
23442        if test -f "$p/$path" && test -x "$p/$path"; then
23443          new_path="$p/$path"
23444          break
23445        fi
23446      done
23447      IFS="$IFS_save"
23448    else
23449      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23450$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23451      new_path="$path"
23452    fi
23453
23454    if test "x$new_path" = x; then
23455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23456$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23457        has_space=`$ECHO "$complete" | $GREP " "`
23458        if test "x$has_space" != x; then
23459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23461        fi
23462        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23463      fi
23464  fi
23465
23466      # Now join together the path and the arguments once again
23467      if test "x$arguments" != xEOL; then
23468        new_complete="$new_path ${arguments% *}"
23469      else
23470        new_complete="$new_path"
23471      fi
23472
23473  if test "x$complete" != "x$new_complete"; then
23474      MT="$new_complete"
23475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23476$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23477    fi
23478
23479    # The resource compiler
23480    # Extract the first word of "rc", so it can be a program name with args.
23481set dummy rc; ac_word=$2
23482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23483$as_echo_n "checking for $ac_word... " >&6; }
23484if test "${ac_cv_prog_RC+set}" = set; then :
23485  $as_echo_n "(cached) " >&6
23486else
23487  if test -n "$RC"; then
23488  ac_cv_prog_RC="$RC" # Let the user override the test.
23489else
23490  ac_prog_rejected=no
23491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23492for as_dir in $PATH
23493do
23494  IFS=$as_save_IFS
23495  test -z "$as_dir" && as_dir=.
23496    for ac_exec_ext in '' $ac_executable_extensions; do
23497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23498    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23499       ac_prog_rejected=yes
23500       continue
23501     fi
23502    ac_cv_prog_RC="rc"
23503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23504    break 2
23505  fi
23506done
23507  done
23508IFS=$as_save_IFS
23509
23510if test $ac_prog_rejected = yes; then
23511  # We found a bogon in the path, so make sure we never use it.
23512  set dummy $ac_cv_prog_RC
23513  shift
23514  if test $# != 0; then
23515    # We chose a different compiler from the bogus one.
23516    # However, it has the same basename, so the bogon will be chosen
23517    # first if we set RC to just the basename; use the full file name.
23518    shift
23519    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23520  fi
23521fi
23522fi
23523fi
23524RC=$ac_cv_prog_RC
23525if test -n "$RC"; then
23526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23527$as_echo "$RC" >&6; }
23528else
23529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23530$as_echo "no" >&6; }
23531fi
23532
23533
23534
23535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23536
23537  # First separate the path from the arguments. This will split at the first
23538  # space.
23539  complete="$RC"
23540  path="${complete%% *}"
23541  tmp="$complete EOL"
23542  arguments="${tmp#* }"
23543
23544  # Input might be given as Windows format, start by converting to
23545  # unix format.
23546  new_path=`$CYGPATH -u "$path"`
23547
23548  # Now try to locate executable using which
23549  new_path=`$WHICH "$new_path" 2> /dev/null`
23550  # bat and cmd files are not always considered executable in cygwin causing which
23551  # to not find them
23552  if test "x$new_path" = x \
23553           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23554           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23555    new_path=`$CYGPATH -u "$path"`
23556  fi
23557  if test "x$new_path" = x; then
23558    # Oops. Which didn't find the executable.
23559    # The splitting of arguments from the executable at a space might have been incorrect,
23560    # since paths with space are more likely in Windows. Give it another try with the whole
23561    # argument.
23562    path="$complete"
23563    arguments="EOL"
23564    new_path=`$CYGPATH -u "$path"`
23565    new_path=`$WHICH "$new_path" 2> /dev/null`
23566    # bat and cmd files are not always considered executable in cygwin causing which
23567    # to not find them
23568    if test "x$new_path" = x \
23569             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23570             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23571      new_path=`$CYGPATH -u "$path"`
23572    fi
23573    if test "x$new_path" = x; then
23574      # It's still not found. Now this is an unrecoverable error.
23575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23576$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23577      has_space=`$ECHO "$complete" | $GREP " "`
23578      if test "x$has_space" != x; then
23579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23581      fi
23582      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23583    fi
23584  fi
23585
23586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23589  # "foo.exe" is OK but "foo" is an error.
23590  #
23591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23592  # It is also a way to make sure we got the proper file name for the real test later on.
23593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23594  if test "x$test_shortpath" = x; then
23595    # Short path failed, file does not exist as specified.
23596    # Try adding .exe or .cmd
23597    if test -f "${new_path}.exe"; then
23598       input_to_shortpath="${new_path}.exe"
23599    elif test -f "${new_path}.cmd"; then
23600       input_to_shortpath="${new_path}.cmd"
23601    else
23602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23603$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23606      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23607    fi
23608  else
23609    input_to_shortpath="$new_path"
23610  fi
23611
23612  # Call helper function which possibly converts this using DOS-style short mode.
23613  # If so, the updated path is stored in $new_path.
23614  new_path="$input_to_shortpath"
23615
23616  input_path="$input_to_shortpath"
23617  # Check if we need to convert this using DOS-style short mode. If the path
23618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23619  # take no chances and rewrite it.
23620  # Note: m4 eats our [], so we need to use [ and ] instead.
23621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23622  if test "x$has_forbidden_chars" != x; then
23623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23627      # Going to short mode and back again did indeed matter. Since short mode is
23628      # case insensitive, let's make it lowercase to improve readability.
23629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23630      # Now convert it back to Unix-stile (cygpath)
23631      input_path=`$CYGPATH -u "$shortmode_path"`
23632      new_path="$input_path"
23633    fi
23634  fi
23635
23636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23637  if test "x$test_cygdrive_prefix" = x; then
23638    # As a simple fix, exclude /usr/bin since it's not a real path.
23639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23641      # a path prefixed by /cygdrive for fixpath to work.
23642      new_path="$CYGWIN_ROOT_PATH$input_path"
23643    fi
23644  fi
23645
23646  # remove trailing .exe if any
23647  new_path="${new_path/%.exe/}"
23648
23649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23650
23651  # First separate the path from the arguments. This will split at the first
23652  # space.
23653  complete="$RC"
23654  path="${complete%% *}"
23655  tmp="$complete EOL"
23656  arguments="${tmp#* }"
23657
23658  # Input might be given as Windows format, start by converting to
23659  # unix format.
23660  new_path="$path"
23661
23662  windows_path="$new_path"
23663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23664    unix_path=`$CYGPATH -u "$windows_path"`
23665    new_path="$unix_path"
23666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23668    new_path="$unix_path"
23669  fi
23670
23671
23672  # Now try to locate executable using which
23673  new_path=`$WHICH "$new_path" 2> /dev/null`
23674
23675  if test "x$new_path" = x; then
23676    # Oops. Which didn't find the executable.
23677    # The splitting of arguments from the executable at a space might have been incorrect,
23678    # since paths with space are more likely in Windows. Give it another try with the whole
23679    # argument.
23680    path="$complete"
23681    arguments="EOL"
23682    new_path="$path"
23683
23684  windows_path="$new_path"
23685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23686    unix_path=`$CYGPATH -u "$windows_path"`
23687    new_path="$unix_path"
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23690    new_path="$unix_path"
23691  fi
23692
23693
23694    new_path=`$WHICH "$new_path" 2> /dev/null`
23695
23696    if test "x$new_path" = x; then
23697      # It's still not found. Now this is an unrecoverable error.
23698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23699$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23700      has_space=`$ECHO "$complete" | $GREP " "`
23701      if test "x$has_space" != x; then
23702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23704      fi
23705      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23706    fi
23707  fi
23708
23709  # Now new_path has a complete unix path to the binary
23710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23711    # Keep paths in /bin as-is, but remove trailing .exe if any
23712    new_path="${new_path/%.exe/}"
23713    # Do not save /bin paths to all_fixpath_prefixes!
23714  else
23715    # Not in mixed or Windows style, start by that.
23716    new_path=`cmd //c echo $new_path`
23717
23718  input_path="$new_path"
23719  # Check if we need to convert this using DOS-style short mode. If the path
23720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23721  # take no chances and rewrite it.
23722  # Note: m4 eats our [], so we need to use [ and ] instead.
23723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23724  if test "x$has_forbidden_chars" != x; then
23725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23727  fi
23728
23729    # Output is in $new_path
23730
23731  windows_path="$new_path"
23732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23733    unix_path=`$CYGPATH -u "$windows_path"`
23734    new_path="$unix_path"
23735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23737    new_path="$unix_path"
23738  fi
23739
23740    # remove trailing .exe if any
23741    new_path="${new_path/%.exe/}"
23742
23743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23745  fi
23746
23747  else
23748    # We're on a posix platform. Hooray! :)
23749    # First separate the path from the arguments. This will split at the first
23750    # space.
23751    complete="$RC"
23752    path="${complete%% *}"
23753    tmp="$complete EOL"
23754    arguments="${tmp#* }"
23755
23756    # Cannot rely on the command "which" here since it doesn't always work.
23757    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23758    if test -z "$is_absolute_path"; then
23759      # Path to executable is not absolute. Find it.
23760      IFS_save="$IFS"
23761      IFS=:
23762      for p in $PATH; do
23763        if test -f "$p/$path" && test -x "$p/$path"; then
23764          new_path="$p/$path"
23765          break
23766        fi
23767      done
23768      IFS="$IFS_save"
23769    else
23770      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23771$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23772      new_path="$path"
23773    fi
23774
23775    if test "x$new_path" = x; then
23776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23777$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23778        has_space=`$ECHO "$complete" | $GREP " "`
23779        if test "x$has_space" != x; then
23780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23782        fi
23783        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23784      fi
23785  fi
23786
23787      # Now join together the path and the arguments once again
23788      if test "x$arguments" != xEOL; then
23789        new_complete="$new_path ${arguments% *}"
23790      else
23791        new_complete="$new_path"
23792      fi
23793
23794  if test "x$complete" != "x$new_complete"; then
23795      RC="$new_complete"
23796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23797$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23798    fi
23799
23800
23801    # For hotspot, we need these in Windows mixed path,
23802    # so rewrite them all. Need added .exe suffix.
23803    HOTSPOT_CXX="$CXX.exe"
23804    HOTSPOT_LD="$LD.exe"
23805    HOTSPOT_MT="$MT.exe"
23806    HOTSPOT_RC="$RC.exe"
23807
23808  unix_path="$HOTSPOT_CXX"
23809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23810    windows_path=`$CYGPATH -m "$unix_path"`
23811    HOTSPOT_CXX="$windows_path"
23812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23813    windows_path=`cmd //c echo $unix_path`
23814    HOTSPOT_CXX="$windows_path"
23815  fi
23816
23817
23818  unix_path="$HOTSPOT_LD"
23819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23820    windows_path=`$CYGPATH -m "$unix_path"`
23821    HOTSPOT_LD="$windows_path"
23822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23823    windows_path=`cmd //c echo $unix_path`
23824    HOTSPOT_LD="$windows_path"
23825  fi
23826
23827
23828  unix_path="$HOTSPOT_MT"
23829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23830    windows_path=`$CYGPATH -m "$unix_path"`
23831    HOTSPOT_MT="$windows_path"
23832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23833    windows_path=`cmd //c echo $unix_path`
23834    HOTSPOT_MT="$windows_path"
23835  fi
23836
23837
23838  unix_path="$HOTSPOT_RC"
23839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23840    windows_path=`$CYGPATH -m "$unix_path"`
23841    HOTSPOT_RC="$windows_path"
23842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23843    windows_path=`cmd //c echo $unix_path`
23844    HOTSPOT_RC="$windows_path"
23845  fi
23846
23847
23848
23849
23850    RC_FLAGS="-nologo -l 0x409 -r"
23851    if test "x$VARIANT" = xOPT; then :
23852
23853        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23854
23855fi
23856
23857    # The version variables used to create RC_FLAGS may be overridden
23858    # in a custom configure script, or possibly the command line.
23859    # Let those variables be expanded at make time in spec.gmk.
23860    # The \$ are escaped to the shell, and the $(...) variables
23861    # are evaluated by make.
23862    RC_FLAGS="$RC_FLAGS \
23863        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23864        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23865        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23866        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23867        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23868        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23869        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23870
23871    # lib.exe is used to create static libraries.
23872    # Extract the first word of "lib", so it can be a program name with args.
23873set dummy lib; ac_word=$2
23874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23875$as_echo_n "checking for $ac_word... " >&6; }
23876if test "${ac_cv_prog_WINAR+set}" = set; then :
23877  $as_echo_n "(cached) " >&6
23878else
23879  if test -n "$WINAR"; then
23880  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23881else
23882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23883for as_dir in $PATH
23884do
23885  IFS=$as_save_IFS
23886  test -z "$as_dir" && as_dir=.
23887    for ac_exec_ext in '' $ac_executable_extensions; do
23888  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23889    ac_cv_prog_WINAR="lib"
23890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23891    break 2
23892  fi
23893done
23894  done
23895IFS=$as_save_IFS
23896
23897fi
23898fi
23899WINAR=$ac_cv_prog_WINAR
23900if test -n "$WINAR"; then
23901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23902$as_echo "$WINAR" >&6; }
23903else
23904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23905$as_echo "no" >&6; }
23906fi
23907
23908
23909
23910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23911
23912  # First separate the path from the arguments. This will split at the first
23913  # space.
23914  complete="$WINAR"
23915  path="${complete%% *}"
23916  tmp="$complete EOL"
23917  arguments="${tmp#* }"
23918
23919  # Input might be given as Windows format, start by converting to
23920  # unix format.
23921  new_path=`$CYGPATH -u "$path"`
23922
23923  # Now try to locate executable using which
23924  new_path=`$WHICH "$new_path" 2> /dev/null`
23925  # bat and cmd files are not always considered executable in cygwin causing which
23926  # to not find them
23927  if test "x$new_path" = x \
23928           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23929           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23930    new_path=`$CYGPATH -u "$path"`
23931  fi
23932  if test "x$new_path" = x; then
23933    # Oops. Which didn't find the executable.
23934    # The splitting of arguments from the executable at a space might have been incorrect,
23935    # since paths with space are more likely in Windows. Give it another try with the whole
23936    # argument.
23937    path="$complete"
23938    arguments="EOL"
23939    new_path=`$CYGPATH -u "$path"`
23940    new_path=`$WHICH "$new_path" 2> /dev/null`
23941    # bat and cmd files are not always considered executable in cygwin causing which
23942    # to not find them
23943    if test "x$new_path" = x \
23944             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23945             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23946      new_path=`$CYGPATH -u "$path"`
23947    fi
23948    if test "x$new_path" = x; then
23949      # It's still not found. Now this is an unrecoverable error.
23950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23951$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23952      has_space=`$ECHO "$complete" | $GREP " "`
23953      if test "x$has_space" != x; then
23954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23956      fi
23957      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23958    fi
23959  fi
23960
23961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23964  # "foo.exe" is OK but "foo" is an error.
23965  #
23966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23967  # It is also a way to make sure we got the proper file name for the real test later on.
23968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23969  if test "x$test_shortpath" = x; then
23970    # Short path failed, file does not exist as specified.
23971    # Try adding .exe or .cmd
23972    if test -f "${new_path}.exe"; then
23973       input_to_shortpath="${new_path}.exe"
23974    elif test -f "${new_path}.cmd"; then
23975       input_to_shortpath="${new_path}.cmd"
23976    else
23977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23978$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23979      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23980$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23981      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23982    fi
23983  else
23984    input_to_shortpath="$new_path"
23985  fi
23986
23987  # Call helper function which possibly converts this using DOS-style short mode.
23988  # If so, the updated path is stored in $new_path.
23989  new_path="$input_to_shortpath"
23990
23991  input_path="$input_to_shortpath"
23992  # Check if we need to convert this using DOS-style short mode. If the path
23993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23994  # take no chances and rewrite it.
23995  # Note: m4 eats our [], so we need to use [ and ] instead.
23996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23997  if test "x$has_forbidden_chars" != x; then
23998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24002      # Going to short mode and back again did indeed matter. Since short mode is
24003      # case insensitive, let's make it lowercase to improve readability.
24004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24005      # Now convert it back to Unix-stile (cygpath)
24006      input_path=`$CYGPATH -u "$shortmode_path"`
24007      new_path="$input_path"
24008    fi
24009  fi
24010
24011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24012  if test "x$test_cygdrive_prefix" = x; then
24013    # As a simple fix, exclude /usr/bin since it's not a real path.
24014    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24016      # a path prefixed by /cygdrive for fixpath to work.
24017      new_path="$CYGWIN_ROOT_PATH$input_path"
24018    fi
24019  fi
24020
24021  # remove trailing .exe if any
24022  new_path="${new_path/%.exe/}"
24023
24024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24025
24026  # First separate the path from the arguments. This will split at the first
24027  # space.
24028  complete="$WINAR"
24029  path="${complete%% *}"
24030  tmp="$complete EOL"
24031  arguments="${tmp#* }"
24032
24033  # Input might be given as Windows format, start by converting to
24034  # unix format.
24035  new_path="$path"
24036
24037  windows_path="$new_path"
24038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24039    unix_path=`$CYGPATH -u "$windows_path"`
24040    new_path="$unix_path"
24041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24043    new_path="$unix_path"
24044  fi
24045
24046
24047  # Now try to locate executable using which
24048  new_path=`$WHICH "$new_path" 2> /dev/null`
24049
24050  if test "x$new_path" = x; then
24051    # Oops. Which didn't find the executable.
24052    # The splitting of arguments from the executable at a space might have been incorrect,
24053    # since paths with space are more likely in Windows. Give it another try with the whole
24054    # argument.
24055    path="$complete"
24056    arguments="EOL"
24057    new_path="$path"
24058
24059  windows_path="$new_path"
24060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24061    unix_path=`$CYGPATH -u "$windows_path"`
24062    new_path="$unix_path"
24063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24065    new_path="$unix_path"
24066  fi
24067
24068
24069    new_path=`$WHICH "$new_path" 2> /dev/null`
24070
24071    if test "x$new_path" = x; then
24072      # It's still not found. Now this is an unrecoverable error.
24073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24074$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24075      has_space=`$ECHO "$complete" | $GREP " "`
24076      if test "x$has_space" != x; then
24077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24079      fi
24080      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24081    fi
24082  fi
24083
24084  # Now new_path has a complete unix path to the binary
24085  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24086    # Keep paths in /bin as-is, but remove trailing .exe if any
24087    new_path="${new_path/%.exe/}"
24088    # Do not save /bin paths to all_fixpath_prefixes!
24089  else
24090    # Not in mixed or Windows style, start by that.
24091    new_path=`cmd //c echo $new_path`
24092
24093  input_path="$new_path"
24094  # Check if we need to convert this using DOS-style short mode. If the path
24095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24096  # take no chances and rewrite it.
24097  # Note: m4 eats our [], so we need to use [ and ] instead.
24098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24099  if test "x$has_forbidden_chars" != x; then
24100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24102  fi
24103
24104    # Output is in $new_path
24105
24106  windows_path="$new_path"
24107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24108    unix_path=`$CYGPATH -u "$windows_path"`
24109    new_path="$unix_path"
24110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24112    new_path="$unix_path"
24113  fi
24114
24115    # remove trailing .exe if any
24116    new_path="${new_path/%.exe/}"
24117
24118    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24119    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24120  fi
24121
24122  else
24123    # We're on a posix platform. Hooray! :)
24124    # First separate the path from the arguments. This will split at the first
24125    # space.
24126    complete="$WINAR"
24127    path="${complete%% *}"
24128    tmp="$complete EOL"
24129    arguments="${tmp#* }"
24130
24131    # Cannot rely on the command "which" here since it doesn't always work.
24132    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24133    if test -z "$is_absolute_path"; then
24134      # Path to executable is not absolute. Find it.
24135      IFS_save="$IFS"
24136      IFS=:
24137      for p in $PATH; do
24138        if test -f "$p/$path" && test -x "$p/$path"; then
24139          new_path="$p/$path"
24140          break
24141        fi
24142      done
24143      IFS="$IFS_save"
24144    else
24145      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24146$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24147      new_path="$path"
24148    fi
24149
24150    if test "x$new_path" = x; then
24151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24152$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24153        has_space=`$ECHO "$complete" | $GREP " "`
24154        if test "x$has_space" != x; then
24155          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24156$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24157        fi
24158        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24159      fi
24160  fi
24161
24162      # Now join together the path and the arguments once again
24163      if test "x$arguments" != xEOL; then
24164        new_complete="$new_path ${arguments% *}"
24165      else
24166        new_complete="$new_path"
24167      fi
24168
24169  if test "x$complete" != "x$new_complete"; then
24170      WINAR="$new_complete"
24171      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24172$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24173    fi
24174
24175    AR="$WINAR"
24176    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24177
24178    # Extract the first word of "dumpbin", so it can be a program name with args.
24179set dummy dumpbin; ac_word=$2
24180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24181$as_echo_n "checking for $ac_word... " >&6; }
24182if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24183  $as_echo_n "(cached) " >&6
24184else
24185  if test -n "$DUMPBIN"; then
24186  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24187else
24188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24189for as_dir in $PATH
24190do
24191  IFS=$as_save_IFS
24192  test -z "$as_dir" && as_dir=.
24193    for ac_exec_ext in '' $ac_executable_extensions; do
24194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24195    ac_cv_prog_DUMPBIN="dumpbin"
24196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24197    break 2
24198  fi
24199done
24200  done
24201IFS=$as_save_IFS
24202
24203fi
24204fi
24205DUMPBIN=$ac_cv_prog_DUMPBIN
24206if test -n "$DUMPBIN"; then
24207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24208$as_echo "$DUMPBIN" >&6; }
24209else
24210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24211$as_echo "no" >&6; }
24212fi
24213
24214
24215
24216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24217
24218  # First separate the path from the arguments. This will split at the first
24219  # space.
24220  complete="$DUMPBIN"
24221  path="${complete%% *}"
24222  tmp="$complete EOL"
24223  arguments="${tmp#* }"
24224
24225  # Input might be given as Windows format, start by converting to
24226  # unix format.
24227  new_path=`$CYGPATH -u "$path"`
24228
24229  # Now try to locate executable using which
24230  new_path=`$WHICH "$new_path" 2> /dev/null`
24231  # bat and cmd files are not always considered executable in cygwin causing which
24232  # to not find them
24233  if test "x$new_path" = x \
24234           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24235           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24236    new_path=`$CYGPATH -u "$path"`
24237  fi
24238  if test "x$new_path" = x; then
24239    # Oops. Which didn't find the executable.
24240    # The splitting of arguments from the executable at a space might have been incorrect,
24241    # since paths with space are more likely in Windows. Give it another try with the whole
24242    # argument.
24243    path="$complete"
24244    arguments="EOL"
24245    new_path=`$CYGPATH -u "$path"`
24246    new_path=`$WHICH "$new_path" 2> /dev/null`
24247    # bat and cmd files are not always considered executable in cygwin causing which
24248    # to not find them
24249    if test "x$new_path" = x \
24250             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24251             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24252      new_path=`$CYGPATH -u "$path"`
24253    fi
24254    if test "x$new_path" = x; then
24255      # It's still not found. Now this is an unrecoverable error.
24256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24257$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24258      has_space=`$ECHO "$complete" | $GREP " "`
24259      if test "x$has_space" != x; then
24260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24262      fi
24263      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24264    fi
24265  fi
24266
24267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24270  # "foo.exe" is OK but "foo" is an error.
24271  #
24272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24273  # It is also a way to make sure we got the proper file name for the real test later on.
24274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24275  if test "x$test_shortpath" = x; then
24276    # Short path failed, file does not exist as specified.
24277    # Try adding .exe or .cmd
24278    if test -f "${new_path}.exe"; then
24279       input_to_shortpath="${new_path}.exe"
24280    elif test -f "${new_path}.cmd"; then
24281       input_to_shortpath="${new_path}.cmd"
24282    else
24283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24284$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24287      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24288    fi
24289  else
24290    input_to_shortpath="$new_path"
24291  fi
24292
24293  # Call helper function which possibly converts this using DOS-style short mode.
24294  # If so, the updated path is stored in $new_path.
24295  new_path="$input_to_shortpath"
24296
24297  input_path="$input_to_shortpath"
24298  # Check if we need to convert this using DOS-style short mode. If the path
24299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24300  # take no chances and rewrite it.
24301  # Note: m4 eats our [], so we need to use [ and ] instead.
24302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24303  if test "x$has_forbidden_chars" != x; then
24304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24308      # Going to short mode and back again did indeed matter. Since short mode is
24309      # case insensitive, let's make it lowercase to improve readability.
24310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24311      # Now convert it back to Unix-stile (cygpath)
24312      input_path=`$CYGPATH -u "$shortmode_path"`
24313      new_path="$input_path"
24314    fi
24315  fi
24316
24317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24318  if test "x$test_cygdrive_prefix" = x; then
24319    # As a simple fix, exclude /usr/bin since it's not a real path.
24320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24322      # a path prefixed by /cygdrive for fixpath to work.
24323      new_path="$CYGWIN_ROOT_PATH$input_path"
24324    fi
24325  fi
24326
24327  # remove trailing .exe if any
24328  new_path="${new_path/%.exe/}"
24329
24330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24331
24332  # First separate the path from the arguments. This will split at the first
24333  # space.
24334  complete="$DUMPBIN"
24335  path="${complete%% *}"
24336  tmp="$complete EOL"
24337  arguments="${tmp#* }"
24338
24339  # Input might be given as Windows format, start by converting to
24340  # unix format.
24341  new_path="$path"
24342
24343  windows_path="$new_path"
24344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24345    unix_path=`$CYGPATH -u "$windows_path"`
24346    new_path="$unix_path"
24347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24349    new_path="$unix_path"
24350  fi
24351
24352
24353  # Now try to locate executable using which
24354  new_path=`$WHICH "$new_path" 2> /dev/null`
24355
24356  if test "x$new_path" = x; then
24357    # Oops. Which didn't find the executable.
24358    # The splitting of arguments from the executable at a space might have been incorrect,
24359    # since paths with space are more likely in Windows. Give it another try with the whole
24360    # argument.
24361    path="$complete"
24362    arguments="EOL"
24363    new_path="$path"
24364
24365  windows_path="$new_path"
24366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24367    unix_path=`$CYGPATH -u "$windows_path"`
24368    new_path="$unix_path"
24369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24371    new_path="$unix_path"
24372  fi
24373
24374
24375    new_path=`$WHICH "$new_path" 2> /dev/null`
24376
24377    if test "x$new_path" = x; then
24378      # It's still not found. Now this is an unrecoverable error.
24379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24380$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24381      has_space=`$ECHO "$complete" | $GREP " "`
24382      if test "x$has_space" != x; then
24383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24385      fi
24386      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24387    fi
24388  fi
24389
24390  # Now new_path has a complete unix path to the binary
24391  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24392    # Keep paths in /bin as-is, but remove trailing .exe if any
24393    new_path="${new_path/%.exe/}"
24394    # Do not save /bin paths to all_fixpath_prefixes!
24395  else
24396    # Not in mixed or Windows style, start by that.
24397    new_path=`cmd //c echo $new_path`
24398
24399  input_path="$new_path"
24400  # Check if we need to convert this using DOS-style short mode. If the path
24401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24402  # take no chances and rewrite it.
24403  # Note: m4 eats our [], so we need to use [ and ] instead.
24404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24405  if test "x$has_forbidden_chars" != x; then
24406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24408  fi
24409
24410    # Output is in $new_path
24411
24412  windows_path="$new_path"
24413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24414    unix_path=`$CYGPATH -u "$windows_path"`
24415    new_path="$unix_path"
24416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24418    new_path="$unix_path"
24419  fi
24420
24421    # remove trailing .exe if any
24422    new_path="${new_path/%.exe/}"
24423
24424    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24425    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24426  fi
24427
24428  else
24429    # We're on a posix platform. Hooray! :)
24430    # First separate the path from the arguments. This will split at the first
24431    # space.
24432    complete="$DUMPBIN"
24433    path="${complete%% *}"
24434    tmp="$complete EOL"
24435    arguments="${tmp#* }"
24436
24437    # Cannot rely on the command "which" here since it doesn't always work.
24438    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24439    if test -z "$is_absolute_path"; then
24440      # Path to executable is not absolute. Find it.
24441      IFS_save="$IFS"
24442      IFS=:
24443      for p in $PATH; do
24444        if test -f "$p/$path" && test -x "$p/$path"; then
24445          new_path="$p/$path"
24446          break
24447        fi
24448      done
24449      IFS="$IFS_save"
24450    else
24451      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24452$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24453      new_path="$path"
24454    fi
24455
24456    if test "x$new_path" = x; then
24457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24458$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24459        has_space=`$ECHO "$complete" | $GREP " "`
24460        if test "x$has_space" != x; then
24461          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24462$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24463        fi
24464        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24465      fi
24466  fi
24467
24468      # Now join together the path and the arguments once again
24469      if test "x$arguments" != xEOL; then
24470        new_complete="$new_path ${arguments% *}"
24471      else
24472        new_complete="$new_path"
24473      fi
24474
24475  if test "x$complete" != "x$new_complete"; then
24476      DUMPBIN="$new_complete"
24477      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24478$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24479    fi
24480
24481
24482    COMPILER_TYPE=CL
24483    CCXXFLAGS="$CCXXFLAGS -nologo"
24484
24485fi
24486
24487
24488
24489ac_ext=c
24490ac_cpp='$CPP $CPPFLAGS'
24491ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24492ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24493ac_compiler_gnu=$ac_cv_c_compiler_gnu
24494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24495$as_echo_n "checking how to run the C preprocessor... " >&6; }
24496# On Suns, sometimes $CPP names a directory.
24497if test -n "$CPP" && test -d "$CPP"; then
24498  CPP=
24499fi
24500if test -z "$CPP"; then
24501  if test "${ac_cv_prog_CPP+set}" = set; then :
24502  $as_echo_n "(cached) " >&6
24503else
24504      # Double quotes because CPP needs to be expanded
24505    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24506    do
24507      ac_preproc_ok=false
24508for ac_c_preproc_warn_flag in '' yes
24509do
24510  # Use a header file that comes with gcc, so configuring glibc
24511  # with a fresh cross-compiler works.
24512  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24513  # <limits.h> exists even on freestanding compilers.
24514  # On the NeXT, cc -E runs the code through the compiler's parser,
24515  # not just through cpp. "Syntax error" is here to catch this case.
24516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24517/* end confdefs.h.  */
24518#ifdef __STDC__
24519# include <limits.h>
24520#else
24521# include <assert.h>
24522#endif
24523		     Syntax error
24524_ACEOF
24525if ac_fn_c_try_cpp "$LINENO"; then :
24526
24527else
24528  # Broken: fails on valid input.
24529continue
24530fi
24531rm -f conftest.err conftest.i conftest.$ac_ext
24532
24533  # OK, works on sane cases.  Now check whether nonexistent headers
24534  # can be detected and how.
24535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24536/* end confdefs.h.  */
24537#include <ac_nonexistent.h>
24538_ACEOF
24539if ac_fn_c_try_cpp "$LINENO"; then :
24540  # Broken: success on invalid input.
24541continue
24542else
24543  # Passes both tests.
24544ac_preproc_ok=:
24545break
24546fi
24547rm -f conftest.err conftest.i conftest.$ac_ext
24548
24549done
24550# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24551rm -f conftest.i conftest.err conftest.$ac_ext
24552if $ac_preproc_ok; then :
24553  break
24554fi
24555
24556    done
24557    ac_cv_prog_CPP=$CPP
24558
24559fi
24560  CPP=$ac_cv_prog_CPP
24561else
24562  ac_cv_prog_CPP=$CPP
24563fi
24564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24565$as_echo "$CPP" >&6; }
24566ac_preproc_ok=false
24567for ac_c_preproc_warn_flag in '' yes
24568do
24569  # Use a header file that comes with gcc, so configuring glibc
24570  # with a fresh cross-compiler works.
24571  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24572  # <limits.h> exists even on freestanding compilers.
24573  # On the NeXT, cc -E runs the code through the compiler's parser,
24574  # not just through cpp. "Syntax error" is here to catch this case.
24575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24576/* end confdefs.h.  */
24577#ifdef __STDC__
24578# include <limits.h>
24579#else
24580# include <assert.h>
24581#endif
24582		     Syntax error
24583_ACEOF
24584if ac_fn_c_try_cpp "$LINENO"; then :
24585
24586else
24587  # Broken: fails on valid input.
24588continue
24589fi
24590rm -f conftest.err conftest.i conftest.$ac_ext
24591
24592  # OK, works on sane cases.  Now check whether nonexistent headers
24593  # can be detected and how.
24594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24595/* end confdefs.h.  */
24596#include <ac_nonexistent.h>
24597_ACEOF
24598if ac_fn_c_try_cpp "$LINENO"; then :
24599  # Broken: success on invalid input.
24600continue
24601else
24602  # Passes both tests.
24603ac_preproc_ok=:
24604break
24605fi
24606rm -f conftest.err conftest.i conftest.$ac_ext
24607
24608done
24609# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24610rm -f conftest.i conftest.err conftest.$ac_ext
24611if $ac_preproc_ok; then :
24612
24613else
24614  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24616as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24617See \`config.log' for more details" "$LINENO" 5 ; }
24618fi
24619
24620ac_ext=cpp
24621ac_cpp='$CXXCPP $CPPFLAGS'
24622ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24623ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24624ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24625
24626
24627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628
24629  # First separate the path from the arguments. This will split at the first
24630  # space.
24631  complete="$CPP"
24632  path="${complete%% *}"
24633  tmp="$complete EOL"
24634  arguments="${tmp#* }"
24635
24636  # Input might be given as Windows format, start by converting to
24637  # unix format.
24638  new_path=`$CYGPATH -u "$path"`
24639
24640  # Now try to locate executable using which
24641  new_path=`$WHICH "$new_path" 2> /dev/null`
24642  # bat and cmd files are not always considered executable in cygwin causing which
24643  # to not find them
24644  if test "x$new_path" = x \
24645           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24646           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24647    new_path=`$CYGPATH -u "$path"`
24648  fi
24649  if test "x$new_path" = x; then
24650    # Oops. Which didn't find the executable.
24651    # The splitting of arguments from the executable at a space might have been incorrect,
24652    # since paths with space are more likely in Windows. Give it another try with the whole
24653    # argument.
24654    path="$complete"
24655    arguments="EOL"
24656    new_path=`$CYGPATH -u "$path"`
24657    new_path=`$WHICH "$new_path" 2> /dev/null`
24658    # bat and cmd files are not always considered executable in cygwin causing which
24659    # to not find them
24660    if test "x$new_path" = x \
24661             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24662             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24663      new_path=`$CYGPATH -u "$path"`
24664    fi
24665    if test "x$new_path" = x; then
24666      # It's still not found. Now this is an unrecoverable error.
24667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24668$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24669      has_space=`$ECHO "$complete" | $GREP " "`
24670      if test "x$has_space" != x; then
24671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24673      fi
24674      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24675    fi
24676  fi
24677
24678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24681  # "foo.exe" is OK but "foo" is an error.
24682  #
24683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24684  # It is also a way to make sure we got the proper file name for the real test later on.
24685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24686  if test "x$test_shortpath" = x; then
24687    # Short path failed, file does not exist as specified.
24688    # Try adding .exe or .cmd
24689    if test -f "${new_path}.exe"; then
24690       input_to_shortpath="${new_path}.exe"
24691    elif test -f "${new_path}.cmd"; then
24692       input_to_shortpath="${new_path}.cmd"
24693    else
24694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24695$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24696      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24697$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24698      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24699    fi
24700  else
24701    input_to_shortpath="$new_path"
24702  fi
24703
24704  # Call helper function which possibly converts this using DOS-style short mode.
24705  # If so, the updated path is stored in $new_path.
24706  new_path="$input_to_shortpath"
24707
24708  input_path="$input_to_shortpath"
24709  # Check if we need to convert this using DOS-style short mode. If the path
24710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24711  # take no chances and rewrite it.
24712  # Note: m4 eats our [], so we need to use [ and ] instead.
24713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24714  if test "x$has_forbidden_chars" != x; then
24715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24719      # Going to short mode and back again did indeed matter. Since short mode is
24720      # case insensitive, let's make it lowercase to improve readability.
24721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24722      # Now convert it back to Unix-stile (cygpath)
24723      input_path=`$CYGPATH -u "$shortmode_path"`
24724      new_path="$input_path"
24725    fi
24726  fi
24727
24728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24729  if test "x$test_cygdrive_prefix" = x; then
24730    # As a simple fix, exclude /usr/bin since it's not a real path.
24731    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24733      # a path prefixed by /cygdrive for fixpath to work.
24734      new_path="$CYGWIN_ROOT_PATH$input_path"
24735    fi
24736  fi
24737
24738  # remove trailing .exe if any
24739  new_path="${new_path/%.exe/}"
24740
24741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24742
24743  # First separate the path from the arguments. This will split at the first
24744  # space.
24745  complete="$CPP"
24746  path="${complete%% *}"
24747  tmp="$complete EOL"
24748  arguments="${tmp#* }"
24749
24750  # Input might be given as Windows format, start by converting to
24751  # unix format.
24752  new_path="$path"
24753
24754  windows_path="$new_path"
24755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24756    unix_path=`$CYGPATH -u "$windows_path"`
24757    new_path="$unix_path"
24758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24760    new_path="$unix_path"
24761  fi
24762
24763
24764  # Now try to locate executable using which
24765  new_path=`$WHICH "$new_path" 2> /dev/null`
24766
24767  if test "x$new_path" = x; then
24768    # Oops. Which didn't find the executable.
24769    # The splitting of arguments from the executable at a space might have been incorrect,
24770    # since paths with space are more likely in Windows. Give it another try with the whole
24771    # argument.
24772    path="$complete"
24773    arguments="EOL"
24774    new_path="$path"
24775
24776  windows_path="$new_path"
24777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24778    unix_path=`$CYGPATH -u "$windows_path"`
24779    new_path="$unix_path"
24780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24782    new_path="$unix_path"
24783  fi
24784
24785
24786    new_path=`$WHICH "$new_path" 2> /dev/null`
24787
24788    if test "x$new_path" = x; then
24789      # It's still not found. Now this is an unrecoverable error.
24790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24791$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24792      has_space=`$ECHO "$complete" | $GREP " "`
24793      if test "x$has_space" != x; then
24794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24796      fi
24797      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24798    fi
24799  fi
24800
24801  # Now new_path has a complete unix path to the binary
24802  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24803    # Keep paths in /bin as-is, but remove trailing .exe if any
24804    new_path="${new_path/%.exe/}"
24805    # Do not save /bin paths to all_fixpath_prefixes!
24806  else
24807    # Not in mixed or Windows style, start by that.
24808    new_path=`cmd //c echo $new_path`
24809
24810  input_path="$new_path"
24811  # Check if we need to convert this using DOS-style short mode. If the path
24812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24813  # take no chances and rewrite it.
24814  # Note: m4 eats our [], so we need to use [ and ] instead.
24815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24816  if test "x$has_forbidden_chars" != x; then
24817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24819  fi
24820
24821    # Output is in $new_path
24822
24823  windows_path="$new_path"
24824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24825    unix_path=`$CYGPATH -u "$windows_path"`
24826    new_path="$unix_path"
24827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24829    new_path="$unix_path"
24830  fi
24831
24832    # remove trailing .exe if any
24833    new_path="${new_path/%.exe/}"
24834
24835    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24836    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24837  fi
24838
24839  else
24840    # We're on a posix platform. Hooray! :)
24841    # First separate the path from the arguments. This will split at the first
24842    # space.
24843    complete="$CPP"
24844    path="${complete%% *}"
24845    tmp="$complete EOL"
24846    arguments="${tmp#* }"
24847
24848    # Cannot rely on the command "which" here since it doesn't always work.
24849    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24850    if test -z "$is_absolute_path"; then
24851      # Path to executable is not absolute. Find it.
24852      IFS_save="$IFS"
24853      IFS=:
24854      for p in $PATH; do
24855        if test -f "$p/$path" && test -x "$p/$path"; then
24856          new_path="$p/$path"
24857          break
24858        fi
24859      done
24860      IFS="$IFS_save"
24861    else
24862      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24863$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24864      new_path="$path"
24865    fi
24866
24867    if test "x$new_path" = x; then
24868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24869$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24870        has_space=`$ECHO "$complete" | $GREP " "`
24871        if test "x$has_space" != x; then
24872          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24874        fi
24875        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24876      fi
24877  fi
24878
24879      # Now join together the path and the arguments once again
24880      if test "x$arguments" != xEOL; then
24881        new_complete="$new_path ${arguments% *}"
24882      else
24883        new_complete="$new_path"
24884      fi
24885
24886  if test "x$complete" != "x$new_complete"; then
24887      CPP="$new_complete"
24888      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24889$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24890    fi
24891
24892
24893ac_ext=cpp
24894ac_cpp='$CXXCPP $CPPFLAGS'
24895ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24896ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24897ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24899$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24900if test -z "$CXXCPP"; then
24901  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24902  $as_echo_n "(cached) " >&6
24903else
24904      # Double quotes because CXXCPP needs to be expanded
24905    for CXXCPP in "$CXX -E" "/lib/cpp"
24906    do
24907      ac_preproc_ok=false
24908for ac_cxx_preproc_warn_flag in '' yes
24909do
24910  # Use a header file that comes with gcc, so configuring glibc
24911  # with a fresh cross-compiler works.
24912  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24913  # <limits.h> exists even on freestanding compilers.
24914  # On the NeXT, cc -E runs the code through the compiler's parser,
24915  # not just through cpp. "Syntax error" is here to catch this case.
24916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24917/* end confdefs.h.  */
24918#ifdef __STDC__
24919# include <limits.h>
24920#else
24921# include <assert.h>
24922#endif
24923		     Syntax error
24924_ACEOF
24925if ac_fn_cxx_try_cpp "$LINENO"; then :
24926
24927else
24928  # Broken: fails on valid input.
24929continue
24930fi
24931rm -f conftest.err conftest.i conftest.$ac_ext
24932
24933  # OK, works on sane cases.  Now check whether nonexistent headers
24934  # can be detected and how.
24935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24936/* end confdefs.h.  */
24937#include <ac_nonexistent.h>
24938_ACEOF
24939if ac_fn_cxx_try_cpp "$LINENO"; then :
24940  # Broken: success on invalid input.
24941continue
24942else
24943  # Passes both tests.
24944ac_preproc_ok=:
24945break
24946fi
24947rm -f conftest.err conftest.i conftest.$ac_ext
24948
24949done
24950# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24951rm -f conftest.i conftest.err conftest.$ac_ext
24952if $ac_preproc_ok; then :
24953  break
24954fi
24955
24956    done
24957    ac_cv_prog_CXXCPP=$CXXCPP
24958
24959fi
24960  CXXCPP=$ac_cv_prog_CXXCPP
24961else
24962  ac_cv_prog_CXXCPP=$CXXCPP
24963fi
24964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24965$as_echo "$CXXCPP" >&6; }
24966ac_preproc_ok=false
24967for ac_cxx_preproc_warn_flag in '' yes
24968do
24969  # Use a header file that comes with gcc, so configuring glibc
24970  # with a fresh cross-compiler works.
24971  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24972  # <limits.h> exists even on freestanding compilers.
24973  # On the NeXT, cc -E runs the code through the compiler's parser,
24974  # not just through cpp. "Syntax error" is here to catch this case.
24975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24976/* end confdefs.h.  */
24977#ifdef __STDC__
24978# include <limits.h>
24979#else
24980# include <assert.h>
24981#endif
24982		     Syntax error
24983_ACEOF
24984if ac_fn_cxx_try_cpp "$LINENO"; then :
24985
24986else
24987  # Broken: fails on valid input.
24988continue
24989fi
24990rm -f conftest.err conftest.i conftest.$ac_ext
24991
24992  # OK, works on sane cases.  Now check whether nonexistent headers
24993  # can be detected and how.
24994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24995/* end confdefs.h.  */
24996#include <ac_nonexistent.h>
24997_ACEOF
24998if ac_fn_cxx_try_cpp "$LINENO"; then :
24999  # Broken: success on invalid input.
25000continue
25001else
25002  # Passes both tests.
25003ac_preproc_ok=:
25004break
25005fi
25006rm -f conftest.err conftest.i conftest.$ac_ext
25007
25008done
25009# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25010rm -f conftest.i conftest.err conftest.$ac_ext
25011if $ac_preproc_ok; then :
25012
25013else
25014  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25016as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25017See \`config.log' for more details" "$LINENO" 5 ; }
25018fi
25019
25020ac_ext=cpp
25021ac_cpp='$CXXCPP $CPPFLAGS'
25022ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25023ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25024ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25025
25026
25027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25028
25029  # First separate the path from the arguments. This will split at the first
25030  # space.
25031  complete="$CXXCPP"
25032  path="${complete%% *}"
25033  tmp="$complete EOL"
25034  arguments="${tmp#* }"
25035
25036  # Input might be given as Windows format, start by converting to
25037  # unix format.
25038  new_path=`$CYGPATH -u "$path"`
25039
25040  # Now try to locate executable using which
25041  new_path=`$WHICH "$new_path" 2> /dev/null`
25042  # bat and cmd files are not always considered executable in cygwin causing which
25043  # to not find them
25044  if test "x$new_path" = x \
25045           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25046           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25047    new_path=`$CYGPATH -u "$path"`
25048  fi
25049  if test "x$new_path" = x; then
25050    # Oops. Which didn't find the executable.
25051    # The splitting of arguments from the executable at a space might have been incorrect,
25052    # since paths with space are more likely in Windows. Give it another try with the whole
25053    # argument.
25054    path="$complete"
25055    arguments="EOL"
25056    new_path=`$CYGPATH -u "$path"`
25057    new_path=`$WHICH "$new_path" 2> /dev/null`
25058    # bat and cmd files are not always considered executable in cygwin causing which
25059    # to not find them
25060    if test "x$new_path" = x \
25061             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25062             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25063      new_path=`$CYGPATH -u "$path"`
25064    fi
25065    if test "x$new_path" = x; then
25066      # It's still not found. Now this is an unrecoverable error.
25067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25068$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25069      has_space=`$ECHO "$complete" | $GREP " "`
25070      if test "x$has_space" != x; then
25071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25073      fi
25074      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25075    fi
25076  fi
25077
25078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25081  # "foo.exe" is OK but "foo" is an error.
25082  #
25083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25084  # It is also a way to make sure we got the proper file name for the real test later on.
25085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25086  if test "x$test_shortpath" = x; then
25087    # Short path failed, file does not exist as specified.
25088    # Try adding .exe or .cmd
25089    if test -f "${new_path}.exe"; then
25090       input_to_shortpath="${new_path}.exe"
25091    elif test -f "${new_path}.cmd"; then
25092       input_to_shortpath="${new_path}.cmd"
25093    else
25094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25095$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25098      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25099    fi
25100  else
25101    input_to_shortpath="$new_path"
25102  fi
25103
25104  # Call helper function which possibly converts this using DOS-style short mode.
25105  # If so, the updated path is stored in $new_path.
25106  new_path="$input_to_shortpath"
25107
25108  input_path="$input_to_shortpath"
25109  # Check if we need to convert this using DOS-style short mode. If the path
25110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25111  # take no chances and rewrite it.
25112  # Note: m4 eats our [], so we need to use [ and ] instead.
25113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25114  if test "x$has_forbidden_chars" != x; then
25115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25119      # Going to short mode and back again did indeed matter. Since short mode is
25120      # case insensitive, let's make it lowercase to improve readability.
25121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25122      # Now convert it back to Unix-stile (cygpath)
25123      input_path=`$CYGPATH -u "$shortmode_path"`
25124      new_path="$input_path"
25125    fi
25126  fi
25127
25128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25129  if test "x$test_cygdrive_prefix" = x; then
25130    # As a simple fix, exclude /usr/bin since it's not a real path.
25131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25133      # a path prefixed by /cygdrive for fixpath to work.
25134      new_path="$CYGWIN_ROOT_PATH$input_path"
25135    fi
25136  fi
25137
25138  # remove trailing .exe if any
25139  new_path="${new_path/%.exe/}"
25140
25141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25142
25143  # First separate the path from the arguments. This will split at the first
25144  # space.
25145  complete="$CXXCPP"
25146  path="${complete%% *}"
25147  tmp="$complete EOL"
25148  arguments="${tmp#* }"
25149
25150  # Input might be given as Windows format, start by converting to
25151  # unix format.
25152  new_path="$path"
25153
25154  windows_path="$new_path"
25155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25156    unix_path=`$CYGPATH -u "$windows_path"`
25157    new_path="$unix_path"
25158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25160    new_path="$unix_path"
25161  fi
25162
25163
25164  # Now try to locate executable using which
25165  new_path=`$WHICH "$new_path" 2> /dev/null`
25166
25167  if test "x$new_path" = x; then
25168    # Oops. Which didn't find the executable.
25169    # The splitting of arguments from the executable at a space might have been incorrect,
25170    # since paths with space are more likely in Windows. Give it another try with the whole
25171    # argument.
25172    path="$complete"
25173    arguments="EOL"
25174    new_path="$path"
25175
25176  windows_path="$new_path"
25177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25178    unix_path=`$CYGPATH -u "$windows_path"`
25179    new_path="$unix_path"
25180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25182    new_path="$unix_path"
25183  fi
25184
25185
25186    new_path=`$WHICH "$new_path" 2> /dev/null`
25187
25188    if test "x$new_path" = x; then
25189      # It's still not found. Now this is an unrecoverable error.
25190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25191$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25192      has_space=`$ECHO "$complete" | $GREP " "`
25193      if test "x$has_space" != x; then
25194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25196      fi
25197      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25198    fi
25199  fi
25200
25201  # Now new_path has a complete unix path to the binary
25202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25203    # Keep paths in /bin as-is, but remove trailing .exe if any
25204    new_path="${new_path/%.exe/}"
25205    # Do not save /bin paths to all_fixpath_prefixes!
25206  else
25207    # Not in mixed or Windows style, start by that.
25208    new_path=`cmd //c echo $new_path`
25209
25210  input_path="$new_path"
25211  # Check if we need to convert this using DOS-style short mode. If the path
25212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25213  # take no chances and rewrite it.
25214  # Note: m4 eats our [], so we need to use [ and ] instead.
25215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25216  if test "x$has_forbidden_chars" != x; then
25217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25219  fi
25220
25221    # Output is in $new_path
25222
25223  windows_path="$new_path"
25224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25225    unix_path=`$CYGPATH -u "$windows_path"`
25226    new_path="$unix_path"
25227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25229    new_path="$unix_path"
25230  fi
25231
25232    # remove trailing .exe if any
25233    new_path="${new_path/%.exe/}"
25234
25235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25237  fi
25238
25239  else
25240    # We're on a posix platform. Hooray! :)
25241    # First separate the path from the arguments. This will split at the first
25242    # space.
25243    complete="$CXXCPP"
25244    path="${complete%% *}"
25245    tmp="$complete EOL"
25246    arguments="${tmp#* }"
25247
25248    # Cannot rely on the command "which" here since it doesn't always work.
25249    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25250    if test -z "$is_absolute_path"; then
25251      # Path to executable is not absolute. Find it.
25252      IFS_save="$IFS"
25253      IFS=:
25254      for p in $PATH; do
25255        if test -f "$p/$path" && test -x "$p/$path"; then
25256          new_path="$p/$path"
25257          break
25258        fi
25259      done
25260      IFS="$IFS_save"
25261    else
25262      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25263$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25264      new_path="$path"
25265    fi
25266
25267    if test "x$new_path" = x; then
25268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25269$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25270        has_space=`$ECHO "$complete" | $GREP " "`
25271        if test "x$has_space" != x; then
25272          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25273$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25274        fi
25275        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25276      fi
25277  fi
25278
25279      # Now join together the path and the arguments once again
25280      if test "x$arguments" != xEOL; then
25281        new_complete="$new_path ${arguments% *}"
25282      else
25283        new_complete="$new_path"
25284      fi
25285
25286  if test "x$complete" != "x$new_complete"; then
25287      CXXCPP="$new_complete"
25288      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25289$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25290    fi
25291
25292
25293if test "x$COMPILE_TYPE" != "xcross"; then
25294    # If we are not cross compiling, use the same compilers for
25295    # building the build platform executables. The cross-compilation
25296    # case needed to be done earlier, but this can only be done after
25297    # the native tools have been localized.
25298    BUILD_CC="$CC"
25299    BUILD_CXX="$CXX"
25300    BUILD_LD="$LD"
25301fi
25302
25303# for solaris we really need solaris tools, and not gnu equivalent
25304#   these seems to normally reside in /usr/ccs/bin so add that to path before
25305#   starting to probe
25306#
25307#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25308#         so that it can be overriden --with-tools-dir
25309if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25310    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25311fi
25312
25313# Find the right assembler.
25314if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25315    # Extract the first word of "as", so it can be a program name with args.
25316set dummy as; ac_word=$2
25317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25318$as_echo_n "checking for $ac_word... " >&6; }
25319if test "${ac_cv_path_AS+set}" = set; then :
25320  $as_echo_n "(cached) " >&6
25321else
25322  case $AS in
25323  [\\/]* | ?:[\\/]*)
25324  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25325  ;;
25326  *)
25327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25328for as_dir in $PATH
25329do
25330  IFS=$as_save_IFS
25331  test -z "$as_dir" && as_dir=.
25332    for ac_exec_ext in '' $ac_executable_extensions; do
25333  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25334    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25336    break 2
25337  fi
25338done
25339  done
25340IFS=$as_save_IFS
25341
25342  ;;
25343esac
25344fi
25345AS=$ac_cv_path_AS
25346if test -n "$AS"; then
25347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25348$as_echo "$AS" >&6; }
25349else
25350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25351$as_echo "no" >&6; }
25352fi
25353
25354
25355
25356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25357
25358  # First separate the path from the arguments. This will split at the first
25359  # space.
25360  complete="$AS"
25361  path="${complete%% *}"
25362  tmp="$complete EOL"
25363  arguments="${tmp#* }"
25364
25365  # Input might be given as Windows format, start by converting to
25366  # unix format.
25367  new_path=`$CYGPATH -u "$path"`
25368
25369  # Now try to locate executable using which
25370  new_path=`$WHICH "$new_path" 2> /dev/null`
25371  # bat and cmd files are not always considered executable in cygwin causing which
25372  # to not find them
25373  if test "x$new_path" = x \
25374           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25375           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25376    new_path=`$CYGPATH -u "$path"`
25377  fi
25378  if test "x$new_path" = x; then
25379    # Oops. Which didn't find the executable.
25380    # The splitting of arguments from the executable at a space might have been incorrect,
25381    # since paths with space are more likely in Windows. Give it another try with the whole
25382    # argument.
25383    path="$complete"
25384    arguments="EOL"
25385    new_path=`$CYGPATH -u "$path"`
25386    new_path=`$WHICH "$new_path" 2> /dev/null`
25387    # bat and cmd files are not always considered executable in cygwin causing which
25388    # to not find them
25389    if test "x$new_path" = x \
25390             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25391             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25392      new_path=`$CYGPATH -u "$path"`
25393    fi
25394    if test "x$new_path" = x; then
25395      # It's still not found. Now this is an unrecoverable error.
25396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25397$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25398      has_space=`$ECHO "$complete" | $GREP " "`
25399      if test "x$has_space" != x; then
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25402      fi
25403      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25404    fi
25405  fi
25406
25407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25410  # "foo.exe" is OK but "foo" is an error.
25411  #
25412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25413  # It is also a way to make sure we got the proper file name for the real test later on.
25414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25415  if test "x$test_shortpath" = x; then
25416    # Short path failed, file does not exist as specified.
25417    # Try adding .exe or .cmd
25418    if test -f "${new_path}.exe"; then
25419       input_to_shortpath="${new_path}.exe"
25420    elif test -f "${new_path}.cmd"; then
25421       input_to_shortpath="${new_path}.cmd"
25422    else
25423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25424$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25425      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25426$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25427      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25428    fi
25429  else
25430    input_to_shortpath="$new_path"
25431  fi
25432
25433  # Call helper function which possibly converts this using DOS-style short mode.
25434  # If so, the updated path is stored in $new_path.
25435  new_path="$input_to_shortpath"
25436
25437  input_path="$input_to_shortpath"
25438  # Check if we need to convert this using DOS-style short mode. If the path
25439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25440  # take no chances and rewrite it.
25441  # Note: m4 eats our [], so we need to use [ and ] instead.
25442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25443  if test "x$has_forbidden_chars" != x; then
25444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25448      # Going to short mode and back again did indeed matter. Since short mode is
25449      # case insensitive, let's make it lowercase to improve readability.
25450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25451      # Now convert it back to Unix-stile (cygpath)
25452      input_path=`$CYGPATH -u "$shortmode_path"`
25453      new_path="$input_path"
25454    fi
25455  fi
25456
25457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25458  if test "x$test_cygdrive_prefix" = x; then
25459    # As a simple fix, exclude /usr/bin since it's not a real path.
25460    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25462      # a path prefixed by /cygdrive for fixpath to work.
25463      new_path="$CYGWIN_ROOT_PATH$input_path"
25464    fi
25465  fi
25466
25467  # remove trailing .exe if any
25468  new_path="${new_path/%.exe/}"
25469
25470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25471
25472  # First separate the path from the arguments. This will split at the first
25473  # space.
25474  complete="$AS"
25475  path="${complete%% *}"
25476  tmp="$complete EOL"
25477  arguments="${tmp#* }"
25478
25479  # Input might be given as Windows format, start by converting to
25480  # unix format.
25481  new_path="$path"
25482
25483  windows_path="$new_path"
25484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25485    unix_path=`$CYGPATH -u "$windows_path"`
25486    new_path="$unix_path"
25487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25489    new_path="$unix_path"
25490  fi
25491
25492
25493  # Now try to locate executable using which
25494  new_path=`$WHICH "$new_path" 2> /dev/null`
25495
25496  if test "x$new_path" = x; then
25497    # Oops. Which didn't find the executable.
25498    # The splitting of arguments from the executable at a space might have been incorrect,
25499    # since paths with space are more likely in Windows. Give it another try with the whole
25500    # argument.
25501    path="$complete"
25502    arguments="EOL"
25503    new_path="$path"
25504
25505  windows_path="$new_path"
25506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25507    unix_path=`$CYGPATH -u "$windows_path"`
25508    new_path="$unix_path"
25509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25511    new_path="$unix_path"
25512  fi
25513
25514
25515    new_path=`$WHICH "$new_path" 2> /dev/null`
25516
25517    if test "x$new_path" = x; then
25518      # It's still not found. Now this is an unrecoverable error.
25519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25520$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25521      has_space=`$ECHO "$complete" | $GREP " "`
25522      if test "x$has_space" != x; then
25523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25525      fi
25526      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25527    fi
25528  fi
25529
25530  # Now new_path has a complete unix path to the binary
25531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25532    # Keep paths in /bin as-is, but remove trailing .exe if any
25533    new_path="${new_path/%.exe/}"
25534    # Do not save /bin paths to all_fixpath_prefixes!
25535  else
25536    # Not in mixed or Windows style, start by that.
25537    new_path=`cmd //c echo $new_path`
25538
25539  input_path="$new_path"
25540  # Check if we need to convert this using DOS-style short mode. If the path
25541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25542  # take no chances and rewrite it.
25543  # Note: m4 eats our [], so we need to use [ and ] instead.
25544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25545  if test "x$has_forbidden_chars" != x; then
25546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25548  fi
25549
25550    # Output is in $new_path
25551
25552  windows_path="$new_path"
25553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25554    unix_path=`$CYGPATH -u "$windows_path"`
25555    new_path="$unix_path"
25556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25558    new_path="$unix_path"
25559  fi
25560
25561    # remove trailing .exe if any
25562    new_path="${new_path/%.exe/}"
25563
25564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25566  fi
25567
25568  else
25569    # We're on a posix platform. Hooray! :)
25570    # First separate the path from the arguments. This will split at the first
25571    # space.
25572    complete="$AS"
25573    path="${complete%% *}"
25574    tmp="$complete EOL"
25575    arguments="${tmp#* }"
25576
25577    # Cannot rely on the command "which" here since it doesn't always work.
25578    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25579    if test -z "$is_absolute_path"; then
25580      # Path to executable is not absolute. Find it.
25581      IFS_save="$IFS"
25582      IFS=:
25583      for p in $PATH; do
25584        if test -f "$p/$path" && test -x "$p/$path"; then
25585          new_path="$p/$path"
25586          break
25587        fi
25588      done
25589      IFS="$IFS_save"
25590    else
25591      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25592$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25593      new_path="$path"
25594    fi
25595
25596    if test "x$new_path" = x; then
25597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25598$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25599        has_space=`$ECHO "$complete" | $GREP " "`
25600        if test "x$has_space" != x; then
25601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25603        fi
25604        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25605      fi
25606  fi
25607
25608      # Now join together the path and the arguments once again
25609      if test "x$arguments" != xEOL; then
25610        new_complete="$new_path ${arguments% *}"
25611      else
25612        new_complete="$new_path"
25613      fi
25614
25615  if test "x$complete" != "x$new_complete"; then
25616      AS="$new_complete"
25617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25618$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25619    fi
25620
25621else
25622    AS="$CC -c"
25623fi
25624
25625
25626if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25627    # Extract the first word of "nm", so it can be a program name with args.
25628set dummy nm; ac_word=$2
25629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25630$as_echo_n "checking for $ac_word... " >&6; }
25631if test "${ac_cv_path_NM+set}" = set; then :
25632  $as_echo_n "(cached) " >&6
25633else
25634  case $NM in
25635  [\\/]* | ?:[\\/]*)
25636  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25637  ;;
25638  *)
25639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25640for as_dir in $PATH
25641do
25642  IFS=$as_save_IFS
25643  test -z "$as_dir" && as_dir=.
25644    for ac_exec_ext in '' $ac_executable_extensions; do
25645  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25646    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25648    break 2
25649  fi
25650done
25651  done
25652IFS=$as_save_IFS
25653
25654  ;;
25655esac
25656fi
25657NM=$ac_cv_path_NM
25658if test -n "$NM"; then
25659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25660$as_echo "$NM" >&6; }
25661else
25662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25663$as_echo "no" >&6; }
25664fi
25665
25666
25667
25668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25669
25670  # First separate the path from the arguments. This will split at the first
25671  # space.
25672  complete="$NM"
25673  path="${complete%% *}"
25674  tmp="$complete EOL"
25675  arguments="${tmp#* }"
25676
25677  # Input might be given as Windows format, start by converting to
25678  # unix format.
25679  new_path=`$CYGPATH -u "$path"`
25680
25681  # Now try to locate executable using which
25682  new_path=`$WHICH "$new_path" 2> /dev/null`
25683  # bat and cmd files are not always considered executable in cygwin causing which
25684  # to not find them
25685  if test "x$new_path" = x \
25686           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25687           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25688    new_path=`$CYGPATH -u "$path"`
25689  fi
25690  if test "x$new_path" = x; then
25691    # Oops. Which didn't find the executable.
25692    # The splitting of arguments from the executable at a space might have been incorrect,
25693    # since paths with space are more likely in Windows. Give it another try with the whole
25694    # argument.
25695    path="$complete"
25696    arguments="EOL"
25697    new_path=`$CYGPATH -u "$path"`
25698    new_path=`$WHICH "$new_path" 2> /dev/null`
25699    # bat and cmd files are not always considered executable in cygwin causing which
25700    # to not find them
25701    if test "x$new_path" = x \
25702             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25703             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25704      new_path=`$CYGPATH -u "$path"`
25705    fi
25706    if test "x$new_path" = x; then
25707      # It's still not found. Now this is an unrecoverable error.
25708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25709$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25710      has_space=`$ECHO "$complete" | $GREP " "`
25711      if test "x$has_space" != x; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25714      fi
25715      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25716    fi
25717  fi
25718
25719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25722  # "foo.exe" is OK but "foo" is an error.
25723  #
25724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25725  # It is also a way to make sure we got the proper file name for the real test later on.
25726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25727  if test "x$test_shortpath" = x; then
25728    # Short path failed, file does not exist as specified.
25729    # Try adding .exe or .cmd
25730    if test -f "${new_path}.exe"; then
25731       input_to_shortpath="${new_path}.exe"
25732    elif test -f "${new_path}.cmd"; then
25733       input_to_shortpath="${new_path}.cmd"
25734    else
25735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25736$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25739      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25740    fi
25741  else
25742    input_to_shortpath="$new_path"
25743  fi
25744
25745  # Call helper function which possibly converts this using DOS-style short mode.
25746  # If so, the updated path is stored in $new_path.
25747  new_path="$input_to_shortpath"
25748
25749  input_path="$input_to_shortpath"
25750  # Check if we need to convert this using DOS-style short mode. If the path
25751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25752  # take no chances and rewrite it.
25753  # Note: m4 eats our [], so we need to use [ and ] instead.
25754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25755  if test "x$has_forbidden_chars" != x; then
25756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25760      # Going to short mode and back again did indeed matter. Since short mode is
25761      # case insensitive, let's make it lowercase to improve readability.
25762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25763      # Now convert it back to Unix-stile (cygpath)
25764      input_path=`$CYGPATH -u "$shortmode_path"`
25765      new_path="$input_path"
25766    fi
25767  fi
25768
25769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25770  if test "x$test_cygdrive_prefix" = x; then
25771    # As a simple fix, exclude /usr/bin since it's not a real path.
25772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25774      # a path prefixed by /cygdrive for fixpath to work.
25775      new_path="$CYGWIN_ROOT_PATH$input_path"
25776    fi
25777  fi
25778
25779  # remove trailing .exe if any
25780  new_path="${new_path/%.exe/}"
25781
25782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25783
25784  # First separate the path from the arguments. This will split at the first
25785  # space.
25786  complete="$NM"
25787  path="${complete%% *}"
25788  tmp="$complete EOL"
25789  arguments="${tmp#* }"
25790
25791  # Input might be given as Windows format, start by converting to
25792  # unix format.
25793  new_path="$path"
25794
25795  windows_path="$new_path"
25796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25797    unix_path=`$CYGPATH -u "$windows_path"`
25798    new_path="$unix_path"
25799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25801    new_path="$unix_path"
25802  fi
25803
25804
25805  # Now try to locate executable using which
25806  new_path=`$WHICH "$new_path" 2> /dev/null`
25807
25808  if test "x$new_path" = x; then
25809    # Oops. Which didn't find the executable.
25810    # The splitting of arguments from the executable at a space might have been incorrect,
25811    # since paths with space are more likely in Windows. Give it another try with the whole
25812    # argument.
25813    path="$complete"
25814    arguments="EOL"
25815    new_path="$path"
25816
25817  windows_path="$new_path"
25818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25819    unix_path=`$CYGPATH -u "$windows_path"`
25820    new_path="$unix_path"
25821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25823    new_path="$unix_path"
25824  fi
25825
25826
25827    new_path=`$WHICH "$new_path" 2> /dev/null`
25828
25829    if test "x$new_path" = x; then
25830      # It's still not found. Now this is an unrecoverable error.
25831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25832$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25833      has_space=`$ECHO "$complete" | $GREP " "`
25834      if test "x$has_space" != x; then
25835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25837      fi
25838      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25839    fi
25840  fi
25841
25842  # Now new_path has a complete unix path to the binary
25843  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25844    # Keep paths in /bin as-is, but remove trailing .exe if any
25845    new_path="${new_path/%.exe/}"
25846    # Do not save /bin paths to all_fixpath_prefixes!
25847  else
25848    # Not in mixed or Windows style, start by that.
25849    new_path=`cmd //c echo $new_path`
25850
25851  input_path="$new_path"
25852  # Check if we need to convert this using DOS-style short mode. If the path
25853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25854  # take no chances and rewrite it.
25855  # Note: m4 eats our [], so we need to use [ and ] instead.
25856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25857  if test "x$has_forbidden_chars" != x; then
25858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25860  fi
25861
25862    # Output is in $new_path
25863
25864  windows_path="$new_path"
25865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25866    unix_path=`$CYGPATH -u "$windows_path"`
25867    new_path="$unix_path"
25868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25870    new_path="$unix_path"
25871  fi
25872
25873    # remove trailing .exe if any
25874    new_path="${new_path/%.exe/}"
25875
25876    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25877    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25878  fi
25879
25880  else
25881    # We're on a posix platform. Hooray! :)
25882    # First separate the path from the arguments. This will split at the first
25883    # space.
25884    complete="$NM"
25885    path="${complete%% *}"
25886    tmp="$complete EOL"
25887    arguments="${tmp#* }"
25888
25889    # Cannot rely on the command "which" here since it doesn't always work.
25890    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25891    if test -z "$is_absolute_path"; then
25892      # Path to executable is not absolute. Find it.
25893      IFS_save="$IFS"
25894      IFS=:
25895      for p in $PATH; do
25896        if test -f "$p/$path" && test -x "$p/$path"; then
25897          new_path="$p/$path"
25898          break
25899        fi
25900      done
25901      IFS="$IFS_save"
25902    else
25903      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25904$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25905      new_path="$path"
25906    fi
25907
25908    if test "x$new_path" = x; then
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25910$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25911        has_space=`$ECHO "$complete" | $GREP " "`
25912        if test "x$has_space" != x; then
25913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25915        fi
25916        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25917      fi
25918  fi
25919
25920      # Now join together the path and the arguments once again
25921      if test "x$arguments" != xEOL; then
25922        new_complete="$new_path ${arguments% *}"
25923      else
25924        new_complete="$new_path"
25925      fi
25926
25927  if test "x$complete" != "x$new_complete"; then
25928      NM="$new_complete"
25929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25930$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25931    fi
25932
25933    # Extract the first word of "gnm", so it can be a program name with args.
25934set dummy gnm; ac_word=$2
25935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25936$as_echo_n "checking for $ac_word... " >&6; }
25937if test "${ac_cv_path_GNM+set}" = set; then :
25938  $as_echo_n "(cached) " >&6
25939else
25940  case $GNM in
25941  [\\/]* | ?:[\\/]*)
25942  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25943  ;;
25944  *)
25945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25946for as_dir in $PATH
25947do
25948  IFS=$as_save_IFS
25949  test -z "$as_dir" && as_dir=.
25950    for ac_exec_ext in '' $ac_executable_extensions; do
25951  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25952    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25954    break 2
25955  fi
25956done
25957  done
25958IFS=$as_save_IFS
25959
25960  ;;
25961esac
25962fi
25963GNM=$ac_cv_path_GNM
25964if test -n "$GNM"; then
25965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25966$as_echo "$GNM" >&6; }
25967else
25968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25969$as_echo "no" >&6; }
25970fi
25971
25972
25973
25974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25975
25976  # First separate the path from the arguments. This will split at the first
25977  # space.
25978  complete="$GNM"
25979  path="${complete%% *}"
25980  tmp="$complete EOL"
25981  arguments="${tmp#* }"
25982
25983  # Input might be given as Windows format, start by converting to
25984  # unix format.
25985  new_path=`$CYGPATH -u "$path"`
25986
25987  # Now try to locate executable using which
25988  new_path=`$WHICH "$new_path" 2> /dev/null`
25989  # bat and cmd files are not always considered executable in cygwin causing which
25990  # to not find them
25991  if test "x$new_path" = x \
25992           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25993           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25994    new_path=`$CYGPATH -u "$path"`
25995  fi
25996  if test "x$new_path" = x; then
25997    # Oops. Which didn't find the executable.
25998    # The splitting of arguments from the executable at a space might have been incorrect,
25999    # since paths with space are more likely in Windows. Give it another try with the whole
26000    # argument.
26001    path="$complete"
26002    arguments="EOL"
26003    new_path=`$CYGPATH -u "$path"`
26004    new_path=`$WHICH "$new_path" 2> /dev/null`
26005    # bat and cmd files are not always considered executable in cygwin causing which
26006    # to not find them
26007    if test "x$new_path" = x \
26008             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26009             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26010      new_path=`$CYGPATH -u "$path"`
26011    fi
26012    if test "x$new_path" = x; then
26013      # It's still not found. Now this is an unrecoverable error.
26014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26015$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26016      has_space=`$ECHO "$complete" | $GREP " "`
26017      if test "x$has_space" != x; then
26018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26020      fi
26021      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26022    fi
26023  fi
26024
26025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26028  # "foo.exe" is OK but "foo" is an error.
26029  #
26030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26031  # It is also a way to make sure we got the proper file name for the real test later on.
26032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26033  if test "x$test_shortpath" = x; then
26034    # Short path failed, file does not exist as specified.
26035    # Try adding .exe or .cmd
26036    if test -f "${new_path}.exe"; then
26037       input_to_shortpath="${new_path}.exe"
26038    elif test -f "${new_path}.cmd"; then
26039       input_to_shortpath="${new_path}.cmd"
26040    else
26041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26042$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26045      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26046    fi
26047  else
26048    input_to_shortpath="$new_path"
26049  fi
26050
26051  # Call helper function which possibly converts this using DOS-style short mode.
26052  # If so, the updated path is stored in $new_path.
26053  new_path="$input_to_shortpath"
26054
26055  input_path="$input_to_shortpath"
26056  # Check if we need to convert this using DOS-style short mode. If the path
26057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26058  # take no chances and rewrite it.
26059  # Note: m4 eats our [], so we need to use [ and ] instead.
26060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26061  if test "x$has_forbidden_chars" != x; then
26062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26066      # Going to short mode and back again did indeed matter. Since short mode is
26067      # case insensitive, let's make it lowercase to improve readability.
26068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26069      # Now convert it back to Unix-stile (cygpath)
26070      input_path=`$CYGPATH -u "$shortmode_path"`
26071      new_path="$input_path"
26072    fi
26073  fi
26074
26075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26076  if test "x$test_cygdrive_prefix" = x; then
26077    # As a simple fix, exclude /usr/bin since it's not a real path.
26078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26080      # a path prefixed by /cygdrive for fixpath to work.
26081      new_path="$CYGWIN_ROOT_PATH$input_path"
26082    fi
26083  fi
26084
26085  # remove trailing .exe if any
26086  new_path="${new_path/%.exe/}"
26087
26088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26089
26090  # First separate the path from the arguments. This will split at the first
26091  # space.
26092  complete="$GNM"
26093  path="${complete%% *}"
26094  tmp="$complete EOL"
26095  arguments="${tmp#* }"
26096
26097  # Input might be given as Windows format, start by converting to
26098  # unix format.
26099  new_path="$path"
26100
26101  windows_path="$new_path"
26102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103    unix_path=`$CYGPATH -u "$windows_path"`
26104    new_path="$unix_path"
26105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26107    new_path="$unix_path"
26108  fi
26109
26110
26111  # Now try to locate executable using which
26112  new_path=`$WHICH "$new_path" 2> /dev/null`
26113
26114  if test "x$new_path" = x; then
26115    # Oops. Which didn't find the executable.
26116    # The splitting of arguments from the executable at a space might have been incorrect,
26117    # since paths with space are more likely in Windows. Give it another try with the whole
26118    # argument.
26119    path="$complete"
26120    arguments="EOL"
26121    new_path="$path"
26122
26123  windows_path="$new_path"
26124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26125    unix_path=`$CYGPATH -u "$windows_path"`
26126    new_path="$unix_path"
26127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26129    new_path="$unix_path"
26130  fi
26131
26132
26133    new_path=`$WHICH "$new_path" 2> /dev/null`
26134
26135    if test "x$new_path" = x; then
26136      # It's still not found. Now this is an unrecoverable error.
26137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26138$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26139      has_space=`$ECHO "$complete" | $GREP " "`
26140      if test "x$has_space" != x; then
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26143      fi
26144      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26145    fi
26146  fi
26147
26148  # Now new_path has a complete unix path to the binary
26149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26150    # Keep paths in /bin as-is, but remove trailing .exe if any
26151    new_path="${new_path/%.exe/}"
26152    # Do not save /bin paths to all_fixpath_prefixes!
26153  else
26154    # Not in mixed or Windows style, start by that.
26155    new_path=`cmd //c echo $new_path`
26156
26157  input_path="$new_path"
26158  # Check if we need to convert this using DOS-style short mode. If the path
26159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26160  # take no chances and rewrite it.
26161  # Note: m4 eats our [], so we need to use [ and ] instead.
26162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26163  if test "x$has_forbidden_chars" != x; then
26164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26166  fi
26167
26168    # Output is in $new_path
26169
26170  windows_path="$new_path"
26171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26172    unix_path=`$CYGPATH -u "$windows_path"`
26173    new_path="$unix_path"
26174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26176    new_path="$unix_path"
26177  fi
26178
26179    # remove trailing .exe if any
26180    new_path="${new_path/%.exe/}"
26181
26182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26184  fi
26185
26186  else
26187    # We're on a posix platform. Hooray! :)
26188    # First separate the path from the arguments. This will split at the first
26189    # space.
26190    complete="$GNM"
26191    path="${complete%% *}"
26192    tmp="$complete EOL"
26193    arguments="${tmp#* }"
26194
26195    # Cannot rely on the command "which" here since it doesn't always work.
26196    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26197    if test -z "$is_absolute_path"; then
26198      # Path to executable is not absolute. Find it.
26199      IFS_save="$IFS"
26200      IFS=:
26201      for p in $PATH; do
26202        if test -f "$p/$path" && test -x "$p/$path"; then
26203          new_path="$p/$path"
26204          break
26205        fi
26206      done
26207      IFS="$IFS_save"
26208    else
26209      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26210$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26211      new_path="$path"
26212    fi
26213
26214    if test "x$new_path" = x; then
26215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26216$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26217        has_space=`$ECHO "$complete" | $GREP " "`
26218        if test "x$has_space" != x; then
26219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26221        fi
26222        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26223      fi
26224  fi
26225
26226      # Now join together the path and the arguments once again
26227      if test "x$arguments" != xEOL; then
26228        new_complete="$new_path ${arguments% *}"
26229      else
26230        new_complete="$new_path"
26231      fi
26232
26233  if test "x$complete" != "x$new_complete"; then
26234      GNM="$new_complete"
26235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26236$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26237    fi
26238
26239    # Extract the first word of "strip", so it can be a program name with args.
26240set dummy strip; ac_word=$2
26241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26242$as_echo_n "checking for $ac_word... " >&6; }
26243if test "${ac_cv_path_STRIP+set}" = set; then :
26244  $as_echo_n "(cached) " >&6
26245else
26246  case $STRIP in
26247  [\\/]* | ?:[\\/]*)
26248  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26249  ;;
26250  *)
26251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26252for as_dir in $PATH
26253do
26254  IFS=$as_save_IFS
26255  test -z "$as_dir" && as_dir=.
26256    for ac_exec_ext in '' $ac_executable_extensions; do
26257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26258    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26260    break 2
26261  fi
26262done
26263  done
26264IFS=$as_save_IFS
26265
26266  ;;
26267esac
26268fi
26269STRIP=$ac_cv_path_STRIP
26270if test -n "$STRIP"; then
26271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26272$as_echo "$STRIP" >&6; }
26273else
26274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26275$as_echo "no" >&6; }
26276fi
26277
26278
26279
26280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26281
26282  # First separate the path from the arguments. This will split at the first
26283  # space.
26284  complete="$STRIP"
26285  path="${complete%% *}"
26286  tmp="$complete EOL"
26287  arguments="${tmp#* }"
26288
26289  # Input might be given as Windows format, start by converting to
26290  # unix format.
26291  new_path=`$CYGPATH -u "$path"`
26292
26293  # Now try to locate executable using which
26294  new_path=`$WHICH "$new_path" 2> /dev/null`
26295  # bat and cmd files are not always considered executable in cygwin causing which
26296  # to not find them
26297  if test "x$new_path" = x \
26298           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26299           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26300    new_path=`$CYGPATH -u "$path"`
26301  fi
26302  if test "x$new_path" = x; then
26303    # Oops. Which didn't find the executable.
26304    # The splitting of arguments from the executable at a space might have been incorrect,
26305    # since paths with space are more likely in Windows. Give it another try with the whole
26306    # argument.
26307    path="$complete"
26308    arguments="EOL"
26309    new_path=`$CYGPATH -u "$path"`
26310    new_path=`$WHICH "$new_path" 2> /dev/null`
26311    # bat and cmd files are not always considered executable in cygwin causing which
26312    # to not find them
26313    if test "x$new_path" = x \
26314             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26315             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26316      new_path=`$CYGPATH -u "$path"`
26317    fi
26318    if test "x$new_path" = x; then
26319      # It's still not found. Now this is an unrecoverable error.
26320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26321$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26322      has_space=`$ECHO "$complete" | $GREP " "`
26323      if test "x$has_space" != x; then
26324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26326      fi
26327      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26328    fi
26329  fi
26330
26331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26334  # "foo.exe" is OK but "foo" is an error.
26335  #
26336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26337  # It is also a way to make sure we got the proper file name for the real test later on.
26338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26339  if test "x$test_shortpath" = x; then
26340    # Short path failed, file does not exist as specified.
26341    # Try adding .exe or .cmd
26342    if test -f "${new_path}.exe"; then
26343       input_to_shortpath="${new_path}.exe"
26344    elif test -f "${new_path}.cmd"; then
26345       input_to_shortpath="${new_path}.cmd"
26346    else
26347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26348$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26351      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26352    fi
26353  else
26354    input_to_shortpath="$new_path"
26355  fi
26356
26357  # Call helper function which possibly converts this using DOS-style short mode.
26358  # If so, the updated path is stored in $new_path.
26359  new_path="$input_to_shortpath"
26360
26361  input_path="$input_to_shortpath"
26362  # Check if we need to convert this using DOS-style short mode. If the path
26363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26364  # take no chances and rewrite it.
26365  # Note: m4 eats our [], so we need to use [ and ] instead.
26366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26367  if test "x$has_forbidden_chars" != x; then
26368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26372      # Going to short mode and back again did indeed matter. Since short mode is
26373      # case insensitive, let's make it lowercase to improve readability.
26374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26375      # Now convert it back to Unix-stile (cygpath)
26376      input_path=`$CYGPATH -u "$shortmode_path"`
26377      new_path="$input_path"
26378    fi
26379  fi
26380
26381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26382  if test "x$test_cygdrive_prefix" = x; then
26383    # As a simple fix, exclude /usr/bin since it's not a real path.
26384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26386      # a path prefixed by /cygdrive for fixpath to work.
26387      new_path="$CYGWIN_ROOT_PATH$input_path"
26388    fi
26389  fi
26390
26391  # remove trailing .exe if any
26392  new_path="${new_path/%.exe/}"
26393
26394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26395
26396  # First separate the path from the arguments. This will split at the first
26397  # space.
26398  complete="$STRIP"
26399  path="${complete%% *}"
26400  tmp="$complete EOL"
26401  arguments="${tmp#* }"
26402
26403  # Input might be given as Windows format, start by converting to
26404  # unix format.
26405  new_path="$path"
26406
26407  windows_path="$new_path"
26408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26409    unix_path=`$CYGPATH -u "$windows_path"`
26410    new_path="$unix_path"
26411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26413    new_path="$unix_path"
26414  fi
26415
26416
26417  # Now try to locate executable using which
26418  new_path=`$WHICH "$new_path" 2> /dev/null`
26419
26420  if test "x$new_path" = x; then
26421    # Oops. Which didn't find the executable.
26422    # The splitting of arguments from the executable at a space might have been incorrect,
26423    # since paths with space are more likely in Windows. Give it another try with the whole
26424    # argument.
26425    path="$complete"
26426    arguments="EOL"
26427    new_path="$path"
26428
26429  windows_path="$new_path"
26430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26431    unix_path=`$CYGPATH -u "$windows_path"`
26432    new_path="$unix_path"
26433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26435    new_path="$unix_path"
26436  fi
26437
26438
26439    new_path=`$WHICH "$new_path" 2> /dev/null`
26440
26441    if test "x$new_path" = x; then
26442      # It's still not found. Now this is an unrecoverable error.
26443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26444$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26445      has_space=`$ECHO "$complete" | $GREP " "`
26446      if test "x$has_space" != x; then
26447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26449      fi
26450      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26451    fi
26452  fi
26453
26454  # Now new_path has a complete unix path to the binary
26455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26456    # Keep paths in /bin as-is, but remove trailing .exe if any
26457    new_path="${new_path/%.exe/}"
26458    # Do not save /bin paths to all_fixpath_prefixes!
26459  else
26460    # Not in mixed or Windows style, start by that.
26461    new_path=`cmd //c echo $new_path`
26462
26463  input_path="$new_path"
26464  # Check if we need to convert this using DOS-style short mode. If the path
26465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26466  # take no chances and rewrite it.
26467  # Note: m4 eats our [], so we need to use [ and ] instead.
26468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26469  if test "x$has_forbidden_chars" != x; then
26470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26472  fi
26473
26474    # Output is in $new_path
26475
26476  windows_path="$new_path"
26477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26478    unix_path=`$CYGPATH -u "$windows_path"`
26479    new_path="$unix_path"
26480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26482    new_path="$unix_path"
26483  fi
26484
26485    # remove trailing .exe if any
26486    new_path="${new_path/%.exe/}"
26487
26488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26490  fi
26491
26492  else
26493    # We're on a posix platform. Hooray! :)
26494    # First separate the path from the arguments. This will split at the first
26495    # space.
26496    complete="$STRIP"
26497    path="${complete%% *}"
26498    tmp="$complete EOL"
26499    arguments="${tmp#* }"
26500
26501    # Cannot rely on the command "which" here since it doesn't always work.
26502    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26503    if test -z "$is_absolute_path"; then
26504      # Path to executable is not absolute. Find it.
26505      IFS_save="$IFS"
26506      IFS=:
26507      for p in $PATH; do
26508        if test -f "$p/$path" && test -x "$p/$path"; then
26509          new_path="$p/$path"
26510          break
26511        fi
26512      done
26513      IFS="$IFS_save"
26514    else
26515      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26516$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26517      new_path="$path"
26518    fi
26519
26520    if test "x$new_path" = x; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26522$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26523        has_space=`$ECHO "$complete" | $GREP " "`
26524        if test "x$has_space" != x; then
26525          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26527        fi
26528        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26529      fi
26530  fi
26531
26532      # Now join together the path and the arguments once again
26533      if test "x$arguments" != xEOL; then
26534        new_complete="$new_path ${arguments% *}"
26535      else
26536        new_complete="$new_path"
26537      fi
26538
26539  if test "x$complete" != "x$new_complete"; then
26540      STRIP="$new_complete"
26541      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26542$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26543    fi
26544
26545    # Extract the first word of "mcs", so it can be a program name with args.
26546set dummy mcs; ac_word=$2
26547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26548$as_echo_n "checking for $ac_word... " >&6; }
26549if test "${ac_cv_path_MCS+set}" = set; then :
26550  $as_echo_n "(cached) " >&6
26551else
26552  case $MCS in
26553  [\\/]* | ?:[\\/]*)
26554  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26555  ;;
26556  *)
26557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26558for as_dir in $PATH
26559do
26560  IFS=$as_save_IFS
26561  test -z "$as_dir" && as_dir=.
26562    for ac_exec_ext in '' $ac_executable_extensions; do
26563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26564    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26566    break 2
26567  fi
26568done
26569  done
26570IFS=$as_save_IFS
26571
26572  ;;
26573esac
26574fi
26575MCS=$ac_cv_path_MCS
26576if test -n "$MCS"; then
26577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26578$as_echo "$MCS" >&6; }
26579else
26580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26581$as_echo "no" >&6; }
26582fi
26583
26584
26585
26586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26587
26588  # First separate the path from the arguments. This will split at the first
26589  # space.
26590  complete="$MCS"
26591  path="${complete%% *}"
26592  tmp="$complete EOL"
26593  arguments="${tmp#* }"
26594
26595  # Input might be given as Windows format, start by converting to
26596  # unix format.
26597  new_path=`$CYGPATH -u "$path"`
26598
26599  # Now try to locate executable using which
26600  new_path=`$WHICH "$new_path" 2> /dev/null`
26601  # bat and cmd files are not always considered executable in cygwin causing which
26602  # to not find them
26603  if test "x$new_path" = x \
26604           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26605           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26606    new_path=`$CYGPATH -u "$path"`
26607  fi
26608  if test "x$new_path" = x; then
26609    # Oops. Which didn't find the executable.
26610    # The splitting of arguments from the executable at a space might have been incorrect,
26611    # since paths with space are more likely in Windows. Give it another try with the whole
26612    # argument.
26613    path="$complete"
26614    arguments="EOL"
26615    new_path=`$CYGPATH -u "$path"`
26616    new_path=`$WHICH "$new_path" 2> /dev/null`
26617    # bat and cmd files are not always considered executable in cygwin causing which
26618    # to not find them
26619    if test "x$new_path" = x \
26620             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26621             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26622      new_path=`$CYGPATH -u "$path"`
26623    fi
26624    if test "x$new_path" = x; then
26625      # It's still not found. Now this is an unrecoverable error.
26626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26627$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26628      has_space=`$ECHO "$complete" | $GREP " "`
26629      if test "x$has_space" != x; then
26630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26632      fi
26633      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26634    fi
26635  fi
26636
26637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26640  # "foo.exe" is OK but "foo" is an error.
26641  #
26642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26643  # It is also a way to make sure we got the proper file name for the real test later on.
26644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26645  if test "x$test_shortpath" = x; then
26646    # Short path failed, file does not exist as specified.
26647    # Try adding .exe or .cmd
26648    if test -f "${new_path}.exe"; then
26649       input_to_shortpath="${new_path}.exe"
26650    elif test -f "${new_path}.cmd"; then
26651       input_to_shortpath="${new_path}.cmd"
26652    else
26653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26654$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26655      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26656$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26657      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26658    fi
26659  else
26660    input_to_shortpath="$new_path"
26661  fi
26662
26663  # Call helper function which possibly converts this using DOS-style short mode.
26664  # If so, the updated path is stored in $new_path.
26665  new_path="$input_to_shortpath"
26666
26667  input_path="$input_to_shortpath"
26668  # Check if we need to convert this using DOS-style short mode. If the path
26669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26670  # take no chances and rewrite it.
26671  # Note: m4 eats our [], so we need to use [ and ] instead.
26672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26673  if test "x$has_forbidden_chars" != x; then
26674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26678      # Going to short mode and back again did indeed matter. Since short mode is
26679      # case insensitive, let's make it lowercase to improve readability.
26680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26681      # Now convert it back to Unix-stile (cygpath)
26682      input_path=`$CYGPATH -u "$shortmode_path"`
26683      new_path="$input_path"
26684    fi
26685  fi
26686
26687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26688  if test "x$test_cygdrive_prefix" = x; then
26689    # As a simple fix, exclude /usr/bin since it's not a real path.
26690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26692      # a path prefixed by /cygdrive for fixpath to work.
26693      new_path="$CYGWIN_ROOT_PATH$input_path"
26694    fi
26695  fi
26696
26697  # remove trailing .exe if any
26698  new_path="${new_path/%.exe/}"
26699
26700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26701
26702  # First separate the path from the arguments. This will split at the first
26703  # space.
26704  complete="$MCS"
26705  path="${complete%% *}"
26706  tmp="$complete EOL"
26707  arguments="${tmp#* }"
26708
26709  # Input might be given as Windows format, start by converting to
26710  # unix format.
26711  new_path="$path"
26712
26713  windows_path="$new_path"
26714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26715    unix_path=`$CYGPATH -u "$windows_path"`
26716    new_path="$unix_path"
26717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26719    new_path="$unix_path"
26720  fi
26721
26722
26723  # Now try to locate executable using which
26724  new_path=`$WHICH "$new_path" 2> /dev/null`
26725
26726  if test "x$new_path" = x; then
26727    # Oops. Which didn't find the executable.
26728    # The splitting of arguments from the executable at a space might have been incorrect,
26729    # since paths with space are more likely in Windows. Give it another try with the whole
26730    # argument.
26731    path="$complete"
26732    arguments="EOL"
26733    new_path="$path"
26734
26735  windows_path="$new_path"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    new_path="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    new_path="$unix_path"
26742  fi
26743
26744
26745    new_path=`$WHICH "$new_path" 2> /dev/null`
26746
26747    if test "x$new_path" = x; then
26748      # It's still not found. Now this is an unrecoverable error.
26749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26750$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26751      has_space=`$ECHO "$complete" | $GREP " "`
26752      if test "x$has_space" != x; then
26753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26755      fi
26756      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26757    fi
26758  fi
26759
26760  # Now new_path has a complete unix path to the binary
26761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26762    # Keep paths in /bin as-is, but remove trailing .exe if any
26763    new_path="${new_path/%.exe/}"
26764    # Do not save /bin paths to all_fixpath_prefixes!
26765  else
26766    # Not in mixed or Windows style, start by that.
26767    new_path=`cmd //c echo $new_path`
26768
26769  input_path="$new_path"
26770  # Check if we need to convert this using DOS-style short mode. If the path
26771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26772  # take no chances and rewrite it.
26773  # Note: m4 eats our [], so we need to use [ and ] instead.
26774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26775  if test "x$has_forbidden_chars" != x; then
26776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26778  fi
26779
26780    # Output is in $new_path
26781
26782  windows_path="$new_path"
26783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26784    unix_path=`$CYGPATH -u "$windows_path"`
26785    new_path="$unix_path"
26786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26788    new_path="$unix_path"
26789  fi
26790
26791    # remove trailing .exe if any
26792    new_path="${new_path/%.exe/}"
26793
26794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26796  fi
26797
26798  else
26799    # We're on a posix platform. Hooray! :)
26800    # First separate the path from the arguments. This will split at the first
26801    # space.
26802    complete="$MCS"
26803    path="${complete%% *}"
26804    tmp="$complete EOL"
26805    arguments="${tmp#* }"
26806
26807    # Cannot rely on the command "which" here since it doesn't always work.
26808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26809    if test -z "$is_absolute_path"; then
26810      # Path to executable is not absolute. Find it.
26811      IFS_save="$IFS"
26812      IFS=:
26813      for p in $PATH; do
26814        if test -f "$p/$path" && test -x "$p/$path"; then
26815          new_path="$p/$path"
26816          break
26817        fi
26818      done
26819      IFS="$IFS_save"
26820    else
26821      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26822$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26823      new_path="$path"
26824    fi
26825
26826    if test "x$new_path" = x; then
26827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26828$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26829        has_space=`$ECHO "$complete" | $GREP " "`
26830        if test "x$has_space" != x; then
26831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26833        fi
26834        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26835      fi
26836  fi
26837
26838      # Now join together the path and the arguments once again
26839      if test "x$arguments" != xEOL; then
26840        new_complete="$new_path ${arguments% *}"
26841      else
26842        new_complete="$new_path"
26843      fi
26844
26845  if test "x$complete" != "x$new_complete"; then
26846      MCS="$new_complete"
26847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26848$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26849    fi
26850
26851elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26852    if test -n "$ac_tool_prefix"; then
26853  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26854set dummy ${ac_tool_prefix}nm; ac_word=$2
26855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26856$as_echo_n "checking for $ac_word... " >&6; }
26857if test "${ac_cv_prog_NM+set}" = set; then :
26858  $as_echo_n "(cached) " >&6
26859else
26860  if test -n "$NM"; then
26861  ac_cv_prog_NM="$NM" # Let the user override the test.
26862else
26863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26864for as_dir in $PATH
26865do
26866  IFS=$as_save_IFS
26867  test -z "$as_dir" && as_dir=.
26868    for ac_exec_ext in '' $ac_executable_extensions; do
26869  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26870    ac_cv_prog_NM="${ac_tool_prefix}nm"
26871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26872    break 2
26873  fi
26874done
26875  done
26876IFS=$as_save_IFS
26877
26878fi
26879fi
26880NM=$ac_cv_prog_NM
26881if test -n "$NM"; then
26882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26883$as_echo "$NM" >&6; }
26884else
26885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26886$as_echo "no" >&6; }
26887fi
26888
26889
26890fi
26891if test -z "$ac_cv_prog_NM"; then
26892  ac_ct_NM=$NM
26893  # Extract the first word of "nm", so it can be a program name with args.
26894set dummy nm; ac_word=$2
26895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26896$as_echo_n "checking for $ac_word... " >&6; }
26897if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26898  $as_echo_n "(cached) " >&6
26899else
26900  if test -n "$ac_ct_NM"; then
26901  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26902else
26903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26904for as_dir in $PATH
26905do
26906  IFS=$as_save_IFS
26907  test -z "$as_dir" && as_dir=.
26908    for ac_exec_ext in '' $ac_executable_extensions; do
26909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26910    ac_cv_prog_ac_ct_NM="nm"
26911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26912    break 2
26913  fi
26914done
26915  done
26916IFS=$as_save_IFS
26917
26918fi
26919fi
26920ac_ct_NM=$ac_cv_prog_ac_ct_NM
26921if test -n "$ac_ct_NM"; then
26922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26923$as_echo "$ac_ct_NM" >&6; }
26924else
26925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26926$as_echo "no" >&6; }
26927fi
26928
26929  if test "x$ac_ct_NM" = x; then
26930    NM=""
26931  else
26932    case $cross_compiling:$ac_tool_warned in
26933yes:)
26934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26936ac_tool_warned=yes ;;
26937esac
26938    NM=$ac_ct_NM
26939  fi
26940else
26941  NM="$ac_cv_prog_NM"
26942fi
26943
26944
26945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946
26947  # First separate the path from the arguments. This will split at the first
26948  # space.
26949  complete="$NM"
26950  path="${complete%% *}"
26951  tmp="$complete EOL"
26952  arguments="${tmp#* }"
26953
26954  # Input might be given as Windows format, start by converting to
26955  # unix format.
26956  new_path=`$CYGPATH -u "$path"`
26957
26958  # Now try to locate executable using which
26959  new_path=`$WHICH "$new_path" 2> /dev/null`
26960  # bat and cmd files are not always considered executable in cygwin causing which
26961  # to not find them
26962  if test "x$new_path" = x \
26963           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26964           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26965    new_path=`$CYGPATH -u "$path"`
26966  fi
26967  if test "x$new_path" = x; then
26968    # Oops. Which didn't find the executable.
26969    # The splitting of arguments from the executable at a space might have been incorrect,
26970    # since paths with space are more likely in Windows. Give it another try with the whole
26971    # argument.
26972    path="$complete"
26973    arguments="EOL"
26974    new_path=`$CYGPATH -u "$path"`
26975    new_path=`$WHICH "$new_path" 2> /dev/null`
26976    # bat and cmd files are not always considered executable in cygwin causing which
26977    # to not find them
26978    if test "x$new_path" = x \
26979             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26980             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26981      new_path=`$CYGPATH -u "$path"`
26982    fi
26983    if test "x$new_path" = x; then
26984      # It's still not found. Now this is an unrecoverable error.
26985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26986$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26987      has_space=`$ECHO "$complete" | $GREP " "`
26988      if test "x$has_space" != x; then
26989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26991      fi
26992      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26993    fi
26994  fi
26995
26996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26999  # "foo.exe" is OK but "foo" is an error.
27000  #
27001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27002  # It is also a way to make sure we got the proper file name for the real test later on.
27003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27004  if test "x$test_shortpath" = x; then
27005    # Short path failed, file does not exist as specified.
27006    # Try adding .exe or .cmd
27007    if test -f "${new_path}.exe"; then
27008       input_to_shortpath="${new_path}.exe"
27009    elif test -f "${new_path}.cmd"; then
27010       input_to_shortpath="${new_path}.cmd"
27011    else
27012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27013$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27016      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27017    fi
27018  else
27019    input_to_shortpath="$new_path"
27020  fi
27021
27022  # Call helper function which possibly converts this using DOS-style short mode.
27023  # If so, the updated path is stored in $new_path.
27024  new_path="$input_to_shortpath"
27025
27026  input_path="$input_to_shortpath"
27027  # Check if we need to convert this using DOS-style short mode. If the path
27028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27029  # take no chances and rewrite it.
27030  # Note: m4 eats our [], so we need to use [ and ] instead.
27031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27032  if test "x$has_forbidden_chars" != x; then
27033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27037      # Going to short mode and back again did indeed matter. Since short mode is
27038      # case insensitive, let's make it lowercase to improve readability.
27039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27040      # Now convert it back to Unix-stile (cygpath)
27041      input_path=`$CYGPATH -u "$shortmode_path"`
27042      new_path="$input_path"
27043    fi
27044  fi
27045
27046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27047  if test "x$test_cygdrive_prefix" = x; then
27048    # As a simple fix, exclude /usr/bin since it's not a real path.
27049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27051      # a path prefixed by /cygdrive for fixpath to work.
27052      new_path="$CYGWIN_ROOT_PATH$input_path"
27053    fi
27054  fi
27055
27056  # remove trailing .exe if any
27057  new_path="${new_path/%.exe/}"
27058
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060
27061  # First separate the path from the arguments. This will split at the first
27062  # space.
27063  complete="$NM"
27064  path="${complete%% *}"
27065  tmp="$complete EOL"
27066  arguments="${tmp#* }"
27067
27068  # Input might be given as Windows format, start by converting to
27069  # unix format.
27070  new_path="$path"
27071
27072  windows_path="$new_path"
27073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27074    unix_path=`$CYGPATH -u "$windows_path"`
27075    new_path="$unix_path"
27076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27078    new_path="$unix_path"
27079  fi
27080
27081
27082  # Now try to locate executable using which
27083  new_path=`$WHICH "$new_path" 2> /dev/null`
27084
27085  if test "x$new_path" = x; then
27086    # Oops. Which didn't find the executable.
27087    # The splitting of arguments from the executable at a space might have been incorrect,
27088    # since paths with space are more likely in Windows. Give it another try with the whole
27089    # argument.
27090    path="$complete"
27091    arguments="EOL"
27092    new_path="$path"
27093
27094  windows_path="$new_path"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    new_path="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    new_path="$unix_path"
27101  fi
27102
27103
27104    new_path=`$WHICH "$new_path" 2> /dev/null`
27105
27106    if test "x$new_path" = x; then
27107      # It's still not found. Now this is an unrecoverable error.
27108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27109$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27110      has_space=`$ECHO "$complete" | $GREP " "`
27111      if test "x$has_space" != x; then
27112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27114      fi
27115      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27116    fi
27117  fi
27118
27119  # Now new_path has a complete unix path to the binary
27120  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27121    # Keep paths in /bin as-is, but remove trailing .exe if any
27122    new_path="${new_path/%.exe/}"
27123    # Do not save /bin paths to all_fixpath_prefixes!
27124  else
27125    # Not in mixed or Windows style, start by that.
27126    new_path=`cmd //c echo $new_path`
27127
27128  input_path="$new_path"
27129  # Check if we need to convert this using DOS-style short mode. If the path
27130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27131  # take no chances and rewrite it.
27132  # Note: m4 eats our [], so we need to use [ and ] instead.
27133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27134  if test "x$has_forbidden_chars" != x; then
27135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27137  fi
27138
27139    # Output is in $new_path
27140
27141  windows_path="$new_path"
27142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27143    unix_path=`$CYGPATH -u "$windows_path"`
27144    new_path="$unix_path"
27145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27147    new_path="$unix_path"
27148  fi
27149
27150    # remove trailing .exe if any
27151    new_path="${new_path/%.exe/}"
27152
27153    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27154    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27155  fi
27156
27157  else
27158    # We're on a posix platform. Hooray! :)
27159    # First separate the path from the arguments. This will split at the first
27160    # space.
27161    complete="$NM"
27162    path="${complete%% *}"
27163    tmp="$complete EOL"
27164    arguments="${tmp#* }"
27165
27166    # Cannot rely on the command "which" here since it doesn't always work.
27167    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27168    if test -z "$is_absolute_path"; then
27169      # Path to executable is not absolute. Find it.
27170      IFS_save="$IFS"
27171      IFS=:
27172      for p in $PATH; do
27173        if test -f "$p/$path" && test -x "$p/$path"; then
27174          new_path="$p/$path"
27175          break
27176        fi
27177      done
27178      IFS="$IFS_save"
27179    else
27180      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27181$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27182      new_path="$path"
27183    fi
27184
27185    if test "x$new_path" = x; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27187$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27188        has_space=`$ECHO "$complete" | $GREP " "`
27189        if test "x$has_space" != x; then
27190          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27191$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27192        fi
27193        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27194      fi
27195  fi
27196
27197      # Now join together the path and the arguments once again
27198      if test "x$arguments" != xEOL; then
27199        new_complete="$new_path ${arguments% *}"
27200      else
27201        new_complete="$new_path"
27202      fi
27203
27204  if test "x$complete" != "x$new_complete"; then
27205      NM="$new_complete"
27206      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27207$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27208    fi
27209
27210    GNM="$NM"
27211
27212    if test -n "$ac_tool_prefix"; then
27213  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27214set dummy ${ac_tool_prefix}strip; ac_word=$2
27215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27216$as_echo_n "checking for $ac_word... " >&6; }
27217if test "${ac_cv_prog_STRIP+set}" = set; then :
27218  $as_echo_n "(cached) " >&6
27219else
27220  if test -n "$STRIP"; then
27221  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27222else
27223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27224for as_dir in $PATH
27225do
27226  IFS=$as_save_IFS
27227  test -z "$as_dir" && as_dir=.
27228    for ac_exec_ext in '' $ac_executable_extensions; do
27229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27230    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27232    break 2
27233  fi
27234done
27235  done
27236IFS=$as_save_IFS
27237
27238fi
27239fi
27240STRIP=$ac_cv_prog_STRIP
27241if test -n "$STRIP"; then
27242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27243$as_echo "$STRIP" >&6; }
27244else
27245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27246$as_echo "no" >&6; }
27247fi
27248
27249
27250fi
27251if test -z "$ac_cv_prog_STRIP"; then
27252  ac_ct_STRIP=$STRIP
27253  # Extract the first word of "strip", so it can be a program name with args.
27254set dummy strip; ac_word=$2
27255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27256$as_echo_n "checking for $ac_word... " >&6; }
27257if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27258  $as_echo_n "(cached) " >&6
27259else
27260  if test -n "$ac_ct_STRIP"; then
27261  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27262else
27263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27264for as_dir in $PATH
27265do
27266  IFS=$as_save_IFS
27267  test -z "$as_dir" && as_dir=.
27268    for ac_exec_ext in '' $ac_executable_extensions; do
27269  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27270    ac_cv_prog_ac_ct_STRIP="strip"
27271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27272    break 2
27273  fi
27274done
27275  done
27276IFS=$as_save_IFS
27277
27278fi
27279fi
27280ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27281if test -n "$ac_ct_STRIP"; then
27282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27283$as_echo "$ac_ct_STRIP" >&6; }
27284else
27285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27286$as_echo "no" >&6; }
27287fi
27288
27289  if test "x$ac_ct_STRIP" = x; then
27290    STRIP=""
27291  else
27292    case $cross_compiling:$ac_tool_warned in
27293yes:)
27294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27296ac_tool_warned=yes ;;
27297esac
27298    STRIP=$ac_ct_STRIP
27299  fi
27300else
27301  STRIP="$ac_cv_prog_STRIP"
27302fi
27303
27304
27305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27306
27307  # First separate the path from the arguments. This will split at the first
27308  # space.
27309  complete="$STRIP"
27310  path="${complete%% *}"
27311  tmp="$complete EOL"
27312  arguments="${tmp#* }"
27313
27314  # Input might be given as Windows format, start by converting to
27315  # unix format.
27316  new_path=`$CYGPATH -u "$path"`
27317
27318  # Now try to locate executable using which
27319  new_path=`$WHICH "$new_path" 2> /dev/null`
27320  # bat and cmd files are not always considered executable in cygwin causing which
27321  # to not find them
27322  if test "x$new_path" = x \
27323           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27324           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27325    new_path=`$CYGPATH -u "$path"`
27326  fi
27327  if test "x$new_path" = x; then
27328    # Oops. Which didn't find the executable.
27329    # The splitting of arguments from the executable at a space might have been incorrect,
27330    # since paths with space are more likely in Windows. Give it another try with the whole
27331    # argument.
27332    path="$complete"
27333    arguments="EOL"
27334    new_path=`$CYGPATH -u "$path"`
27335    new_path=`$WHICH "$new_path" 2> /dev/null`
27336    # bat and cmd files are not always considered executable in cygwin causing which
27337    # to not find them
27338    if test "x$new_path" = x \
27339             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27340             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27341      new_path=`$CYGPATH -u "$path"`
27342    fi
27343    if test "x$new_path" = x; then
27344      # It's still not found. Now this is an unrecoverable error.
27345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27346$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27347      has_space=`$ECHO "$complete" | $GREP " "`
27348      if test "x$has_space" != x; then
27349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27351      fi
27352      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27353    fi
27354  fi
27355
27356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27359  # "foo.exe" is OK but "foo" is an error.
27360  #
27361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27362  # It is also a way to make sure we got the proper file name for the real test later on.
27363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27364  if test "x$test_shortpath" = x; then
27365    # Short path failed, file does not exist as specified.
27366    # Try adding .exe or .cmd
27367    if test -f "${new_path}.exe"; then
27368       input_to_shortpath="${new_path}.exe"
27369    elif test -f "${new_path}.cmd"; then
27370       input_to_shortpath="${new_path}.cmd"
27371    else
27372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27373$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27376      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27377    fi
27378  else
27379    input_to_shortpath="$new_path"
27380  fi
27381
27382  # Call helper function which possibly converts this using DOS-style short mode.
27383  # If so, the updated path is stored in $new_path.
27384  new_path="$input_to_shortpath"
27385
27386  input_path="$input_to_shortpath"
27387  # Check if we need to convert this using DOS-style short mode. If the path
27388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27389  # take no chances and rewrite it.
27390  # Note: m4 eats our [], so we need to use [ and ] instead.
27391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27392  if test "x$has_forbidden_chars" != x; then
27393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27397      # Going to short mode and back again did indeed matter. Since short mode is
27398      # case insensitive, let's make it lowercase to improve readability.
27399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27400      # Now convert it back to Unix-stile (cygpath)
27401      input_path=`$CYGPATH -u "$shortmode_path"`
27402      new_path="$input_path"
27403    fi
27404  fi
27405
27406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27407  if test "x$test_cygdrive_prefix" = x; then
27408    # As a simple fix, exclude /usr/bin since it's not a real path.
27409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27411      # a path prefixed by /cygdrive for fixpath to work.
27412      new_path="$CYGWIN_ROOT_PATH$input_path"
27413    fi
27414  fi
27415
27416  # remove trailing .exe if any
27417  new_path="${new_path/%.exe/}"
27418
27419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27420
27421  # First separate the path from the arguments. This will split at the first
27422  # space.
27423  complete="$STRIP"
27424  path="${complete%% *}"
27425  tmp="$complete EOL"
27426  arguments="${tmp#* }"
27427
27428  # Input might be given as Windows format, start by converting to
27429  # unix format.
27430  new_path="$path"
27431
27432  windows_path="$new_path"
27433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27434    unix_path=`$CYGPATH -u "$windows_path"`
27435    new_path="$unix_path"
27436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27438    new_path="$unix_path"
27439  fi
27440
27441
27442  # Now try to locate executable using which
27443  new_path=`$WHICH "$new_path" 2> /dev/null`
27444
27445  if test "x$new_path" = x; then
27446    # Oops. Which didn't find the executable.
27447    # The splitting of arguments from the executable at a space might have been incorrect,
27448    # since paths with space are more likely in Windows. Give it another try with the whole
27449    # argument.
27450    path="$complete"
27451    arguments="EOL"
27452    new_path="$path"
27453
27454  windows_path="$new_path"
27455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27456    unix_path=`$CYGPATH -u "$windows_path"`
27457    new_path="$unix_path"
27458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27460    new_path="$unix_path"
27461  fi
27462
27463
27464    new_path=`$WHICH "$new_path" 2> /dev/null`
27465
27466    if test "x$new_path" = x; then
27467      # It's still not found. Now this is an unrecoverable error.
27468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27469$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27470      has_space=`$ECHO "$complete" | $GREP " "`
27471      if test "x$has_space" != x; then
27472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27474      fi
27475      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27476    fi
27477  fi
27478
27479  # Now new_path has a complete unix path to the binary
27480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27481    # Keep paths in /bin as-is, but remove trailing .exe if any
27482    new_path="${new_path/%.exe/}"
27483    # Do not save /bin paths to all_fixpath_prefixes!
27484  else
27485    # Not in mixed or Windows style, start by that.
27486    new_path=`cmd //c echo $new_path`
27487
27488  input_path="$new_path"
27489  # Check if we need to convert this using DOS-style short mode. If the path
27490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27491  # take no chances and rewrite it.
27492  # Note: m4 eats our [], so we need to use [ and ] instead.
27493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27494  if test "x$has_forbidden_chars" != x; then
27495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27497  fi
27498
27499    # Output is in $new_path
27500
27501  windows_path="$new_path"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    new_path="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    new_path="$unix_path"
27508  fi
27509
27510    # remove trailing .exe if any
27511    new_path="${new_path/%.exe/}"
27512
27513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27515  fi
27516
27517  else
27518    # We're on a posix platform. Hooray! :)
27519    # First separate the path from the arguments. This will split at the first
27520    # space.
27521    complete="$STRIP"
27522    path="${complete%% *}"
27523    tmp="$complete EOL"
27524    arguments="${tmp#* }"
27525
27526    # Cannot rely on the command "which" here since it doesn't always work.
27527    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27528    if test -z "$is_absolute_path"; then
27529      # Path to executable is not absolute. Find it.
27530      IFS_save="$IFS"
27531      IFS=:
27532      for p in $PATH; do
27533        if test -f "$p/$path" && test -x "$p/$path"; then
27534          new_path="$p/$path"
27535          break
27536        fi
27537      done
27538      IFS="$IFS_save"
27539    else
27540      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27541$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27542      new_path="$path"
27543    fi
27544
27545    if test "x$new_path" = x; then
27546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27547$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27548        has_space=`$ECHO "$complete" | $GREP " "`
27549        if test "x$has_space" != x; then
27550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27552        fi
27553        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27554      fi
27555  fi
27556
27557      # Now join together the path and the arguments once again
27558      if test "x$arguments" != xEOL; then
27559        new_complete="$new_path ${arguments% *}"
27560      else
27561        new_complete="$new_path"
27562      fi
27563
27564  if test "x$complete" != "x$new_complete"; then
27565      STRIP="$new_complete"
27566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27567$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27568    fi
27569
27570fi
27571
27572# objcopy is used for moving debug symbols to separate files when
27573# full debug symbols are enabled.
27574if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27575    if test -n "$ac_tool_prefix"; then
27576  for ac_prog in gobjcopy objcopy
27577  do
27578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27581$as_echo_n "checking for $ac_word... " >&6; }
27582if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27583  $as_echo_n "(cached) " >&6
27584else
27585  if test -n "$OBJCOPY"; then
27586  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27587else
27588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27589for as_dir in $PATH
27590do
27591  IFS=$as_save_IFS
27592  test -z "$as_dir" && as_dir=.
27593    for ac_exec_ext in '' $ac_executable_extensions; do
27594  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27595    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27597    break 2
27598  fi
27599done
27600  done
27601IFS=$as_save_IFS
27602
27603fi
27604fi
27605OBJCOPY=$ac_cv_prog_OBJCOPY
27606if test -n "$OBJCOPY"; then
27607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27608$as_echo "$OBJCOPY" >&6; }
27609else
27610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27611$as_echo "no" >&6; }
27612fi
27613
27614
27615    test -n "$OBJCOPY" && break
27616  done
27617fi
27618if test -z "$OBJCOPY"; then
27619  ac_ct_OBJCOPY=$OBJCOPY
27620  for ac_prog in gobjcopy objcopy
27621do
27622  # Extract the first word of "$ac_prog", so it can be a program name with args.
27623set dummy $ac_prog; ac_word=$2
27624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27625$as_echo_n "checking for $ac_word... " >&6; }
27626if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27627  $as_echo_n "(cached) " >&6
27628else
27629  if test -n "$ac_ct_OBJCOPY"; then
27630  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27631else
27632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27633for as_dir in $PATH
27634do
27635  IFS=$as_save_IFS
27636  test -z "$as_dir" && as_dir=.
27637    for ac_exec_ext in '' $ac_executable_extensions; do
27638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27639    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27641    break 2
27642  fi
27643done
27644  done
27645IFS=$as_save_IFS
27646
27647fi
27648fi
27649ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27650if test -n "$ac_ct_OBJCOPY"; then
27651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27652$as_echo "$ac_ct_OBJCOPY" >&6; }
27653else
27654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27655$as_echo "no" >&6; }
27656fi
27657
27658
27659  test -n "$ac_ct_OBJCOPY" && break
27660done
27661
27662  if test "x$ac_ct_OBJCOPY" = x; then
27663    OBJCOPY=""
27664  else
27665    case $cross_compiling:$ac_tool_warned in
27666yes:)
27667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27669ac_tool_warned=yes ;;
27670esac
27671    OBJCOPY=$ac_ct_OBJCOPY
27672  fi
27673fi
27674
27675    # Only call fixup if objcopy was found.
27676    if test -n "$OBJCOPY"; then
27677
27678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27679
27680  # First separate the path from the arguments. This will split at the first
27681  # space.
27682  complete="$OBJCOPY"
27683  path="${complete%% *}"
27684  tmp="$complete EOL"
27685  arguments="${tmp#* }"
27686
27687  # Input might be given as Windows format, start by converting to
27688  # unix format.
27689  new_path=`$CYGPATH -u "$path"`
27690
27691  # Now try to locate executable using which
27692  new_path=`$WHICH "$new_path" 2> /dev/null`
27693  # bat and cmd files are not always considered executable in cygwin causing which
27694  # to not find them
27695  if test "x$new_path" = x \
27696           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27697           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27698    new_path=`$CYGPATH -u "$path"`
27699  fi
27700  if test "x$new_path" = x; then
27701    # Oops. Which didn't find the executable.
27702    # The splitting of arguments from the executable at a space might have been incorrect,
27703    # since paths with space are more likely in Windows. Give it another try with the whole
27704    # argument.
27705    path="$complete"
27706    arguments="EOL"
27707    new_path=`$CYGPATH -u "$path"`
27708    new_path=`$WHICH "$new_path" 2> /dev/null`
27709    # bat and cmd files are not always considered executable in cygwin causing which
27710    # to not find them
27711    if test "x$new_path" = x \
27712             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27713             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27714      new_path=`$CYGPATH -u "$path"`
27715    fi
27716    if test "x$new_path" = x; then
27717      # It's still not found. Now this is an unrecoverable error.
27718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27719$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27720      has_space=`$ECHO "$complete" | $GREP " "`
27721      if test "x$has_space" != x; then
27722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27724      fi
27725      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27726    fi
27727  fi
27728
27729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27732  # "foo.exe" is OK but "foo" is an error.
27733  #
27734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27735  # It is also a way to make sure we got the proper file name for the real test later on.
27736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27737  if test "x$test_shortpath" = x; then
27738    # Short path failed, file does not exist as specified.
27739    # Try adding .exe or .cmd
27740    if test -f "${new_path}.exe"; then
27741       input_to_shortpath="${new_path}.exe"
27742    elif test -f "${new_path}.cmd"; then
27743       input_to_shortpath="${new_path}.cmd"
27744    else
27745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27746$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27749      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27750    fi
27751  else
27752    input_to_shortpath="$new_path"
27753  fi
27754
27755  # Call helper function which possibly converts this using DOS-style short mode.
27756  # If so, the updated path is stored in $new_path.
27757  new_path="$input_to_shortpath"
27758
27759  input_path="$input_to_shortpath"
27760  # Check if we need to convert this using DOS-style short mode. If the path
27761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27762  # take no chances and rewrite it.
27763  # Note: m4 eats our [], so we need to use [ and ] instead.
27764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27765  if test "x$has_forbidden_chars" != x; then
27766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27770      # Going to short mode and back again did indeed matter. Since short mode is
27771      # case insensitive, let's make it lowercase to improve readability.
27772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27773      # Now convert it back to Unix-stile (cygpath)
27774      input_path=`$CYGPATH -u "$shortmode_path"`
27775      new_path="$input_path"
27776    fi
27777  fi
27778
27779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27780  if test "x$test_cygdrive_prefix" = x; then
27781    # As a simple fix, exclude /usr/bin since it's not a real path.
27782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27784      # a path prefixed by /cygdrive for fixpath to work.
27785      new_path="$CYGWIN_ROOT_PATH$input_path"
27786    fi
27787  fi
27788
27789  # remove trailing .exe if any
27790  new_path="${new_path/%.exe/}"
27791
27792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27793
27794  # First separate the path from the arguments. This will split at the first
27795  # space.
27796  complete="$OBJCOPY"
27797  path="${complete%% *}"
27798  tmp="$complete EOL"
27799  arguments="${tmp#* }"
27800
27801  # Input might be given as Windows format, start by converting to
27802  # unix format.
27803  new_path="$path"
27804
27805  windows_path="$new_path"
27806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27807    unix_path=`$CYGPATH -u "$windows_path"`
27808    new_path="$unix_path"
27809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27811    new_path="$unix_path"
27812  fi
27813
27814
27815  # Now try to locate executable using which
27816  new_path=`$WHICH "$new_path" 2> /dev/null`
27817
27818  if test "x$new_path" = x; then
27819    # Oops. Which didn't find the executable.
27820    # The splitting of arguments from the executable at a space might have been incorrect,
27821    # since paths with space are more likely in Windows. Give it another try with the whole
27822    # argument.
27823    path="$complete"
27824    arguments="EOL"
27825    new_path="$path"
27826
27827  windows_path="$new_path"
27828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27829    unix_path=`$CYGPATH -u "$windows_path"`
27830    new_path="$unix_path"
27831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27833    new_path="$unix_path"
27834  fi
27835
27836
27837    new_path=`$WHICH "$new_path" 2> /dev/null`
27838
27839    if test "x$new_path" = x; then
27840      # It's still not found. Now this is an unrecoverable error.
27841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27842$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27843      has_space=`$ECHO "$complete" | $GREP " "`
27844      if test "x$has_space" != x; then
27845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27847      fi
27848      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27849    fi
27850  fi
27851
27852  # Now new_path has a complete unix path to the binary
27853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27854    # Keep paths in /bin as-is, but remove trailing .exe if any
27855    new_path="${new_path/%.exe/}"
27856    # Do not save /bin paths to all_fixpath_prefixes!
27857  else
27858    # Not in mixed or Windows style, start by that.
27859    new_path=`cmd //c echo $new_path`
27860
27861  input_path="$new_path"
27862  # Check if we need to convert this using DOS-style short mode. If the path
27863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27864  # take no chances and rewrite it.
27865  # Note: m4 eats our [], so we need to use [ and ] instead.
27866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27867  if test "x$has_forbidden_chars" != x; then
27868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27870  fi
27871
27872    # Output is in $new_path
27873
27874  windows_path="$new_path"
27875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27876    unix_path=`$CYGPATH -u "$windows_path"`
27877    new_path="$unix_path"
27878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27880    new_path="$unix_path"
27881  fi
27882
27883    # remove trailing .exe if any
27884    new_path="${new_path/%.exe/}"
27885
27886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27888  fi
27889
27890  else
27891    # We're on a posix platform. Hooray! :)
27892    # First separate the path from the arguments. This will split at the first
27893    # space.
27894    complete="$OBJCOPY"
27895    path="${complete%% *}"
27896    tmp="$complete EOL"
27897    arguments="${tmp#* }"
27898
27899    # Cannot rely on the command "which" here since it doesn't always work.
27900    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27901    if test -z "$is_absolute_path"; then
27902      # Path to executable is not absolute. Find it.
27903      IFS_save="$IFS"
27904      IFS=:
27905      for p in $PATH; do
27906        if test -f "$p/$path" && test -x "$p/$path"; then
27907          new_path="$p/$path"
27908          break
27909        fi
27910      done
27911      IFS="$IFS_save"
27912    else
27913      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27914$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27915      new_path="$path"
27916    fi
27917
27918    if test "x$new_path" = x; then
27919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27920$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27921        has_space=`$ECHO "$complete" | $GREP " "`
27922        if test "x$has_space" != x; then
27923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27925        fi
27926        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27927      fi
27928  fi
27929
27930      # Now join together the path and the arguments once again
27931      if test "x$arguments" != xEOL; then
27932        new_complete="$new_path ${arguments% *}"
27933      else
27934        new_complete="$new_path"
27935      fi
27936
27937  if test "x$complete" != "x$new_complete"; then
27938      OBJCOPY="$new_complete"
27939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27940$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27941    fi
27942
27943    fi
27944fi
27945
27946if test -n "$ac_tool_prefix"; then
27947  for ac_prog in gobjdump objdump
27948  do
27949    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27952$as_echo_n "checking for $ac_word... " >&6; }
27953if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27954  $as_echo_n "(cached) " >&6
27955else
27956  if test -n "$OBJDUMP"; then
27957  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27958else
27959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27960for as_dir in $PATH
27961do
27962  IFS=$as_save_IFS
27963  test -z "$as_dir" && as_dir=.
27964    for ac_exec_ext in '' $ac_executable_extensions; do
27965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27966    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27968    break 2
27969  fi
27970done
27971  done
27972IFS=$as_save_IFS
27973
27974fi
27975fi
27976OBJDUMP=$ac_cv_prog_OBJDUMP
27977if test -n "$OBJDUMP"; then
27978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27979$as_echo "$OBJDUMP" >&6; }
27980else
27981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27982$as_echo "no" >&6; }
27983fi
27984
27985
27986    test -n "$OBJDUMP" && break
27987  done
27988fi
27989if test -z "$OBJDUMP"; then
27990  ac_ct_OBJDUMP=$OBJDUMP
27991  for ac_prog in gobjdump objdump
27992do
27993  # Extract the first word of "$ac_prog", so it can be a program name with args.
27994set dummy $ac_prog; ac_word=$2
27995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27996$as_echo_n "checking for $ac_word... " >&6; }
27997if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27998  $as_echo_n "(cached) " >&6
27999else
28000  if test -n "$ac_ct_OBJDUMP"; then
28001  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28002else
28003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28004for as_dir in $PATH
28005do
28006  IFS=$as_save_IFS
28007  test -z "$as_dir" && as_dir=.
28008    for ac_exec_ext in '' $ac_executable_extensions; do
28009  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28010    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28012    break 2
28013  fi
28014done
28015  done
28016IFS=$as_save_IFS
28017
28018fi
28019fi
28020ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28021if test -n "$ac_ct_OBJDUMP"; then
28022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28023$as_echo "$ac_ct_OBJDUMP" >&6; }
28024else
28025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28026$as_echo "no" >&6; }
28027fi
28028
28029
28030  test -n "$ac_ct_OBJDUMP" && break
28031done
28032
28033  if test "x$ac_ct_OBJDUMP" = x; then
28034    OBJDUMP=""
28035  else
28036    case $cross_compiling:$ac_tool_warned in
28037yes:)
28038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28040ac_tool_warned=yes ;;
28041esac
28042    OBJDUMP=$ac_ct_OBJDUMP
28043  fi
28044fi
28045
28046if test "x$OBJDUMP" != x; then
28047  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28048
28049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28050
28051  # First separate the path from the arguments. This will split at the first
28052  # space.
28053  complete="$OBJDUMP"
28054  path="${complete%% *}"
28055  tmp="$complete EOL"
28056  arguments="${tmp#* }"
28057
28058  # Input might be given as Windows format, start by converting to
28059  # unix format.
28060  new_path=`$CYGPATH -u "$path"`
28061
28062  # Now try to locate executable using which
28063  new_path=`$WHICH "$new_path" 2> /dev/null`
28064  # bat and cmd files are not always considered executable in cygwin causing which
28065  # to not find them
28066  if test "x$new_path" = x \
28067           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28068           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28069    new_path=`$CYGPATH -u "$path"`
28070  fi
28071  if test "x$new_path" = x; then
28072    # Oops. Which didn't find the executable.
28073    # The splitting of arguments from the executable at a space might have been incorrect,
28074    # since paths with space are more likely in Windows. Give it another try with the whole
28075    # argument.
28076    path="$complete"
28077    arguments="EOL"
28078    new_path=`$CYGPATH -u "$path"`
28079    new_path=`$WHICH "$new_path" 2> /dev/null`
28080    # bat and cmd files are not always considered executable in cygwin causing which
28081    # to not find them
28082    if test "x$new_path" = x \
28083             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28084             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28085      new_path=`$CYGPATH -u "$path"`
28086    fi
28087    if test "x$new_path" = x; then
28088      # It's still not found. Now this is an unrecoverable error.
28089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28090$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28091      has_space=`$ECHO "$complete" | $GREP " "`
28092      if test "x$has_space" != x; then
28093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28095      fi
28096      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28097    fi
28098  fi
28099
28100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28103  # "foo.exe" is OK but "foo" is an error.
28104  #
28105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28106  # It is also a way to make sure we got the proper file name for the real test later on.
28107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28108  if test "x$test_shortpath" = x; then
28109    # Short path failed, file does not exist as specified.
28110    # Try adding .exe or .cmd
28111    if test -f "${new_path}.exe"; then
28112       input_to_shortpath="${new_path}.exe"
28113    elif test -f "${new_path}.cmd"; then
28114       input_to_shortpath="${new_path}.cmd"
28115    else
28116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28117$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28120      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28121    fi
28122  else
28123    input_to_shortpath="$new_path"
28124  fi
28125
28126  # Call helper function which possibly converts this using DOS-style short mode.
28127  # If so, the updated path is stored in $new_path.
28128  new_path="$input_to_shortpath"
28129
28130  input_path="$input_to_shortpath"
28131  # Check if we need to convert this using DOS-style short mode. If the path
28132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28133  # take no chances and rewrite it.
28134  # Note: m4 eats our [], so we need to use [ and ] instead.
28135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28136  if test "x$has_forbidden_chars" != x; then
28137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28141      # Going to short mode and back again did indeed matter. Since short mode is
28142      # case insensitive, let's make it lowercase to improve readability.
28143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28144      # Now convert it back to Unix-stile (cygpath)
28145      input_path=`$CYGPATH -u "$shortmode_path"`
28146      new_path="$input_path"
28147    fi
28148  fi
28149
28150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28151  if test "x$test_cygdrive_prefix" = x; then
28152    # As a simple fix, exclude /usr/bin since it's not a real path.
28153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28155      # a path prefixed by /cygdrive for fixpath to work.
28156      new_path="$CYGWIN_ROOT_PATH$input_path"
28157    fi
28158  fi
28159
28160  # remove trailing .exe if any
28161  new_path="${new_path/%.exe/}"
28162
28163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28164
28165  # First separate the path from the arguments. This will split at the first
28166  # space.
28167  complete="$OBJDUMP"
28168  path="${complete%% *}"
28169  tmp="$complete EOL"
28170  arguments="${tmp#* }"
28171
28172  # Input might be given as Windows format, start by converting to
28173  # unix format.
28174  new_path="$path"
28175
28176  windows_path="$new_path"
28177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28178    unix_path=`$CYGPATH -u "$windows_path"`
28179    new_path="$unix_path"
28180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28182    new_path="$unix_path"
28183  fi
28184
28185
28186  # Now try to locate executable using which
28187  new_path=`$WHICH "$new_path" 2> /dev/null`
28188
28189  if test "x$new_path" = x; then
28190    # Oops. Which didn't find the executable.
28191    # The splitting of arguments from the executable at a space might have been incorrect,
28192    # since paths with space are more likely in Windows. Give it another try with the whole
28193    # argument.
28194    path="$complete"
28195    arguments="EOL"
28196    new_path="$path"
28197
28198  windows_path="$new_path"
28199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28200    unix_path=`$CYGPATH -u "$windows_path"`
28201    new_path="$unix_path"
28202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28204    new_path="$unix_path"
28205  fi
28206
28207
28208    new_path=`$WHICH "$new_path" 2> /dev/null`
28209
28210    if test "x$new_path" = x; then
28211      # It's still not found. Now this is an unrecoverable error.
28212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28213$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28214      has_space=`$ECHO "$complete" | $GREP " "`
28215      if test "x$has_space" != x; then
28216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28218      fi
28219      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28220    fi
28221  fi
28222
28223  # Now new_path has a complete unix path to the binary
28224  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28225    # Keep paths in /bin as-is, but remove trailing .exe if any
28226    new_path="${new_path/%.exe/}"
28227    # Do not save /bin paths to all_fixpath_prefixes!
28228  else
28229    # Not in mixed or Windows style, start by that.
28230    new_path=`cmd //c echo $new_path`
28231
28232  input_path="$new_path"
28233  # Check if we need to convert this using DOS-style short mode. If the path
28234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28235  # take no chances and rewrite it.
28236  # Note: m4 eats our [], so we need to use [ and ] instead.
28237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28238  if test "x$has_forbidden_chars" != x; then
28239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28241  fi
28242
28243    # Output is in $new_path
28244
28245  windows_path="$new_path"
28246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28247    unix_path=`$CYGPATH -u "$windows_path"`
28248    new_path="$unix_path"
28249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28251    new_path="$unix_path"
28252  fi
28253
28254    # remove trailing .exe if any
28255    new_path="${new_path/%.exe/}"
28256
28257    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28258    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28259  fi
28260
28261  else
28262    # We're on a posix platform. Hooray! :)
28263    # First separate the path from the arguments. This will split at the first
28264    # space.
28265    complete="$OBJDUMP"
28266    path="${complete%% *}"
28267    tmp="$complete EOL"
28268    arguments="${tmp#* }"
28269
28270    # Cannot rely on the command "which" here since it doesn't always work.
28271    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28272    if test -z "$is_absolute_path"; then
28273      # Path to executable is not absolute. Find it.
28274      IFS_save="$IFS"
28275      IFS=:
28276      for p in $PATH; do
28277        if test -f "$p/$path" && test -x "$p/$path"; then
28278          new_path="$p/$path"
28279          break
28280        fi
28281      done
28282      IFS="$IFS_save"
28283    else
28284      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28285$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28286      new_path="$path"
28287    fi
28288
28289    if test "x$new_path" = x; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28291$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28292        has_space=`$ECHO "$complete" | $GREP " "`
28293        if test "x$has_space" != x; then
28294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28296        fi
28297        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28298      fi
28299  fi
28300
28301      # Now join together the path and the arguments once again
28302      if test "x$arguments" != xEOL; then
28303        new_complete="$new_path ${arguments% *}"
28304      else
28305        new_complete="$new_path"
28306      fi
28307
28308  if test "x$complete" != "x$new_complete"; then
28309      OBJDUMP="$new_complete"
28310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28311$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28312    fi
28313
28314fi
28315
28316if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28317   # Extract the first word of "lipo", so it can be a program name with args.
28318set dummy lipo; ac_word=$2
28319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28320$as_echo_n "checking for $ac_word... " >&6; }
28321if test "${ac_cv_path_LIPO+set}" = set; then :
28322  $as_echo_n "(cached) " >&6
28323else
28324  case $LIPO in
28325  [\\/]* | ?:[\\/]*)
28326  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28327  ;;
28328  *)
28329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28330for as_dir in $PATH
28331do
28332  IFS=$as_save_IFS
28333  test -z "$as_dir" && as_dir=.
28334    for ac_exec_ext in '' $ac_executable_extensions; do
28335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28336    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28338    break 2
28339  fi
28340done
28341  done
28342IFS=$as_save_IFS
28343
28344  ;;
28345esac
28346fi
28347LIPO=$ac_cv_path_LIPO
28348if test -n "$LIPO"; then
28349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28350$as_echo "$LIPO" >&6; }
28351else
28352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28353$as_echo "no" >&6; }
28354fi
28355
28356
28357
28358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28359
28360  # First separate the path from the arguments. This will split at the first
28361  # space.
28362  complete="$LIPO"
28363  path="${complete%% *}"
28364  tmp="$complete EOL"
28365  arguments="${tmp#* }"
28366
28367  # Input might be given as Windows format, start by converting to
28368  # unix format.
28369  new_path=`$CYGPATH -u "$path"`
28370
28371  # Now try to locate executable using which
28372  new_path=`$WHICH "$new_path" 2> /dev/null`
28373  # bat and cmd files are not always considered executable in cygwin causing which
28374  # to not find them
28375  if test "x$new_path" = x \
28376           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28377           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28378    new_path=`$CYGPATH -u "$path"`
28379  fi
28380  if test "x$new_path" = x; then
28381    # Oops. Which didn't find the executable.
28382    # The splitting of arguments from the executable at a space might have been incorrect,
28383    # since paths with space are more likely in Windows. Give it another try with the whole
28384    # argument.
28385    path="$complete"
28386    arguments="EOL"
28387    new_path=`$CYGPATH -u "$path"`
28388    new_path=`$WHICH "$new_path" 2> /dev/null`
28389    # bat and cmd files are not always considered executable in cygwin causing which
28390    # to not find them
28391    if test "x$new_path" = x \
28392             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28393             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28394      new_path=`$CYGPATH -u "$path"`
28395    fi
28396    if test "x$new_path" = x; then
28397      # It's still not found. Now this is an unrecoverable error.
28398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28399$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28400      has_space=`$ECHO "$complete" | $GREP " "`
28401      if test "x$has_space" != x; then
28402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28404      fi
28405      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28406    fi
28407  fi
28408
28409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28412  # "foo.exe" is OK but "foo" is an error.
28413  #
28414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28415  # It is also a way to make sure we got the proper file name for the real test later on.
28416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28417  if test "x$test_shortpath" = x; then
28418    # Short path failed, file does not exist as specified.
28419    # Try adding .exe or .cmd
28420    if test -f "${new_path}.exe"; then
28421       input_to_shortpath="${new_path}.exe"
28422    elif test -f "${new_path}.cmd"; then
28423       input_to_shortpath="${new_path}.cmd"
28424    else
28425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28426$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28427      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28428$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28429      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28430    fi
28431  else
28432    input_to_shortpath="$new_path"
28433  fi
28434
28435  # Call helper function which possibly converts this using DOS-style short mode.
28436  # If so, the updated path is stored in $new_path.
28437  new_path="$input_to_shortpath"
28438
28439  input_path="$input_to_shortpath"
28440  # Check if we need to convert this using DOS-style short mode. If the path
28441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28442  # take no chances and rewrite it.
28443  # Note: m4 eats our [], so we need to use [ and ] instead.
28444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28445  if test "x$has_forbidden_chars" != x; then
28446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28450      # Going to short mode and back again did indeed matter. Since short mode is
28451      # case insensitive, let's make it lowercase to improve readability.
28452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28453      # Now convert it back to Unix-stile (cygpath)
28454      input_path=`$CYGPATH -u "$shortmode_path"`
28455      new_path="$input_path"
28456    fi
28457  fi
28458
28459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28460  if test "x$test_cygdrive_prefix" = x; then
28461    # As a simple fix, exclude /usr/bin since it's not a real path.
28462    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28464      # a path prefixed by /cygdrive for fixpath to work.
28465      new_path="$CYGWIN_ROOT_PATH$input_path"
28466    fi
28467  fi
28468
28469  # remove trailing .exe if any
28470  new_path="${new_path/%.exe/}"
28471
28472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28473
28474  # First separate the path from the arguments. This will split at the first
28475  # space.
28476  complete="$LIPO"
28477  path="${complete%% *}"
28478  tmp="$complete EOL"
28479  arguments="${tmp#* }"
28480
28481  # Input might be given as Windows format, start by converting to
28482  # unix format.
28483  new_path="$path"
28484
28485  windows_path="$new_path"
28486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28487    unix_path=`$CYGPATH -u "$windows_path"`
28488    new_path="$unix_path"
28489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28491    new_path="$unix_path"
28492  fi
28493
28494
28495  # Now try to locate executable using which
28496  new_path=`$WHICH "$new_path" 2> /dev/null`
28497
28498  if test "x$new_path" = x; then
28499    # Oops. Which didn't find the executable.
28500    # The splitting of arguments from the executable at a space might have been incorrect,
28501    # since paths with space are more likely in Windows. Give it another try with the whole
28502    # argument.
28503    path="$complete"
28504    arguments="EOL"
28505    new_path="$path"
28506
28507  windows_path="$new_path"
28508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28509    unix_path=`$CYGPATH -u "$windows_path"`
28510    new_path="$unix_path"
28511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28513    new_path="$unix_path"
28514  fi
28515
28516
28517    new_path=`$WHICH "$new_path" 2> /dev/null`
28518
28519    if test "x$new_path" = x; then
28520      # It's still not found. Now this is an unrecoverable error.
28521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28522$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28523      has_space=`$ECHO "$complete" | $GREP " "`
28524      if test "x$has_space" != x; then
28525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28527      fi
28528      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28529    fi
28530  fi
28531
28532  # Now new_path has a complete unix path to the binary
28533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28534    # Keep paths in /bin as-is, but remove trailing .exe if any
28535    new_path="${new_path/%.exe/}"
28536    # Do not save /bin paths to all_fixpath_prefixes!
28537  else
28538    # Not in mixed or Windows style, start by that.
28539    new_path=`cmd //c echo $new_path`
28540
28541  input_path="$new_path"
28542  # Check if we need to convert this using DOS-style short mode. If the path
28543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28544  # take no chances and rewrite it.
28545  # Note: m4 eats our [], so we need to use [ and ] instead.
28546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28547  if test "x$has_forbidden_chars" != x; then
28548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28550  fi
28551
28552    # Output is in $new_path
28553
28554  windows_path="$new_path"
28555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28556    unix_path=`$CYGPATH -u "$windows_path"`
28557    new_path="$unix_path"
28558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28560    new_path="$unix_path"
28561  fi
28562
28563    # remove trailing .exe if any
28564    new_path="${new_path/%.exe/}"
28565
28566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28568  fi
28569
28570  else
28571    # We're on a posix platform. Hooray! :)
28572    # First separate the path from the arguments. This will split at the first
28573    # space.
28574    complete="$LIPO"
28575    path="${complete%% *}"
28576    tmp="$complete EOL"
28577    arguments="${tmp#* }"
28578
28579    # Cannot rely on the command "which" here since it doesn't always work.
28580    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28581    if test -z "$is_absolute_path"; then
28582      # Path to executable is not absolute. Find it.
28583      IFS_save="$IFS"
28584      IFS=:
28585      for p in $PATH; do
28586        if test -f "$p/$path" && test -x "$p/$path"; then
28587          new_path="$p/$path"
28588          break
28589        fi
28590      done
28591      IFS="$IFS_save"
28592    else
28593      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28594$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28595      new_path="$path"
28596    fi
28597
28598    if test "x$new_path" = x; then
28599        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28600$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28601        has_space=`$ECHO "$complete" | $GREP " "`
28602        if test "x$has_space" != x; then
28603          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28604$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28605        fi
28606        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28607      fi
28608  fi
28609
28610      # Now join together the path and the arguments once again
28611      if test "x$arguments" != xEOL; then
28612        new_complete="$new_path ${arguments% *}"
28613      else
28614        new_complete="$new_path"
28615      fi
28616
28617  if test "x$complete" != "x$new_complete"; then
28618      LIPO="$new_complete"
28619      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28620$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28621    fi
28622
28623fi
28624
28625
28626
28627# Restore old path without tools dir
28628PATH="$OLD_PATH"
28629
28630
28631# FIXME: Currently we must test this after paths but before flags. Fix!
28632
28633# And we can test some aspects on the target using configure macros.
28634
28635
28636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28637$as_echo_n "checking for ANSI C header files... " >&6; }
28638if test "${ac_cv_header_stdc+set}" = set; then :
28639  $as_echo_n "(cached) " >&6
28640else
28641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28642/* end confdefs.h.  */
28643#include <stdlib.h>
28644#include <stdarg.h>
28645#include <string.h>
28646#include <float.h>
28647
28648int
28649main ()
28650{
28651
28652  ;
28653  return 0;
28654}
28655_ACEOF
28656if ac_fn_cxx_try_compile "$LINENO"; then :
28657  ac_cv_header_stdc=yes
28658else
28659  ac_cv_header_stdc=no
28660fi
28661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28662
28663if test $ac_cv_header_stdc = yes; then
28664  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28666/* end confdefs.h.  */
28667#include <string.h>
28668
28669_ACEOF
28670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28671  $EGREP "memchr" >/dev/null 2>&1; then :
28672
28673else
28674  ac_cv_header_stdc=no
28675fi
28676rm -f conftest*
28677
28678fi
28679
28680if test $ac_cv_header_stdc = yes; then
28681  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28683/* end confdefs.h.  */
28684#include <stdlib.h>
28685
28686_ACEOF
28687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28688  $EGREP "free" >/dev/null 2>&1; then :
28689
28690else
28691  ac_cv_header_stdc=no
28692fi
28693rm -f conftest*
28694
28695fi
28696
28697if test $ac_cv_header_stdc = yes; then
28698  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28699  if test "$cross_compiling" = yes; then :
28700  :
28701else
28702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28703/* end confdefs.h.  */
28704#include <ctype.h>
28705#include <stdlib.h>
28706#if ((' ' & 0x0FF) == 0x020)
28707# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28708# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28709#else
28710# define ISLOWER(c) \
28711		   (('a' <= (c) && (c) <= 'i') \
28712		     || ('j' <= (c) && (c) <= 'r') \
28713		     || ('s' <= (c) && (c) <= 'z'))
28714# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28715#endif
28716
28717#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28718int
28719main ()
28720{
28721  int i;
28722  for (i = 0; i < 256; i++)
28723    if (XOR (islower (i), ISLOWER (i))
28724	|| toupper (i) != TOUPPER (i))
28725      return 2;
28726  return 0;
28727}
28728_ACEOF
28729if ac_fn_cxx_try_run "$LINENO"; then :
28730
28731else
28732  ac_cv_header_stdc=no
28733fi
28734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28735  conftest.$ac_objext conftest.beam conftest.$ac_ext
28736fi
28737
28738fi
28739fi
28740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28741$as_echo "$ac_cv_header_stdc" >&6; }
28742if test $ac_cv_header_stdc = yes; then
28743
28744$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28745
28746fi
28747
28748# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28749for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28750		  inttypes.h stdint.h unistd.h
28751do :
28752  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28753ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28754"
28755if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28756  cat >>confdefs.h <<_ACEOF
28757#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28758_ACEOF
28759
28760fi
28761
28762done
28763
28764
28765
28766###############################################################################
28767#
28768# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28769# (The JVM can use 32 or 64 bit Java pointers but that decision
28770# is made at runtime.)
28771#
28772
28773if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28774  # Always specify -m flags on Solaris
28775
28776  # keep track of c/cxx flags that we added outselves...
28777  #   to prevent emitting warning...
28778  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28779  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28780  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28781
28782  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28783  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28784  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28785
28786  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28787  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28788  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28789
28790elif test "x$COMPILE_TYPE" = xreduced; then
28791  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28792    # Specify -m if running reduced on other Posix platforms
28793
28794  # keep track of c/cxx flags that we added outselves...
28795  #   to prevent emitting warning...
28796  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28797  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28798  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28799
28800  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28801  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28802  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28803
28804  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28805  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28806  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28807
28808  fi
28809fi
28810
28811# Make compilation sanity check
28812for ac_header in stdio.h
28813do :
28814  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28815if test "x$ac_cv_header_stdio_h" = x""yes; then :
28816  cat >>confdefs.h <<_ACEOF
28817#define HAVE_STDIO_H 1
28818_ACEOF
28819
28820else
28821
28822  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28823$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28824  if test "x$COMPILE_TYPE" = xreduced; then
28825    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28826$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28827  elif test "x$COMPILE_TYPE" = xcross; then
28828    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28829$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28830  fi
28831  as_fn_error $? "Cannot continue." "$LINENO" 5
28832
28833fi
28834
28835done
28836
28837
28838# The cast to long int works around a bug in the HP C Compiler
28839# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28840# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28841# This bug is HP SR number 8606223364.
28842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28843$as_echo_n "checking size of int *... " >&6; }
28844if test "${ac_cv_sizeof_int_p+set}" = set; then :
28845  $as_echo_n "(cached) " >&6
28846else
28847  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28848
28849else
28850  if test "$ac_cv_type_int_p" = yes; then
28851     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28853as_fn_error 77 "cannot compute sizeof (int *)
28854See \`config.log' for more details" "$LINENO" 5 ; }
28855   else
28856     ac_cv_sizeof_int_p=0
28857   fi
28858fi
28859
28860fi
28861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28862$as_echo "$ac_cv_sizeof_int_p" >&6; }
28863
28864
28865
28866cat >>confdefs.h <<_ACEOF
28867#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28868_ACEOF
28869
28870
28871
28872if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28873  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28874  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28875fi
28876
28877if test "x$SIZEOF_INT_P" = x; then
28878    # The test failed, lets stick to the assumed value.
28879    { $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
28880$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28881else
28882    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28883
28884    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28885        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
28886    fi
28887fi
28888
28889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28890$as_echo_n "checking for target address size... " >&6; }
28891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28892$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28893
28894
28895###############################################################################
28896#
28897# Is the target little of big endian?
28898#
28899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28900$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28901if test "${ac_cv_c_bigendian+set}" = set; then :
28902  $as_echo_n "(cached) " >&6
28903else
28904  ac_cv_c_bigendian=unknown
28905    # See if we're dealing with a universal compiler.
28906    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28907/* end confdefs.h.  */
28908#ifndef __APPLE_CC__
28909	       not a universal capable compiler
28910	     #endif
28911	     typedef int dummy;
28912
28913_ACEOF
28914if ac_fn_cxx_try_compile "$LINENO"; then :
28915
28916	# Check for potential -arch flags.  It is not universal unless
28917	# there are at least two -arch flags with different values.
28918	ac_arch=
28919	ac_prev=
28920	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28921	 if test -n "$ac_prev"; then
28922	   case $ac_word in
28923	     i?86 | x86_64 | ppc | ppc64)
28924	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28925		 ac_arch=$ac_word
28926	       else
28927		 ac_cv_c_bigendian=universal
28928		 break
28929	       fi
28930	       ;;
28931	   esac
28932	   ac_prev=
28933	 elif test "x$ac_word" = "x-arch"; then
28934	   ac_prev=arch
28935	 fi
28936       done
28937fi
28938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28939    if test $ac_cv_c_bigendian = unknown; then
28940      # See if sys/param.h defines the BYTE_ORDER macro.
28941      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28942/* end confdefs.h.  */
28943#include <sys/types.h>
28944	     #include <sys/param.h>
28945
28946int
28947main ()
28948{
28949#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28950		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28951		     && LITTLE_ENDIAN)
28952	      bogus endian macros
28953	     #endif
28954
28955  ;
28956  return 0;
28957}
28958_ACEOF
28959if ac_fn_cxx_try_compile "$LINENO"; then :
28960  # It does; now see whether it defined to BIG_ENDIAN or not.
28961	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28962/* end confdefs.h.  */
28963#include <sys/types.h>
28964		#include <sys/param.h>
28965
28966int
28967main ()
28968{
28969#if BYTE_ORDER != BIG_ENDIAN
28970		 not big endian
28971		#endif
28972
28973  ;
28974  return 0;
28975}
28976_ACEOF
28977if ac_fn_cxx_try_compile "$LINENO"; then :
28978  ac_cv_c_bigendian=yes
28979else
28980  ac_cv_c_bigendian=no
28981fi
28982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28983fi
28984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28985    fi
28986    if test $ac_cv_c_bigendian = unknown; then
28987      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28988      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28989/* end confdefs.h.  */
28990#include <limits.h>
28991
28992int
28993main ()
28994{
28995#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28996	      bogus endian macros
28997	     #endif
28998
28999  ;
29000  return 0;
29001}
29002_ACEOF
29003if ac_fn_cxx_try_compile "$LINENO"; then :
29004  # It does; now see whether it defined to _BIG_ENDIAN or not.
29005	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29006/* end confdefs.h.  */
29007#include <limits.h>
29008
29009int
29010main ()
29011{
29012#ifndef _BIG_ENDIAN
29013		 not big endian
29014		#endif
29015
29016  ;
29017  return 0;
29018}
29019_ACEOF
29020if ac_fn_cxx_try_compile "$LINENO"; then :
29021  ac_cv_c_bigendian=yes
29022else
29023  ac_cv_c_bigendian=no
29024fi
29025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29026fi
29027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29028    fi
29029    if test $ac_cv_c_bigendian = unknown; then
29030      # Compile a test program.
29031      if test "$cross_compiling" = yes; then :
29032  # Try to guess by grepping values from an object file.
29033	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29034/* end confdefs.h.  */
29035short int ascii_mm[] =
29036		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29037		short int ascii_ii[] =
29038		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29039		int use_ascii (int i) {
29040		  return ascii_mm[i] + ascii_ii[i];
29041		}
29042		short int ebcdic_ii[] =
29043		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29044		short int ebcdic_mm[] =
29045		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29046		int use_ebcdic (int i) {
29047		  return ebcdic_mm[i] + ebcdic_ii[i];
29048		}
29049		extern int foo;
29050
29051int
29052main ()
29053{
29054return use_ascii (foo) == use_ebcdic (foo);
29055  ;
29056  return 0;
29057}
29058_ACEOF
29059if ac_fn_cxx_try_compile "$LINENO"; then :
29060  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29061	      ac_cv_c_bigendian=yes
29062	    fi
29063	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29064	      if test "$ac_cv_c_bigendian" = unknown; then
29065		ac_cv_c_bigendian=no
29066	      else
29067		# finding both strings is unlikely to happen, but who knows?
29068		ac_cv_c_bigendian=unknown
29069	      fi
29070	    fi
29071fi
29072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29073else
29074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29075/* end confdefs.h.  */
29076$ac_includes_default
29077int
29078main ()
29079{
29080
29081	     /* Are we little or big endian?  From Harbison&Steele.  */
29082	     union
29083	     {
29084	       long int l;
29085	       char c[sizeof (long int)];
29086	     } u;
29087	     u.l = 1;
29088	     return u.c[sizeof (long int) - 1] == 1;
29089
29090  ;
29091  return 0;
29092}
29093_ACEOF
29094if ac_fn_cxx_try_run "$LINENO"; then :
29095  ac_cv_c_bigendian=no
29096else
29097  ac_cv_c_bigendian=yes
29098fi
29099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29100  conftest.$ac_objext conftest.beam conftest.$ac_ext
29101fi
29102
29103    fi
29104fi
29105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29106$as_echo "$ac_cv_c_bigendian" >&6; }
29107 case $ac_cv_c_bigendian in #(
29108   yes)
29109     ENDIAN="big";; #(
29110   no)
29111     ENDIAN="little" ;; #(
29112   universal)
29113     ENDIAN="universal_endianness"
29114     ;; #(
29115   *)
29116     ENDIAN="unknown" ;;
29117 esac
29118
29119
29120if test "x$ENDIAN" = xuniversal_endianness; then
29121    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29122fi
29123if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29124    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
29125fi
29126
29127
29128# Configure flags for the tools
29129
29130
29131###############################################################################
29132#
29133# How to compile shared libraries.
29134#
29135
29136if test "x$GCC" = xyes; then
29137    COMPILER_NAME=gcc
29138    PICFLAG="-fPIC"
29139    LIBRARY_PREFIX=lib
29140    SHARED_LIBRARY='lib$1.so'
29141    STATIC_LIBRARY='lib$1.a'
29142    SHARED_LIBRARY_FLAGS="-shared"
29143    SHARED_LIBRARY_SUFFIX='.so'
29144    STATIC_LIBRARY_SUFFIX='.a'
29145    OBJ_SUFFIX='.o'
29146    EXE_SUFFIX=''
29147    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29148    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29149    C_FLAG_REORDER=''
29150    CXX_FLAG_REORDER=''
29151    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29152    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29153    LD="$CC"
29154    LDEXE="$CC"
29155    LDCXX="$CXX"
29156    LDEXECXX="$CXX"
29157    POST_STRIP_CMD="$STRIP -g"
29158
29159    # Linking is different on MacOSX
29160    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29161        # Might change in the future to clang.
29162        COMPILER_NAME=gcc
29163        SHARED_LIBRARY='lib$1.dylib'
29164        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29165        SHARED_LIBRARY_SUFFIX='.dylib'
29166        EXE_SUFFIX=''
29167        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29168        SET_SHARED_LIBRARY_MAPFILE=''
29169        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29170        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29171        POST_STRIP_CMD="$STRIP -S"
29172    fi
29173else
29174    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29175        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29176        COMPILER_NAME=ossc
29177        PICFLAG="-KPIC"
29178        LIBRARY_PREFIX=lib
29179        SHARED_LIBRARY='lib$1.so'
29180        STATIC_LIBRARY='lib$1.a'
29181        SHARED_LIBRARY_FLAGS="-G"
29182        SHARED_LIBRARY_SUFFIX='.so'
29183        STATIC_LIBRARY_SUFFIX='.a'
29184        OBJ_SUFFIX='.o'
29185        EXE_SUFFIX=''
29186        SET_SHARED_LIBRARY_NAME=''
29187        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29188	C_FLAG_REORDER='-xF'
29189	CXX_FLAG_REORDER='-xF'
29190        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29191        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29192        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29193        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29194        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29195        POST_STRIP_CMD="$STRIP -x"
29196        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29197    fi
29198    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29199        # If it is not gcc, then assume it is the MS Visual Studio compiler
29200        COMPILER_NAME=cl
29201        PICFLAG=""
29202        LIBRARY_PREFIX=
29203        SHARED_LIBRARY='$1.dll'
29204        STATIC_LIBRARY='$1.lib'
29205        SHARED_LIBRARY_FLAGS="-LD"
29206        SHARED_LIBRARY_SUFFIX='.dll'
29207        STATIC_LIBRARY_SUFFIX='.lib'
29208        OBJ_SUFFIX='.obj'
29209        EXE_SUFFIX='.exe'
29210        SET_SHARED_LIBRARY_NAME=''
29211        SET_SHARED_LIBRARY_MAPFILE=''
29212        SET_SHARED_LIBRARY_ORIGIN=''
29213        SET_EXECUTABLE_ORIGIN=''
29214    fi
29215fi
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235# The (cross) compiler is now configured, we can now test capabilities
29236# of the target platform.
29237
29238
29239
29240###############################################################################
29241#
29242# Setup the opt flags for different compilers
29243# and different operating systems.
29244#
29245
29246#
29247# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29248#
29249if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29250    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29251    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29252    CFLAGS="$CFLAGS -mstackrealign"
29253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29254$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29255    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29256/* end confdefs.h.  */
29257int main() { return 0; }
29258_ACEOF
29259if ac_fn_cxx_try_link "$LINENO"; then :
29260
29261		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29262$as_echo "yes" >&6; }
29263
29264else
29265
29266		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29267$as_echo "no" >&6; }
29268	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29269
29270fi
29271rm -f core conftest.err conftest.$ac_objext \
29272    conftest$ac_exeext conftest.$ac_ext
29273fi
29274
29275C_FLAG_DEPS="-MMD -MF"
29276CXX_FLAG_DEPS="-MMD -MF"
29277
29278case $COMPILER_TYPE in
29279  CC )
29280    case $COMPILER_NAME in
29281      gcc )
29282      	case $OPENJDK_TARGET_OS in
29283	  macosx )
29284	    # On MacOSX we optimize for size, something
29285	    # we should do for all platforms?
29286	    C_O_FLAG_HI="-Os"
29287	    C_O_FLAG_NORM="-Os"
29288	    C_O_FLAG_NONE=""
29289	    ;;
29290	  *)
29291	    C_O_FLAG_HI="-O3"
29292	    C_O_FLAG_NORM="-O2"
29293	    C_O_FLAG_NONE="-O0"
29294	    ;;
29295	esac
29296        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29297        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29298        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29299        CFLAGS_DEBUG_SYMBOLS="-g"
29300        CXXFLAGS_DEBUG_SYMBOLS="-g"
29301        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29302            CFLAGS_DEBUG_SYMBOLS="-g1"
29303            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29304        fi
29305        ;;
29306      ossc )
29307        #
29308        # Forte has different names for this with their C++ compiler...
29309        #
29310        C_FLAG_DEPS="-xMMD -xMF"
29311        CXX_FLAG_DEPS="-xMMD -xMF"
29312
29313        # Extra options used with HIGHEST
29314        #
29315        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29316        #          done with care, there are some assumptions below that need to
29317        #          be understood about the use of pointers, and IEEE behavior.
29318        #
29319        # Use non-standard floating point mode (not IEEE 754)
29320        CC_HIGHEST="$CC_HIGHEST -fns"
29321        # Do some simplification of floating point arithmetic (not IEEE 754)
29322        CC_HIGHEST="$CC_HIGHEST -fsimple"
29323        # Use single precision floating point with 'float'
29324        CC_HIGHEST="$CC_HIGHEST -fsingle"
29325        # Assume memory references via basic pointer types do not alias
29326        #   (Source with excessing pointer casting and data access with mixed
29327        #    pointer types are not recommended)
29328        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29329        # Use intrinsic or inline versions for math/std functions
29330        #   (If you expect perfect errno behavior, do not use this)
29331        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29332        # Loop data dependency optimizations (need -xO3 or higher)
29333        CC_HIGHEST="$CC_HIGHEST -xdepend"
29334        # Pointer parameters to functions do not overlap
29335        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29336        #    If you pass in multiple pointers to the same data, do not use this)
29337        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29338        # Inline some library routines
29339        #   (If you expect perfect errno behavior, do not use this)
29340        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29341        # Use optimized math routines
29342        #   (If you expect perfect errno behavior, do not use this)
29343        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29344        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29345
29346        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29347          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29348          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29349        fi
29350
29351        case $OPENJDK_TARGET_CPU_ARCH in
29352          x86)
29353            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29354            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29355            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29356            C_O_FLAG_NONE="-xregs=no%frameptr"
29357            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29358            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29359            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29360            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29361            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29362               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29363               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29364            fi
29365            ;;
29366          sparc)
29367            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29368            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29369            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29370            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29371            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29372            C_O_FLAG_NONE=""
29373            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29374            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29375            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29376            CXX_O_FLAG_NONE=""
29377            ;;
29378        esac
29379
29380    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29381    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29382    esac
29383    ;;
29384  CL )
29385    C_O_FLAG_HIGHEST="-O2"
29386    C_O_FLAG_HI="-O1"
29387    C_O_FLAG_NORM="-O1"
29388    C_O_FLAG_NONE="-Od"
29389    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29390    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29391    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29392    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29393    ;;
29394esac
29395
29396if test -z "$C_O_FLAG_HIGHEST"; then
29397   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29398fi
29399
29400if test -z "$CXX_O_FLAG_HIGHEST"; then
29401   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29402fi
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29418   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29419$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29420fi
29421
29422if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29423   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29424$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29425fi
29426
29427if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29428   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29429$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29430fi
29431
29432
29433# Check whether --with-extra-cflags was given.
29434if test "${with_extra_cflags+set}" = set; then :
29435  withval=$with_extra_cflags;
29436fi
29437
29438
29439
29440# Check whether --with-extra-cxxflags was given.
29441if test "${with_extra_cxxflags+set}" = set; then :
29442  withval=$with_extra_cxxflags;
29443fi
29444
29445
29446
29447# Check whether --with-extra-ldflags was given.
29448if test "${with_extra_ldflags+set}" = set; then :
29449  withval=$with_extra_ldflags;
29450fi
29451
29452
29453CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29454CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29455LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29456
29457# Hotspot needs these set in their legacy form
29458LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29459LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29460LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29461
29462
29463
29464
29465
29466###############################################################################
29467#
29468# Now setup the CFLAGS and LDFLAGS for the JDK build.
29469# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29470#
29471case $COMPILER_NAME in
29472      gcc )
29473      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29474                          -pipe \
29475                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29476	  case $OPENJDK_TARGET_CPU_ARCH in
29477	  arm )
29478            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29479	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29480	  ;;
29481	  ppc )
29482            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29483	  ;;
29484	  * )
29485	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29486	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29487          ;;
29488	  esac
29489          ;;
29490      ossc )
29491          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29492          case $OPENJDK_TARGET_CPU_ARCH in
29493          x86 )
29494            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29495       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29496          ;;
29497          esac
29498
29499      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29500      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29501
29502          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29503          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29504          ;;
29505      cl )
29506          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29507               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29508	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29509	       -DWIN32 -DIAL"
29510          case $OPENJDK_TARGET_CPU in
29511              x86 )
29512                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29513                  ;;
29514              x86_64 )
29515                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29516                  ;;
29517          esac
29518          ;;
29519esac
29520
29521###############################################################################
29522
29523# Adjust flags according to debug level.
29524case $DEBUG_LEVEL in
29525      fastdebug )
29526              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29527              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29528	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29529	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29530	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29531	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29532              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29533              ;;
29534      slowdebug )
29535              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29536              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29537	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29538	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29539	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29540	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29541              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29542              ;;
29543esac
29544
29545CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29546
29547# The package path is used only on macosx?
29548PACKAGE_PATH=/opt/local
29549
29550
29551if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29552    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29553    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29554    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29555    #   Note: -Dmacro         is the same as    #define macro 1
29556    #         -Dmacro=	    is the same as    #define macro
29557    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29558        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29559    else
29560        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29561    fi
29562else
29563    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29564fi
29565if test "x$OPENJDK_TARGET_OS" = xlinux; then
29566    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29567fi
29568if test "x$OPENJDK_TARGET_OS" = xwindows; then
29569    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29570fi
29571if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29572    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29573fi
29574if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29575    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29576    # Setting these parameters makes it an error to link to macosx APIs that are
29577    # newer than the given OS version and makes the linked binaries compatible even
29578    # if built on a newer version of the OS.
29579    # The expected format is X.Y.Z
29580    MACOSX_VERSION_MIN=10.7.0
29581
29582    # The macro takes the version with no dots, ex: 1070
29583    # Let the flags variables get resolved in make for easier override on make
29584    # command line.
29585    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29586    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29587fi
29588if test "x$OPENJDK_TARGET_OS" = xbsd; then
29589    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29590fi
29591if test "x$DEBUG_LEVEL" = xrelease; then
29592    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29593    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29594        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29595    fi
29596else
29597    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29598fi
29599
29600CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29601CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29602
29603CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29604        -I${JDK_OUTPUTDIR}/include \
29605        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29606        -I${JDK_TOPDIR}/src/share/javavm/export \
29607        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29608        -I${JDK_TOPDIR}/src/share/native/common \
29609        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29610
29611# The shared libraries are compiled using the picflag.
29612CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29613CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29614
29615# Executable flags
29616CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29617CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29618
29619# Now this is odd. The JDK native libraries have to link against libjvm.so
29620# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29621# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29622# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29623# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29624# libraries will link to whatever is in memory. Yuck.
29625#
29626# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29627if test "x$COMPILER_NAME" = xcl; then
29628    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29629    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29630        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29631    fi
29632    # TODO: make -debug optional "--disable-full-debug-symbols"
29633    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29634    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29635    LDFLAGS_JDKLIB_SUFFIX=""
29636    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29637        LDFLAGS_STACK_SIZE=1048576
29638    else
29639        LDFLAGS_STACK_SIZE=327680
29640    fi
29641    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29642else
29643    if test "x$COMPILER_NAME" = xgcc; then
29644        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29645        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29646        if test -n "$HAS_GNU_HASH"; then
29647            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29648        fi
29649        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29650          # And since we now know that the linker is gnu, then add -z defs, to forbid
29651          # undefined symbols in object files.
29652          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29653          if test "x$DEBUG_LEVEL" = "xrelease"; then
29654              # When building release libraries, tell the linker optimize them.
29655              # Should this be supplied to the OSS linker as well?
29656              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29657          fi
29658        fi
29659    fi
29660    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29661                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29662
29663    # On some platforms (mac) the linker warns about non existing -L dirs.
29664    # Add server first if available. Linking aginst client does not always produce the same results.
29665    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29666    # Default to server for other variants.
29667    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29668        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29669    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29670        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29671    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29672        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29673    else
29674        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29675    fi
29676
29677    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29678    if test "x$COMPILER_NAME" = xossc; then
29679        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29680    fi
29681
29682    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29683    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29684        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29685    fi
29686fi
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702  # Some Zero and Shark settings.
29703  # ZERO_ARCHFLAG tells the compiler which mode to build for
29704  case "${OPENJDK_TARGET_CPU}" in
29705    s390)
29706      ZERO_ARCHFLAG="-m31"
29707      ;;
29708    *)
29709      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29710  esac
29711
29712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29713$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29714  supports=yes
29715
29716  saved_cflags="$CFLAGS"
29717  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29718  ac_ext=c
29719ac_cpp='$CPP $CPPFLAGS'
29720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29722ac_compiler_gnu=$ac_cv_c_compiler_gnu
29723
29724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29725/* end confdefs.h.  */
29726
29727    int i;
29728
29729_ACEOF
29730if ac_fn_c_try_compile "$LINENO"; then :
29731
29732else
29733  supports=no
29734fi
29735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29736  ac_ext=cpp
29737ac_cpp='$CXXCPP $CPPFLAGS'
29738ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29739ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29740ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29741
29742  CFLAGS="$saved_cflags"
29743
29744  saved_cxxflags="$CXXFLAGS"
29745  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29746  ac_ext=cpp
29747ac_cpp='$CXXCPP $CPPFLAGS'
29748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29751
29752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29753/* end confdefs.h.  */
29754
29755    int i;
29756
29757_ACEOF
29758if ac_fn_cxx_try_compile "$LINENO"; then :
29759
29760else
29761  supports=no
29762fi
29763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29764  ac_ext=cpp
29765ac_cpp='$CXXCPP $CPPFLAGS'
29766ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29767ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29768ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29769
29770  CXXFLAGS="$saved_cxxflags"
29771
29772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29773$as_echo "$supports" >&6; }
29774  if test "x$supports" = "xyes" ; then
29775    :
29776  else
29777    ZERO_ARCHFLAG=""
29778  fi
29779
29780
29781
29782  # Check that the compiler supports -mX flags
29783  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29784
29785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29786$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29787  supports=yes
29788
29789  saved_cflags="$CFLAGS"
29790  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29791  ac_ext=c
29792ac_cpp='$CPP $CPPFLAGS'
29793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29795ac_compiler_gnu=$ac_cv_c_compiler_gnu
29796
29797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29798/* end confdefs.h.  */
29799
29800    int i;
29801
29802_ACEOF
29803if ac_fn_c_try_compile "$LINENO"; then :
29804
29805else
29806  supports=no
29807fi
29808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29809  ac_ext=cpp
29810ac_cpp='$CXXCPP $CPPFLAGS'
29811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29814
29815  CFLAGS="$saved_cflags"
29816
29817  saved_cxxflags="$CXXFLAGS"
29818  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29819  ac_ext=cpp
29820ac_cpp='$CXXCPP $CPPFLAGS'
29821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29824
29825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29826/* end confdefs.h.  */
29827
29828    int i;
29829
29830_ACEOF
29831if ac_fn_cxx_try_compile "$LINENO"; then :
29832
29833else
29834  supports=no
29835fi
29836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29837  ac_ext=cpp
29838ac_cpp='$CXXCPP $CPPFLAGS'
29839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29842
29843  CXXFLAGS="$saved_cxxflags"
29844
29845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29846$as_echo "$supports" >&6; }
29847  if test "x$supports" = "xyes" ; then
29848    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29849  else
29850    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29851  fi
29852
29853
29854
29855
29856# Setup debug symbols (need objcopy from the toolchain for that)
29857
29858#
29859# ENABLE_DEBUG_SYMBOLS
29860# This must be done after the toolchain is setup, since we're looking at objcopy.
29861#
29862# Check whether --enable-debug-symbols was given.
29863if test "${enable_debug_symbols+set}" = set; then :
29864  enableval=$enable_debug_symbols;
29865fi
29866
29867
29868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29869$as_echo_n "checking if we should generate debug symbols... " >&6; }
29870
29871if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29872   # explicit enabling of enable-debug-symbols and can't find objcopy
29873   #   this is an error
29874   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29875fi
29876
29877if test "x$enable_debug_symbols" = "xyes"; then
29878  ENABLE_DEBUG_SYMBOLS=true
29879elif test "x$enable_debug_symbols" = "xno"; then
29880  ENABLE_DEBUG_SYMBOLS=false
29881else
29882  # default on macosx is false
29883  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29884    ENABLE_DEBUG_SYMBOLS=false
29885  # Default is on if objcopy is found, otherwise off
29886  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29887    ENABLE_DEBUG_SYMBOLS=true
29888  else
29889    ENABLE_DEBUG_SYMBOLS=false
29890  fi
29891fi
29892
29893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29894$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29895
29896#
29897# ZIP_DEBUGINFO_FILES
29898#
29899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29900$as_echo_n "checking if we should zip debug-info files... " >&6; }
29901# Check whether --enable-zip-debug-info was given.
29902if test "${enable_zip_debug_info+set}" = set; then :
29903  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29904else
29905  enable_zip_debug_info="yes"
29906fi
29907
29908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29909$as_echo "${enable_zip_debug_info}" >&6; }
29910
29911if test "x${enable_zip_debug_info}" = "xno"; then
29912   ZIP_DEBUGINFO_FILES=false
29913else
29914   ZIP_DEBUGINFO_FILES=true
29915fi
29916
29917
29918
29919
29920
29921
29922
29923###############################################################################
29924#
29925# Check dependencies for external and internal libraries.
29926#
29927###############################################################################
29928
29929
29930
29931###############################################################################
29932#
29933# OS specific settings that we never will need to probe.
29934#
29935if test "x$OPENJDK_TARGET_OS" = xlinux; then
29936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29937$as_echo_n "checking what is not needed on Linux?... " >&6; }
29938    PULSE_NOT_NEEDED=yes
29939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29940$as_echo "pulse" >&6; }
29941fi
29942
29943if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29945$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29946    ALSA_NOT_NEEDED=yes
29947    PULSE_NOT_NEEDED=yes
29948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29949$as_echo "alsa pulse" >&6; }
29950fi
29951
29952if test "x$OPENJDK_TARGET_OS" = xwindows; then
29953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29954$as_echo_n "checking what is not needed on Windows?... " >&6; }
29955    CUPS_NOT_NEEDED=yes
29956    ALSA_NOT_NEEDED=yes
29957    PULSE_NOT_NEEDED=yes
29958    X11_NOT_NEEDED=yes
29959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29960$as_echo "alsa cups pulse x11" >&6; }
29961fi
29962
29963if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29965$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29966    ALSA_NOT_NEEDED=yes
29967    PULSE_NOT_NEEDED=yes
29968    X11_NOT_NEEDED=yes
29969    FREETYPE2_NOT_NEEDED=yes
29970    # If the java runtime framework is disabled, then we need X11.
29971    # This will be adjusted below.
29972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29973$as_echo "alsa pulse x11" >&6; }
29974fi
29975
29976if test "x$OPENJDK_TARGET_OS" = xbsd; then
29977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29978$as_echo_n "checking what is not needed on bsd?... " >&6; }
29979    ALSA_NOT_NEEDED=yes
29980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29981$as_echo "alsa" >&6; }
29982fi
29983
29984if test "x$OPENJDK" = "xfalse"; then
29985    FREETYPE2_NOT_NEEDED=yes
29986fi
29987
29988if test "x$SUPPORT_HEADFUL" = xno; then
29989    X11_NOT_NEEDED=yes
29990fi
29991
29992###############################################################################
29993#
29994# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29995# that uses this API.
29996#
29997# Check whether --enable-macosx-runtime-support was given.
29998if test "${enable_macosx_runtime_support+set}" = set; then :
29999  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30000else
30001  MACOSX_RUNTIME_SUPPORT="no"
30002fi
30003
30004
30005USE_MACOSX_RUNTIME_SUPPORT=no
30006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30007$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30008if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30009    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30010        MACOSX_RUNTIME_SUPPORT=yes
30011        USE_MACOSX_RUNTIME_SUPPORT=yes
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30013$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30014    else
30015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30016$as_echo "yes, but explicitly disabled." >&6; }
30017    fi
30018else
30019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30020$as_echo "no" >&6; }
30021fi
30022
30023if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30025$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30026    X11_NOT_NEEDED=
30027    FREETYPE2_NOT_NEEDED=
30028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30029$as_echo "alsa pulse" >&6; }
30030fi
30031
30032
30033
30034###############################################################################
30035#
30036# Check for X Windows
30037#
30038
30039# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30040# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30041# --x-libraries for the sysroot, if that seems to be correct.
30042if test "x$SYS_ROOT" != "x/"; then
30043  if test "x$x_includes" = xNONE; then
30044    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30045      x_includes="$SYS_ROOT/usr/X11R6/include"
30046    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30047      x_includes="$SYS_ROOT/usr/include"
30048    fi
30049  fi
30050  if test "x$x_libraries" = xNONE; then
30051    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30052      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30053    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30054      x_libraries="$SYS_ROOT/usr/lib64"
30055    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30056      x_libraries="$SYS_ROOT/usr/lib"
30057    fi
30058  fi
30059fi
30060
30061# Now let autoconf do it's magic
30062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30063$as_echo_n "checking for X... " >&6; }
30064
30065
30066# Check whether --with-x was given.
30067if test "${with_x+set}" = set; then :
30068  withval=$with_x;
30069fi
30070
30071# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30072if test "x$with_x" = xno; then
30073  # The user explicitly disabled X.
30074  have_x=disabled
30075else
30076  case $x_includes,$x_libraries in #(
30077    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
30078    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30079  $as_echo_n "(cached) " >&6
30080else
30081  # One or both of the vars are not set, and there is no cached value.
30082ac_x_includes=no ac_x_libraries=no
30083rm -f -r conftest.dir
30084if mkdir conftest.dir; then
30085  cd conftest.dir
30086  cat >Imakefile <<'_ACEOF'
30087incroot:
30088	@echo incroot='${INCROOT}'
30089usrlibdir:
30090	@echo usrlibdir='${USRLIBDIR}'
30091libdir:
30092	@echo libdir='${LIBDIR}'
30093_ACEOF
30094  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30095    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30096    for ac_var in incroot usrlibdir libdir; do
30097      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30098    done
30099    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30100    for ac_extension in a so sl dylib la dll; do
30101      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30102	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30103	ac_im_usrlibdir=$ac_im_libdir; break
30104      fi
30105    done
30106    # Screen out bogus values from the imake configuration.  They are
30107    # bogus both because they are the default anyway, and because
30108    # using them would break gcc on systems where it needs fixed includes.
30109    case $ac_im_incroot in
30110	/usr/include) ac_x_includes= ;;
30111	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30112    esac
30113    case $ac_im_usrlibdir in
30114	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30115	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30116    esac
30117  fi
30118  cd ..
30119  rm -f -r conftest.dir
30120fi
30121
30122# Standard set of common directories for X headers.
30123# Check X11 before X11Rn because it is often a symlink to the current release.
30124ac_x_header_dirs='
30125/usr/X11/include
30126/usr/X11R7/include
30127/usr/X11R6/include
30128/usr/X11R5/include
30129/usr/X11R4/include
30130
30131/usr/include/X11
30132/usr/include/X11R7
30133/usr/include/X11R6
30134/usr/include/X11R5
30135/usr/include/X11R4
30136
30137/usr/local/X11/include
30138/usr/local/X11R7/include
30139/usr/local/X11R6/include
30140/usr/local/X11R5/include
30141/usr/local/X11R4/include
30142
30143/usr/local/include/X11
30144/usr/local/include/X11R7
30145/usr/local/include/X11R6
30146/usr/local/include/X11R5
30147/usr/local/include/X11R4
30148
30149/usr/X386/include
30150/usr/x386/include
30151/usr/XFree86/include/X11
30152
30153/usr/include
30154/usr/local/include
30155/usr/unsupported/include
30156/usr/athena/include
30157/usr/local/x11r5/include
30158/usr/lpp/Xamples/include
30159
30160/usr/openwin/include
30161/usr/openwin/share/include'
30162
30163if test "$ac_x_includes" = no; then
30164  # Guess where to find include files, by looking for Xlib.h.
30165  # First, try using that file with no special directory specified.
30166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30167/* end confdefs.h.  */
30168#include <X11/Xlib.h>
30169_ACEOF
30170if ac_fn_cxx_try_cpp "$LINENO"; then :
30171  # We can compile using X headers with no special include directory.
30172ac_x_includes=
30173else
30174  for ac_dir in $ac_x_header_dirs; do
30175  if test -r "$ac_dir/X11/Xlib.h"; then
30176    ac_x_includes=$ac_dir
30177    break
30178  fi
30179done
30180fi
30181rm -f conftest.err conftest.i conftest.$ac_ext
30182fi # $ac_x_includes = no
30183
30184if test "$ac_x_libraries" = no; then
30185  # Check for the libraries.
30186  # See if we find them without any special options.
30187  # Don't add to $LIBS permanently.
30188  ac_save_LIBS=$LIBS
30189  LIBS="-lX11 $LIBS"
30190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30191/* end confdefs.h.  */
30192#include <X11/Xlib.h>
30193int
30194main ()
30195{
30196XrmInitialize ()
30197  ;
30198  return 0;
30199}
30200_ACEOF
30201if ac_fn_cxx_try_link "$LINENO"; then :
30202  LIBS=$ac_save_LIBS
30203# We can link X programs with no special library path.
30204ac_x_libraries=
30205else
30206  LIBS=$ac_save_LIBS
30207for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30208do
30209  # Don't even attempt the hair of trying to link an X program!
30210  for ac_extension in a so sl dylib la dll; do
30211    if test -r "$ac_dir/libX11.$ac_extension"; then
30212      ac_x_libraries=$ac_dir
30213      break 2
30214    fi
30215  done
30216done
30217fi
30218rm -f core conftest.err conftest.$ac_objext \
30219    conftest$ac_exeext conftest.$ac_ext
30220fi # $ac_x_libraries = no
30221
30222case $ac_x_includes,$ac_x_libraries in #(
30223  no,* | *,no | *\'*)
30224    # Didn't find X, or a directory has "'" in its name.
30225    ac_cv_have_x="have_x=no";; #(
30226  *)
30227    # Record where we found X for the cache.
30228    ac_cv_have_x="have_x=yes\
30229	ac_x_includes='$ac_x_includes'\
30230	ac_x_libraries='$ac_x_libraries'"
30231esac
30232fi
30233;; #(
30234    *) have_x=yes;;
30235  esac
30236  eval "$ac_cv_have_x"
30237fi # $with_x != no
30238
30239if test "$have_x" != yes; then
30240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30241$as_echo "$have_x" >&6; }
30242  no_x=yes
30243else
30244  # If each of the values was on the command line, it overrides each guess.
30245  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30246  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30247  # Update the cache value to reflect the command line values.
30248  ac_cv_have_x="have_x=yes\
30249	ac_x_includes='$x_includes'\
30250	ac_x_libraries='$x_libraries'"
30251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30252$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30253fi
30254
30255if test "$no_x" = yes; then
30256  # Not all programs may use this symbol, but it does not hurt to define it.
30257
30258$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30259
30260  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30261else
30262  if test -n "$x_includes"; then
30263    X_CFLAGS="$X_CFLAGS -I$x_includes"
30264  fi
30265
30266  # It would also be nice to do this for all -L options, not just this one.
30267  if test -n "$x_libraries"; then
30268    X_LIBS="$X_LIBS -L$x_libraries"
30269    # For Solaris; some versions of Sun CC require a space after -R and
30270    # others require no space.  Words are not sufficient . . . .
30271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30272$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30273    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30274    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30275    ac_cxx_werror_flag=yes
30276    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30277/* end confdefs.h.  */
30278
30279int
30280main ()
30281{
30282
30283  ;
30284  return 0;
30285}
30286_ACEOF
30287if ac_fn_cxx_try_link "$LINENO"; then :
30288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30289$as_echo "no" >&6; }
30290       X_LIBS="$X_LIBS -R$x_libraries"
30291else
30292  LIBS="$ac_xsave_LIBS -R $x_libraries"
30293       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30294/* end confdefs.h.  */
30295
30296int
30297main ()
30298{
30299
30300  ;
30301  return 0;
30302}
30303_ACEOF
30304if ac_fn_cxx_try_link "$LINENO"; then :
30305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30306$as_echo "yes" >&6; }
30307	  X_LIBS="$X_LIBS -R $x_libraries"
30308else
30309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30310$as_echo "neither works" >&6; }
30311fi
30312rm -f core conftest.err conftest.$ac_objext \
30313    conftest$ac_exeext conftest.$ac_ext
30314fi
30315rm -f core conftest.err conftest.$ac_objext \
30316    conftest$ac_exeext conftest.$ac_ext
30317    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30318    LIBS=$ac_xsave_LIBS
30319  fi
30320
30321  # Check for system-dependent libraries X programs must link with.
30322  # Do this before checking for the system-independent R6 libraries
30323  # (-lICE), since we may need -lsocket or whatever for X linking.
30324
30325  if test "$ISC" = yes; then
30326    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30327  else
30328    # Martyn Johnson says this is needed for Ultrix, if the X
30329    # libraries were built with DECnet support.  And Karl Berry says
30330    # the Alpha needs dnet_stub (dnet does not exist).
30331    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30332    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30333/* end confdefs.h.  */
30334
30335/* Override any GCC internal prototype to avoid an error.
30336   Use char because int might match the return type of a GCC
30337   builtin and then its argument prototype would still apply.  */
30338#ifdef __cplusplus
30339extern "C"
30340#endif
30341char XOpenDisplay ();
30342int
30343main ()
30344{
30345return XOpenDisplay ();
30346  ;
30347  return 0;
30348}
30349_ACEOF
30350if ac_fn_cxx_try_link "$LINENO"; then :
30351
30352else
30353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30354$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30355if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30356  $as_echo_n "(cached) " >&6
30357else
30358  ac_check_lib_save_LIBS=$LIBS
30359LIBS="-ldnet  $LIBS"
30360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30361/* end confdefs.h.  */
30362
30363/* Override any GCC internal prototype to avoid an error.
30364   Use char because int might match the return type of a GCC
30365   builtin and then its argument prototype would still apply.  */
30366#ifdef __cplusplus
30367extern "C"
30368#endif
30369char dnet_ntoa ();
30370int
30371main ()
30372{
30373return dnet_ntoa ();
30374  ;
30375  return 0;
30376}
30377_ACEOF
30378if ac_fn_cxx_try_link "$LINENO"; then :
30379  ac_cv_lib_dnet_dnet_ntoa=yes
30380else
30381  ac_cv_lib_dnet_dnet_ntoa=no
30382fi
30383rm -f core conftest.err conftest.$ac_objext \
30384    conftest$ac_exeext conftest.$ac_ext
30385LIBS=$ac_check_lib_save_LIBS
30386fi
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30388$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30389if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30390  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30391fi
30392
30393    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30395$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30396if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30397  $as_echo_n "(cached) " >&6
30398else
30399  ac_check_lib_save_LIBS=$LIBS
30400LIBS="-ldnet_stub  $LIBS"
30401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30402/* end confdefs.h.  */
30403
30404/* Override any GCC internal prototype to avoid an error.
30405   Use char because int might match the return type of a GCC
30406   builtin and then its argument prototype would still apply.  */
30407#ifdef __cplusplus
30408extern "C"
30409#endif
30410char dnet_ntoa ();
30411int
30412main ()
30413{
30414return dnet_ntoa ();
30415  ;
30416  return 0;
30417}
30418_ACEOF
30419if ac_fn_cxx_try_link "$LINENO"; then :
30420  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30421else
30422  ac_cv_lib_dnet_stub_dnet_ntoa=no
30423fi
30424rm -f core conftest.err conftest.$ac_objext \
30425    conftest$ac_exeext conftest.$ac_ext
30426LIBS=$ac_check_lib_save_LIBS
30427fi
30428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30429$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30430if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30431  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30432fi
30433
30434    fi
30435fi
30436rm -f core conftest.err conftest.$ac_objext \
30437    conftest$ac_exeext conftest.$ac_ext
30438    LIBS="$ac_xsave_LIBS"
30439
30440    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30441    # to get the SysV transport functions.
30442    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30443    # needs -lnsl.
30444    # The nsl library prevents programs from opening the X display
30445    # on Irix 5.2, according to T.E. Dickey.
30446    # The functions gethostbyname, getservbyname, and inet_addr are
30447    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30448    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30449if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30450
30451fi
30452
30453    if test $ac_cv_func_gethostbyname = no; then
30454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30455$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30456if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30457  $as_echo_n "(cached) " >&6
30458else
30459  ac_check_lib_save_LIBS=$LIBS
30460LIBS="-lnsl  $LIBS"
30461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30462/* end confdefs.h.  */
30463
30464/* Override any GCC internal prototype to avoid an error.
30465   Use char because int might match the return type of a GCC
30466   builtin and then its argument prototype would still apply.  */
30467#ifdef __cplusplus
30468extern "C"
30469#endif
30470char gethostbyname ();
30471int
30472main ()
30473{
30474return gethostbyname ();
30475  ;
30476  return 0;
30477}
30478_ACEOF
30479if ac_fn_cxx_try_link "$LINENO"; then :
30480  ac_cv_lib_nsl_gethostbyname=yes
30481else
30482  ac_cv_lib_nsl_gethostbyname=no
30483fi
30484rm -f core conftest.err conftest.$ac_objext \
30485    conftest$ac_exeext conftest.$ac_ext
30486LIBS=$ac_check_lib_save_LIBS
30487fi
30488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30489$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30490if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30491  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30492fi
30493
30494      if test $ac_cv_lib_nsl_gethostbyname = no; then
30495	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30496$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30497if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30498  $as_echo_n "(cached) " >&6
30499else
30500  ac_check_lib_save_LIBS=$LIBS
30501LIBS="-lbsd  $LIBS"
30502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30503/* end confdefs.h.  */
30504
30505/* Override any GCC internal prototype to avoid an error.
30506   Use char because int might match the return type of a GCC
30507   builtin and then its argument prototype would still apply.  */
30508#ifdef __cplusplus
30509extern "C"
30510#endif
30511char gethostbyname ();
30512int
30513main ()
30514{
30515return gethostbyname ();
30516  ;
30517  return 0;
30518}
30519_ACEOF
30520if ac_fn_cxx_try_link "$LINENO"; then :
30521  ac_cv_lib_bsd_gethostbyname=yes
30522else
30523  ac_cv_lib_bsd_gethostbyname=no
30524fi
30525rm -f core conftest.err conftest.$ac_objext \
30526    conftest$ac_exeext conftest.$ac_ext
30527LIBS=$ac_check_lib_save_LIBS
30528fi
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30530$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30531if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30532  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30533fi
30534
30535      fi
30536    fi
30537
30538    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30539    # socket/setsockopt and other routines are undefined under SCO ODT
30540    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30541    # on later versions), says Simon Leinen: it contains gethostby*
30542    # variants that don't use the name server (or something).  -lsocket
30543    # must be given before -lnsl if both are needed.  We assume that
30544    # if connect needs -lnsl, so does gethostbyname.
30545    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30546if test "x$ac_cv_func_connect" = x""yes; then :
30547
30548fi
30549
30550    if test $ac_cv_func_connect = no; then
30551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30552$as_echo_n "checking for connect in -lsocket... " >&6; }
30553if test "${ac_cv_lib_socket_connect+set}" = set; then :
30554  $as_echo_n "(cached) " >&6
30555else
30556  ac_check_lib_save_LIBS=$LIBS
30557LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30559/* end confdefs.h.  */
30560
30561/* Override any GCC internal prototype to avoid an error.
30562   Use char because int might match the return type of a GCC
30563   builtin and then its argument prototype would still apply.  */
30564#ifdef __cplusplus
30565extern "C"
30566#endif
30567char connect ();
30568int
30569main ()
30570{
30571return connect ();
30572  ;
30573  return 0;
30574}
30575_ACEOF
30576if ac_fn_cxx_try_link "$LINENO"; then :
30577  ac_cv_lib_socket_connect=yes
30578else
30579  ac_cv_lib_socket_connect=no
30580fi
30581rm -f core conftest.err conftest.$ac_objext \
30582    conftest$ac_exeext conftest.$ac_ext
30583LIBS=$ac_check_lib_save_LIBS
30584fi
30585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30586$as_echo "$ac_cv_lib_socket_connect" >&6; }
30587if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30588  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30589fi
30590
30591    fi
30592
30593    # Guillermo Gomez says -lposix is necessary on A/UX.
30594    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30595if test "x$ac_cv_func_remove" = x""yes; then :
30596
30597fi
30598
30599    if test $ac_cv_func_remove = no; then
30600      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30601$as_echo_n "checking for remove in -lposix... " >&6; }
30602if test "${ac_cv_lib_posix_remove+set}" = set; then :
30603  $as_echo_n "(cached) " >&6
30604else
30605  ac_check_lib_save_LIBS=$LIBS
30606LIBS="-lposix  $LIBS"
30607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30608/* end confdefs.h.  */
30609
30610/* Override any GCC internal prototype to avoid an error.
30611   Use char because int might match the return type of a GCC
30612   builtin and then its argument prototype would still apply.  */
30613#ifdef __cplusplus
30614extern "C"
30615#endif
30616char remove ();
30617int
30618main ()
30619{
30620return remove ();
30621  ;
30622  return 0;
30623}
30624_ACEOF
30625if ac_fn_cxx_try_link "$LINENO"; then :
30626  ac_cv_lib_posix_remove=yes
30627else
30628  ac_cv_lib_posix_remove=no
30629fi
30630rm -f core conftest.err conftest.$ac_objext \
30631    conftest$ac_exeext conftest.$ac_ext
30632LIBS=$ac_check_lib_save_LIBS
30633fi
30634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30635$as_echo "$ac_cv_lib_posix_remove" >&6; }
30636if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30637  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30638fi
30639
30640    fi
30641
30642    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30643    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30644if test "x$ac_cv_func_shmat" = x""yes; then :
30645
30646fi
30647
30648    if test $ac_cv_func_shmat = no; then
30649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30650$as_echo_n "checking for shmat in -lipc... " >&6; }
30651if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30652  $as_echo_n "(cached) " >&6
30653else
30654  ac_check_lib_save_LIBS=$LIBS
30655LIBS="-lipc  $LIBS"
30656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30657/* end confdefs.h.  */
30658
30659/* Override any GCC internal prototype to avoid an error.
30660   Use char because int might match the return type of a GCC
30661   builtin and then its argument prototype would still apply.  */
30662#ifdef __cplusplus
30663extern "C"
30664#endif
30665char shmat ();
30666int
30667main ()
30668{
30669return shmat ();
30670  ;
30671  return 0;
30672}
30673_ACEOF
30674if ac_fn_cxx_try_link "$LINENO"; then :
30675  ac_cv_lib_ipc_shmat=yes
30676else
30677  ac_cv_lib_ipc_shmat=no
30678fi
30679rm -f core conftest.err conftest.$ac_objext \
30680    conftest$ac_exeext conftest.$ac_ext
30681LIBS=$ac_check_lib_save_LIBS
30682fi
30683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30684$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30685if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30686  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30687fi
30688
30689    fi
30690  fi
30691
30692  # Check for libraries that X11R6 Xt/Xaw programs need.
30693  ac_save_LDFLAGS=$LDFLAGS
30694  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30695  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30696  # check for ICE first), but we must link in the order -lSM -lICE or
30697  # we get undefined symbols.  So assume we have SM if we have ICE.
30698  # These have to be linked with before -lX11, unlike the other
30699  # libraries we check for below, so use a different variable.
30700  # John Interrante, Karl Berry
30701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30702$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30703if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30704  $as_echo_n "(cached) " >&6
30705else
30706  ac_check_lib_save_LIBS=$LIBS
30707LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30709/* end confdefs.h.  */
30710
30711/* Override any GCC internal prototype to avoid an error.
30712   Use char because int might match the return type of a GCC
30713   builtin and then its argument prototype would still apply.  */
30714#ifdef __cplusplus
30715extern "C"
30716#endif
30717char IceConnectionNumber ();
30718int
30719main ()
30720{
30721return IceConnectionNumber ();
30722  ;
30723  return 0;
30724}
30725_ACEOF
30726if ac_fn_cxx_try_link "$LINENO"; then :
30727  ac_cv_lib_ICE_IceConnectionNumber=yes
30728else
30729  ac_cv_lib_ICE_IceConnectionNumber=no
30730fi
30731rm -f core conftest.err conftest.$ac_objext \
30732    conftest$ac_exeext conftest.$ac_ext
30733LIBS=$ac_check_lib_save_LIBS
30734fi
30735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30736$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30737if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30738  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30739fi
30740
30741  LDFLAGS=$ac_save_LDFLAGS
30742
30743fi
30744
30745
30746# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30747# this doesn't make sense so we remove it.
30748if test "x$COMPILE_TYPE" = xcross; then
30749  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30750fi
30751
30752if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30753
30754    # Print a helpful message on how to acquire the necessary build dependency.
30755    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30756    MISSING_DEPENDENCY=x11
30757    PKGHANDLER_COMMAND=
30758
30759    case $PKGHANDLER in
30760	apt-get)
30761                apt_help     $MISSING_DEPENDENCY ;;
30762    yum)
30763                yum_help     $MISSING_DEPENDENCY ;;
30764	port)
30765                port_help    $MISSING_DEPENDENCY ;;
30766	pkgutil)
30767                pkgutil_help $MISSING_DEPENDENCY ;;
30768	pkgadd)
30769                pkgadd_help  $MISSING_DEPENDENCY ;;
30770    * )
30771      break ;;
30772    esac
30773
30774    if test "x$PKGHANDLER_COMMAND" != x; then
30775        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30776    fi
30777
30778    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30779fi
30780
30781# Some of the old makefiles require a setting of OPENWIN_HOME
30782# Since the X11R6 directory has disappeared on later Linuxes,
30783# we need to probe for it.
30784if test "x$OPENJDK_TARGET_OS" = xlinux; then
30785    if test -d "$SYS_ROOT/usr/X11R6"; then
30786        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30787    elif test -d "$SYS_ROOT/usr/include/X11"; then
30788        OPENWIN_HOME="$SYS_ROOT/usr"
30789    fi
30790fi
30791if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30792    OPENWIN_HOME="/usr/openwin"
30793fi
30794
30795
30796
30797#
30798# Weird Sol10 something check...TODO change to try compile
30799#
30800if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30801  if test "`uname -r`" = "5.10"; then
30802     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30803     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30804     fi
30805  fi
30806fi
30807
30808ac_ext=c
30809ac_cpp='$CPP $CPPFLAGS'
30810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30812ac_compiler_gnu=$ac_cv_c_compiler_gnu
30813
30814OLD_CFLAGS="$CFLAGS"
30815CFLAGS="$CFLAGS $X_CFLAGS"
30816
30817# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30818for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30819do :
30820  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30821ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30822                   # include <X11/Xutil.h>
30823
30824"
30825if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30826  cat >>confdefs.h <<_ACEOF
30827#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30828_ACEOF
30829 X11_A_OK=yes
30830else
30831  X11_A_OK=no; break
30832fi
30833
30834done
30835
30836
30837CFLAGS="$OLD_CFLAGS"
30838ac_ext=cpp
30839ac_cpp='$CXXCPP $CPPFLAGS'
30840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30843
30844
30845if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30846
30847    # Print a helpful message on how to acquire the necessary build dependency.
30848    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30849    MISSING_DEPENDENCY=x11
30850    PKGHANDLER_COMMAND=
30851
30852    case $PKGHANDLER in
30853	apt-get)
30854                apt_help     $MISSING_DEPENDENCY ;;
30855    yum)
30856                yum_help     $MISSING_DEPENDENCY ;;
30857	port)
30858                port_help    $MISSING_DEPENDENCY ;;
30859	pkgutil)
30860                pkgutil_help $MISSING_DEPENDENCY ;;
30861	pkgadd)
30862                pkgadd_help  $MISSING_DEPENDENCY ;;
30863    * )
30864      break ;;
30865    esac
30866
30867    if test "x$PKGHANDLER_COMMAND" != x; then
30868        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30869    fi
30870
30871    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30872fi
30873
30874
30875
30876
30877
30878
30879###############################################################################
30880#
30881# The common unix printing system cups is used to print from java.
30882#
30883
30884# Check whether --with-cups was given.
30885if test "${with_cups+set}" = set; then :
30886  withval=$with_cups;
30887fi
30888
30889
30890# Check whether --with-cups-include was given.
30891if test "${with_cups_include+set}" = set; then :
30892  withval=$with_cups_include;
30893fi
30894
30895
30896if test "x$CUPS_NOT_NEEDED" = xyes; then
30897	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30898		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30899$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30900	fi
30901	CUPS_CFLAGS=
30902else
30903	CUPS_FOUND=no
30904
30905	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30906	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30907	fi
30908
30909	if test "x${with_cups}" != x; then
30910	    CUPS_CFLAGS="-I${with_cups}/include"
30911	    CUPS_FOUND=yes
30912	fi
30913	if test "x${with_cups_include}" != x; then
30914	    CUPS_CFLAGS="-I${with_cups_include}"
30915	    CUPS_FOUND=yes
30916	fi
30917	if test "x$CUPS_FOUND" = xno; then
30918
30919
30920    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30921        # Source the builddeps file again, to make sure it uses the latest variables!
30922        . $builddepsfile
30923        # Look for a target and build machine specific resource!
30924        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30925        if test "x$resource" = x; then
30926            # Ok, lets instead look for a target specific resource
30927            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30928        fi
30929        if test "x$resource" = x; then
30930            # Ok, lets instead look for a build specific resource
30931            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30932        fi
30933        if test "x$resource" = x; then
30934            # Ok, lets instead look for a generic resource
30935            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30936            resource=${builddep_cups}
30937        fi
30938        if test "x$resource" != x; then
30939            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30940$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30941	    # If the resource in the builddeps.conf file is an existing directory,
30942	    # for example /java/linux/cups
30943	    if test -d ${resource}; then
30944	       depdir=${resource}
30945	    else
30946
30947# cups is for example mymodule
30948# $resource is for example libs/general/libmymod_1_2_3.zip
30949# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30950# $with_builddeps_dir is for example /localhome/builddeps
30951# depdir is the name of the variable into which we store the depdir, eg MYMOD
30952# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30953# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30954    filename=`basename $resource`
30955    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30956    filebase=${filename%%.*}
30957    extension=${filename#*.}
30958    installdir=$with_builddeps_dir/$filebase
30959    if test ! -f $installdir/$filename.unpacked; then
30960        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30961$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30962        if test ! -d $installdir; then
30963            mkdir -p $installdir
30964        fi
30965        if test ! -d $installdir; then
30966            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30967        fi
30968        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30969        touch $tmpfile
30970        if test ! -f $tmpfile; then
30971            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30972        fi
30973
30974    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30975    # $tmpfile is the local file name for the downloaded file.
30976    VALID_TOOL=no
30977    if test "x$BDEPS_FTP" = xwget; then
30978       VALID_TOOL=yes
30979       wget -O $tmpfile $with_builddeps_server/$resource
30980    fi
30981    if test "x$BDEPS_FTP" = xlftp; then
30982       VALID_TOOL=yes
30983       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30984    fi
30985    if test "x$BDEPS_FTP" = xftp; then
30986        VALID_TOOL=yes
30987        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30988        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30989        FTPUSERPWD=${FTPSERVER%%@*}
30990        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30991            FTPUSER=${userpwd%%:*}
30992            FTPPWD=${userpwd#*@}
30993            FTPSERVER=${FTPSERVER#*@}
30994        else
30995            FTPUSER=ftp
30996            FTPPWD=ftp
30997        fi
30998        # the "pass" command does not work on some
30999        # ftp clients (read ftp.exe) but if it works,
31000        # passive mode is better!
31001        (\
31002            echo "user $FTPUSER $FTPPWD"        ;\
31003            echo "pass"                         ;\
31004            echo "bin"                          ;\
31005            echo "get $FTPPATH $tmpfile"              ;\
31006        ) | ftp -in $FTPSERVER
31007    fi
31008    if test "x$VALID_TOOL" != xyes; then
31009       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31010    fi
31011
31012        mv $tmpfile $installdir/$filename
31013        if test ! -s $installdir/$filename; then
31014            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31015        fi
31016        case "$extension" in
31017            zip)  echo "Unzipping $installdir/$filename..."
31018               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31019            ;;
31020            tar.gz) echo "Untaring $installdir/$filename..."
31021               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31022            ;;
31023            tgz) echo "Untaring $installdir/$filename..."
31024               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31025            ;;
31026            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31027            ;;
31028        esac
31029    fi
31030    if test -f $installdir/$filename.unpacked; then
31031        depdir=$installdir
31032    fi
31033
31034	    fi
31035            # Source the builddeps file again, because in the previous command, the depdir
31036            # was updated to point at the current build dependency install directory.
31037            . $builddepsfile
31038            # Now extract variables from the builddeps.conf files.
31039            theroot=${builddep_cups_ROOT}
31040            thecflags=${builddep_cups_CFLAGS}
31041            thelibs=${builddep_cups_LIBS}
31042            if test "x$depdir" = x; then
31043                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31044            fi
31045            CUPS=$depdir
31046            if test "x$theroot" != x; then
31047               CUPS="$theroot"
31048            fi
31049            if test "x$thecflags" != x; then
31050               CUPS_CFLAGS="$thecflags"
31051            fi
31052            if test "x$thelibs" != x; then
31053               CUPS_LIBS="$thelibs"
31054            fi
31055            CUPS_FOUND=yes
31056
31057        fi
31058
31059    fi
31060
31061	fi
31062	if test "x$CUPS_FOUND" = xno; then
31063	    # Are the cups headers installed in the default /usr/include location?
31064	    for ac_header in cups/cups.h cups/ppd.h
31065do :
31066  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31067ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31068if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31069  cat >>confdefs.h <<_ACEOF
31070#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31071_ACEOF
31072 CUPS_FOUND=yes
31073	                      CUPS_CFLAGS=
31074	                      DEFAULT_CUPS=yes
31075fi
31076
31077done
31078
31079	fi
31080	if test "x$CUPS_FOUND" = xno; then
31081	    # Getting nervous now? Lets poke around for standard Solaris third-party
31082	    # package installation locations.
31083	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31084$as_echo_n "checking for cups headers... " >&6; }
31085	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31086	       # An SFW package seems to be installed!
31087	       CUPS_FOUND=yes
31088	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31089	    elif test -s /opt/csw/include/cups/cups.h; then
31090	       # A CSW package seems to be installed!
31091	       CUPS_FOUND=yes
31092	       CUPS_CFLAGS="-I/opt/csw/include"
31093	    fi
31094	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31095$as_echo "$CUPS_FOUND" >&6; }
31096	fi
31097	if test "x$CUPS_FOUND" = xno; then
31098
31099    # Print a helpful message on how to acquire the necessary build dependency.
31100    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31101    MISSING_DEPENDENCY=cups
31102    PKGHANDLER_COMMAND=
31103
31104    case $PKGHANDLER in
31105	apt-get)
31106                apt_help     $MISSING_DEPENDENCY ;;
31107    yum)
31108                yum_help     $MISSING_DEPENDENCY ;;
31109	port)
31110                port_help    $MISSING_DEPENDENCY ;;
31111	pkgutil)
31112                pkgutil_help $MISSING_DEPENDENCY ;;
31113	pkgadd)
31114                pkgadd_help  $MISSING_DEPENDENCY ;;
31115    * )
31116      break ;;
31117    esac
31118
31119    if test "x$PKGHANDLER_COMMAND" != x; then
31120        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31121    fi
31122
31123	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31124	fi
31125fi
31126
31127
31128
31129
31130
31131
31132###############################################################################
31133#
31134# The ubiquitous freetype2 library is used to render fonts.
31135#
31136
31137# Check whether --with-freetype was given.
31138if test "${with_freetype+set}" = set; then :
31139  withval=$with_freetype;
31140fi
31141
31142
31143# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31144USING_SYSTEM_FT_LIB=false
31145
31146if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31147	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31148		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31149$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31150	fi
31151	FREETYPE2_CFLAGS=
31152	FREETYPE2_LIBS=
31153        FREETYPE2_LIB_PATH=
31154else
31155	FREETYPE2_FOUND=no
31156
31157	if test "x$with_freetype" != x; then
31158
31159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31160
31161  # Input might be given as Windows format, start by converting to
31162  # unix format.
31163  path="$with_freetype"
31164  new_path=`$CYGPATH -u "$path"`
31165
31166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31169  # "foo.exe" is OK but "foo" is an error.
31170  #
31171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31172  # It is also a way to make sure we got the proper file name for the real test later on.
31173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31174  if test "x$test_shortpath" = x; then
31175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31176$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31177    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31178  fi
31179
31180  # Call helper function which possibly converts this using DOS-style short mode.
31181  # If so, the updated path is stored in $new_path.
31182
31183  input_path="$new_path"
31184  # Check if we need to convert this using DOS-style short mode. If the path
31185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31186  # take no chances and rewrite it.
31187  # Note: m4 eats our [], so we need to use [ and ] instead.
31188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31189  if test "x$has_forbidden_chars" != x; then
31190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31194      # Going to short mode and back again did indeed matter. Since short mode is
31195      # case insensitive, let's make it lowercase to improve readability.
31196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31197      # Now convert it back to Unix-stile (cygpath)
31198      input_path=`$CYGPATH -u "$shortmode_path"`
31199      new_path="$input_path"
31200    fi
31201  fi
31202
31203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31204  if test "x$test_cygdrive_prefix" = x; then
31205    # As a simple fix, exclude /usr/bin since it's not a real path.
31206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31208      # a path prefixed by /cygdrive for fixpath to work.
31209      new_path="$CYGWIN_ROOT_PATH$input_path"
31210    fi
31211  fi
31212
31213
31214  if test "x$path" != "x$new_path"; then
31215    with_freetype="$new_path"
31216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31217$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31218  fi
31219
31220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31221
31222  path="$with_freetype"
31223  has_colon=`$ECHO $path | $GREP ^.:`
31224  new_path="$path"
31225  if test "x$has_colon" = x; then
31226    # Not in mixed or Windows style, start by that.
31227    new_path=`cmd //c echo $path`
31228  fi
31229
31230
31231  input_path="$new_path"
31232  # Check if we need to convert this using DOS-style short mode. If the path
31233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31234  # take no chances and rewrite it.
31235  # Note: m4 eats our [], so we need to use [ and ] instead.
31236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31237  if test "x$has_forbidden_chars" != x; then
31238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31240  fi
31241
31242
31243  windows_path="$new_path"
31244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31245    unix_path=`$CYGPATH -u "$windows_path"`
31246    new_path="$unix_path"
31247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31249    new_path="$unix_path"
31250  fi
31251
31252  if test "x$path" != "x$new_path"; then
31253    with_freetype="$new_path"
31254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31255$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31256  fi
31257
31258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31260
31261  else
31262    # We're on a posix platform. Hooray! :)
31263    path="$with_freetype"
31264    has_space=`$ECHO "$path" | $GREP " "`
31265    if test "x$has_space" != x; then
31266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31267$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31268      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31269    fi
31270
31271    # Use eval to expand a potential ~
31272    eval path="$path"
31273    if test ! -f "$path" && test ! -d "$path"; then
31274      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31275    fi
31276
31277    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31278  fi
31279
31280	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31281            FREETYPE2_LIB_PATH="$with_freetype/lib"
31282            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31283                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31284                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31285            fi
31286            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31287                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31288            fi
31289	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31290            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31291                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31292            fi
31293 	    FREETYPE2_FOUND=yes
31294   	    if test "x$FREETYPE2_FOUND" = xyes; then
31295	        # Verify that the directories exist
31296                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31297		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31298		fi
31299	        # List the contents of the lib.
31300		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31301                if test "x$FREETYPELIB" = x; then
31302		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31303		fi
31304	        # Check one h-file
31305                if ! test -s "$with_freetype/include/ft2build.h"; then
31306		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31307		fi
31308            fi
31309        fi
31310	if test "x$FREETYPE2_FOUND" = xno; then
31311
31312
31313    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31314        # Source the builddeps file again, to make sure it uses the latest variables!
31315        . $builddepsfile
31316        # Look for a target and build machine specific resource!
31317        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31318        if test "x$resource" = x; then
31319            # Ok, lets instead look for a target specific resource
31320            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31321        fi
31322        if test "x$resource" = x; then
31323            # Ok, lets instead look for a build specific resource
31324            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31325        fi
31326        if test "x$resource" = x; then
31327            # Ok, lets instead look for a generic resource
31328            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31329            resource=${builddep_freetype2}
31330        fi
31331        if test "x$resource" != x; then
31332            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31333$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31334	    # If the resource in the builddeps.conf file is an existing directory,
31335	    # for example /java/linux/cups
31336	    if test -d ${resource}; then
31337	       depdir=${resource}
31338	    else
31339
31340# freetype2 is for example mymodule
31341# $resource is for example libs/general/libmymod_1_2_3.zip
31342# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31343# $with_builddeps_dir is for example /localhome/builddeps
31344# depdir is the name of the variable into which we store the depdir, eg MYMOD
31345# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31346# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31347    filename=`basename $resource`
31348    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31349    filebase=${filename%%.*}
31350    extension=${filename#*.}
31351    installdir=$with_builddeps_dir/$filebase
31352    if test ! -f $installdir/$filename.unpacked; then
31353        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31354$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31355        if test ! -d $installdir; then
31356            mkdir -p $installdir
31357        fi
31358        if test ! -d $installdir; then
31359            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31360        fi
31361        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31362        touch $tmpfile
31363        if test ! -f $tmpfile; then
31364            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31365        fi
31366
31367    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31368    # $tmpfile is the local file name for the downloaded file.
31369    VALID_TOOL=no
31370    if test "x$BDEPS_FTP" = xwget; then
31371       VALID_TOOL=yes
31372       wget -O $tmpfile $with_builddeps_server/$resource
31373    fi
31374    if test "x$BDEPS_FTP" = xlftp; then
31375       VALID_TOOL=yes
31376       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31377    fi
31378    if test "x$BDEPS_FTP" = xftp; then
31379        VALID_TOOL=yes
31380        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31381        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31382        FTPUSERPWD=${FTPSERVER%%@*}
31383        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31384            FTPUSER=${userpwd%%:*}
31385            FTPPWD=${userpwd#*@}
31386            FTPSERVER=${FTPSERVER#*@}
31387        else
31388            FTPUSER=ftp
31389            FTPPWD=ftp
31390        fi
31391        # the "pass" command does not work on some
31392        # ftp clients (read ftp.exe) but if it works,
31393        # passive mode is better!
31394        (\
31395            echo "user $FTPUSER $FTPPWD"        ;\
31396            echo "pass"                         ;\
31397            echo "bin"                          ;\
31398            echo "get $FTPPATH $tmpfile"              ;\
31399        ) | ftp -in $FTPSERVER
31400    fi
31401    if test "x$VALID_TOOL" != xyes; then
31402       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31403    fi
31404
31405        mv $tmpfile $installdir/$filename
31406        if test ! -s $installdir/$filename; then
31407            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31408        fi
31409        case "$extension" in
31410            zip)  echo "Unzipping $installdir/$filename..."
31411               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31412            ;;
31413            tar.gz) echo "Untaring $installdir/$filename..."
31414               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31415            ;;
31416            tgz) echo "Untaring $installdir/$filename..."
31417               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31418            ;;
31419            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31420            ;;
31421        esac
31422    fi
31423    if test -f $installdir/$filename.unpacked; then
31424        depdir=$installdir
31425    fi
31426
31427	    fi
31428            # Source the builddeps file again, because in the previous command, the depdir
31429            # was updated to point at the current build dependency install directory.
31430            . $builddepsfile
31431            # Now extract variables from the builddeps.conf files.
31432            theroot=${builddep_freetype2_ROOT}
31433            thecflags=${builddep_freetype2_CFLAGS}
31434            thelibs=${builddep_freetype2_LIBS}
31435            if test "x$depdir" = x; then
31436                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31437            fi
31438            FREETYPE2=$depdir
31439            if test "x$theroot" != x; then
31440               FREETYPE2="$theroot"
31441            fi
31442            if test "x$thecflags" != x; then
31443               FREETYPE2_CFLAGS="$thecflags"
31444            fi
31445            if test "x$thelibs" != x; then
31446               FREETYPE2_LIBS="$thelibs"
31447            fi
31448            FREETYPE2_FOUND=yes
31449            else FREETYPE2_FOUND=no
31450
31451        fi
31452        else FREETYPE2_FOUND=no
31453
31454    fi
31455
31456            USING_SYSTEM_FT_LIB=true
31457	fi
31458	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31459            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31460
31461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31462
31463  # Input might be given as Windows format, start by converting to
31464  # unix format.
31465  path="$FREETYPELOCATION"
31466  new_path=`$CYGPATH -u "$path"`
31467
31468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31471  # "foo.exe" is OK but "foo" is an error.
31472  #
31473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31474  # It is also a way to make sure we got the proper file name for the real test later on.
31475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31476  if test "x$test_shortpath" = x; then
31477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31478$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31479    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31480  fi
31481
31482  # Call helper function which possibly converts this using DOS-style short mode.
31483  # If so, the updated path is stored in $new_path.
31484
31485  input_path="$new_path"
31486  # Check if we need to convert this using DOS-style short mode. If the path
31487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31488  # take no chances and rewrite it.
31489  # Note: m4 eats our [], so we need to use [ and ] instead.
31490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31491  if test "x$has_forbidden_chars" != x; then
31492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31496      # Going to short mode and back again did indeed matter. Since short mode is
31497      # case insensitive, let's make it lowercase to improve readability.
31498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31499      # Now convert it back to Unix-stile (cygpath)
31500      input_path=`$CYGPATH -u "$shortmode_path"`
31501      new_path="$input_path"
31502    fi
31503  fi
31504
31505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31506  if test "x$test_cygdrive_prefix" = x; then
31507    # As a simple fix, exclude /usr/bin since it's not a real path.
31508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31510      # a path prefixed by /cygdrive for fixpath to work.
31511      new_path="$CYGWIN_ROOT_PATH$input_path"
31512    fi
31513  fi
31514
31515
31516  if test "x$path" != "x$new_path"; then
31517    FREETYPELOCATION="$new_path"
31518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31519$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31520  fi
31521
31522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31523
31524  path="$FREETYPELOCATION"
31525  has_colon=`$ECHO $path | $GREP ^.:`
31526  new_path="$path"
31527  if test "x$has_colon" = x; then
31528    # Not in mixed or Windows style, start by that.
31529    new_path=`cmd //c echo $path`
31530  fi
31531
31532
31533  input_path="$new_path"
31534  # Check if we need to convert this using DOS-style short mode. If the path
31535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31536  # take no chances and rewrite it.
31537  # Note: m4 eats our [], so we need to use [ and ] instead.
31538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31539  if test "x$has_forbidden_chars" != x; then
31540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31542  fi
31543
31544
31545  windows_path="$new_path"
31546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31547    unix_path=`$CYGPATH -u "$windows_path"`
31548    new_path="$unix_path"
31549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31551    new_path="$unix_path"
31552  fi
31553
31554  if test "x$path" != "x$new_path"; then
31555    FREETYPELOCATION="$new_path"
31556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31557$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31558  fi
31559
31560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31562
31563  else
31564    # We're on a posix platform. Hooray! :)
31565    path="$FREETYPELOCATION"
31566    has_space=`$ECHO "$path" | $GREP " "`
31567    if test "x$has_space" != x; then
31568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31569$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31570      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31571    fi
31572
31573    # Use eval to expand a potential ~
31574    eval path="$path"
31575    if test ! -f "$path" && test ! -d "$path"; then
31576      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31577    fi
31578
31579    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31580  fi
31581
31582	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31583$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31584	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31585	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31586	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31587 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31588                if ! test -s "$FREETYPE2_LIBS"; then
31589		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31590		fi
31591                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31592		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31593		fi
31594                USING_SYSTEM_FT_LIB=true
31595                FREETYPE2_FOUND=yes
31596	    fi
31597	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31598$as_echo "$FREETYPE2_FOUND" >&6; }
31599        fi
31600	if test "x$FREETYPE2_FOUND" = xno; then
31601
31602pkg_failed=no
31603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31604$as_echo_n "checking for FREETYPE2... " >&6; }
31605
31606if test -n "$FREETYPE2_CFLAGS"; then
31607    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31608 elif test -n "$PKG_CONFIG"; then
31609    if test -n "$PKG_CONFIG" && \
31610    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31611  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31612  ac_status=$?
31613  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31614  test $ac_status = 0; }; then
31615  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31616else
31617  pkg_failed=yes
31618fi
31619 else
31620    pkg_failed=untried
31621fi
31622if test -n "$FREETYPE2_LIBS"; then
31623    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31624 elif test -n "$PKG_CONFIG"; then
31625    if test -n "$PKG_CONFIG" && \
31626    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31627  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31628  ac_status=$?
31629  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31630  test $ac_status = 0; }; then
31631  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31632else
31633  pkg_failed=yes
31634fi
31635 else
31636    pkg_failed=untried
31637fi
31638
31639
31640
31641if test $pkg_failed = yes; then
31642
31643if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31644        _pkg_short_errors_supported=yes
31645else
31646        _pkg_short_errors_supported=no
31647fi
31648        if test $_pkg_short_errors_supported = yes; then
31649	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31650        else
31651	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31652        fi
31653	# Put the nasty error message in config.log where it belongs
31654	echo "$FREETYPE2_PKG_ERRORS" >&5
31655
31656	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31657$as_echo "no" >&6; }
31658                FREETYPE2_FOUND=no
31659elif test $pkg_failed = untried; then
31660	FREETYPE2_FOUND=no
31661else
31662	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31663	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31665$as_echo "yes" >&6; }
31666	FREETYPE2_FOUND=yes
31667fi
31668            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31669            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31670            USING_SYSTEM_FT_LIB=true
31671            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31672            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31673              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31674            fi
31675	fi
31676	if test "x$FREETYPE2_FOUND" = xno; then
31677	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31678$as_echo_n "checking for freetype in some standard locations... " >&6; }
31679
31680	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31681	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31682	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31683	    fi
31684	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31685	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31686	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31687	    fi
31688
31689	    PREV_CXXCFLAGS="$CXXFLAGS"
31690	    PREV_LDFLAGS="$LDFLAGS"
31691	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31692	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31693	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31694/* end confdefs.h.  */
31695#include<ft2build.h>
31696	                    #include FT_FREETYPE_H
31697	                   int main() { return 0; }
31698
31699_ACEOF
31700if ac_fn_cxx_try_link "$LINENO"; then :
31701
31702	                      # Yes, the default cflags and libs did the trick.
31703	                      FREETYPE2_FOUND=yes
31704	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31705	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31706
31707else
31708
31709	                      FREETYPE2_FOUND=no
31710
31711fi
31712rm -f core conftest.err conftest.$ac_objext \
31713    conftest$ac_exeext conftest.$ac_ext
31714            CXXCFLAGS="$PREV_CXXFLAGS"
31715	    LDFLAGS="$PREV_LDFLAGS"
31716	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31717$as_echo "$FREETYPE2_FOUND" >&6; }
31718            USING_SYSTEM_FT_LIB=true
31719	fi
31720	if test "x$FREETYPE2_FOUND" = xno; then
31721
31722    # Print a helpful message on how to acquire the necessary build dependency.
31723    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31724    MISSING_DEPENDENCY=freetype2
31725    PKGHANDLER_COMMAND=
31726
31727    case $PKGHANDLER in
31728	apt-get)
31729                apt_help     $MISSING_DEPENDENCY ;;
31730    yum)
31731                yum_help     $MISSING_DEPENDENCY ;;
31732	port)
31733                port_help    $MISSING_DEPENDENCY ;;
31734	pkgutil)
31735                pkgutil_help $MISSING_DEPENDENCY ;;
31736	pkgadd)
31737                pkgadd_help  $MISSING_DEPENDENCY ;;
31738    * )
31739      break ;;
31740    esac
31741
31742    if test "x$PKGHANDLER_COMMAND" != x; then
31743        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31744    fi
31745
31746		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31747	fi
31748
31749        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31750            # AC_CHECK_LIB does not support use of cl.exe
31751            PREV_LDFLAGS="$LDFLAGS"
31752            LDFLAGS="$FREETYPE2_LIBS"
31753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31754$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31755if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31756  $as_echo_n "(cached) " >&6
31757else
31758  ac_check_lib_save_LIBS=$LIBS
31759LIBS="-lfreetype  $LIBS"
31760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31761/* end confdefs.h.  */
31762
31763/* Override any GCC internal prototype to avoid an error.
31764   Use char because int might match the return type of a GCC
31765   builtin and then its argument prototype would still apply.  */
31766#ifdef __cplusplus
31767extern "C"
31768#endif
31769char FT_Init_FreeType ();
31770int
31771main ()
31772{
31773return FT_Init_FreeType ();
31774  ;
31775  return 0;
31776}
31777_ACEOF
31778if ac_fn_cxx_try_link "$LINENO"; then :
31779  ac_cv_lib_freetype_FT_Init_FreeType=yes
31780else
31781  ac_cv_lib_freetype_FT_Init_FreeType=no
31782fi
31783rm -f core conftest.err conftest.$ac_objext \
31784    conftest$ac_exeext conftest.$ac_ext
31785LIBS=$ac_check_lib_save_LIBS
31786fi
31787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31788$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31789if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31790  FREETYPE2_FOUND=true
31791else
31792  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31793fi
31794
31795            LDFLAGS="$PREV_LDFLAGS"
31796        fi
31797fi
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807###############################################################################
31808#
31809# Check for alsa headers and libraries. Used on Linux/GNU systems.
31810#
31811
31812# Check whether --with-alsa was given.
31813if test "${with_alsa+set}" = set; then :
31814  withval=$with_alsa;
31815fi
31816
31817
31818# Check whether --with-alsa-include was given.
31819if test "${with_alsa_include+set}" = set; then :
31820  withval=$with_alsa_include;
31821fi
31822
31823
31824# Check whether --with-alsa-lib was given.
31825if test "${with_alsa_lib+set}" = set; then :
31826  withval=$with_alsa_lib;
31827fi
31828
31829
31830if test "x$ALSA_NOT_NEEDED" = xyes; then
31831	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31832		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31833$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31834	fi
31835	ALSA_CFLAGS=
31836	ALSA_LIBS=
31837else
31838	ALSA_FOUND=no
31839
31840	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31841	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31842	fi
31843
31844	if test "x${with_alsa}" != x; then
31845	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31846	    ALSA_CFLAGS="-I${with_alsa}/include"
31847	    ALSA_FOUND=yes
31848	fi
31849	if test "x${with_alsa_include}" != x; then
31850	    ALSA_CFLAGS="-I${with_alsa_include}"
31851	    ALSA_FOUND=yes
31852	fi
31853	if test "x${with_alsa_lib}" != x; then
31854	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31855	    ALSA_FOUND=yes
31856	fi
31857	if test "x$ALSA_FOUND" = xno; then
31858
31859
31860    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31861        # Source the builddeps file again, to make sure it uses the latest variables!
31862        . $builddepsfile
31863        # Look for a target and build machine specific resource!
31864        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31865        if test "x$resource" = x; then
31866            # Ok, lets instead look for a target specific resource
31867            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31868        fi
31869        if test "x$resource" = x; then
31870            # Ok, lets instead look for a build specific resource
31871            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31872        fi
31873        if test "x$resource" = x; then
31874            # Ok, lets instead look for a generic resource
31875            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31876            resource=${builddep_alsa}
31877        fi
31878        if test "x$resource" != x; then
31879            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31880$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31881	    # If the resource in the builddeps.conf file is an existing directory,
31882	    # for example /java/linux/cups
31883	    if test -d ${resource}; then
31884	       depdir=${resource}
31885	    else
31886
31887# alsa is for example mymodule
31888# $resource is for example libs/general/libmymod_1_2_3.zip
31889# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31890# $with_builddeps_dir is for example /localhome/builddeps
31891# depdir is the name of the variable into which we store the depdir, eg MYMOD
31892# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31893# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31894    filename=`basename $resource`
31895    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31896    filebase=${filename%%.*}
31897    extension=${filename#*.}
31898    installdir=$with_builddeps_dir/$filebase
31899    if test ! -f $installdir/$filename.unpacked; then
31900        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31901$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31902        if test ! -d $installdir; then
31903            mkdir -p $installdir
31904        fi
31905        if test ! -d $installdir; then
31906            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31907        fi
31908        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31909        touch $tmpfile
31910        if test ! -f $tmpfile; then
31911            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31912        fi
31913
31914    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31915    # $tmpfile is the local file name for the downloaded file.
31916    VALID_TOOL=no
31917    if test "x$BDEPS_FTP" = xwget; then
31918       VALID_TOOL=yes
31919       wget -O $tmpfile $with_builddeps_server/$resource
31920    fi
31921    if test "x$BDEPS_FTP" = xlftp; then
31922       VALID_TOOL=yes
31923       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31924    fi
31925    if test "x$BDEPS_FTP" = xftp; then
31926        VALID_TOOL=yes
31927        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31928        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31929        FTPUSERPWD=${FTPSERVER%%@*}
31930        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31931            FTPUSER=${userpwd%%:*}
31932            FTPPWD=${userpwd#*@}
31933            FTPSERVER=${FTPSERVER#*@}
31934        else
31935            FTPUSER=ftp
31936            FTPPWD=ftp
31937        fi
31938        # the "pass" command does not work on some
31939        # ftp clients (read ftp.exe) but if it works,
31940        # passive mode is better!
31941        (\
31942            echo "user $FTPUSER $FTPPWD"        ;\
31943            echo "pass"                         ;\
31944            echo "bin"                          ;\
31945            echo "get $FTPPATH $tmpfile"              ;\
31946        ) | ftp -in $FTPSERVER
31947    fi
31948    if test "x$VALID_TOOL" != xyes; then
31949       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31950    fi
31951
31952        mv $tmpfile $installdir/$filename
31953        if test ! -s $installdir/$filename; then
31954            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31955        fi
31956        case "$extension" in
31957            zip)  echo "Unzipping $installdir/$filename..."
31958               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31959            ;;
31960            tar.gz) echo "Untaring $installdir/$filename..."
31961               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31962            ;;
31963            tgz) echo "Untaring $installdir/$filename..."
31964               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31965            ;;
31966            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31967            ;;
31968        esac
31969    fi
31970    if test -f $installdir/$filename.unpacked; then
31971        depdir=$installdir
31972    fi
31973
31974	    fi
31975            # Source the builddeps file again, because in the previous command, the depdir
31976            # was updated to point at the current build dependency install directory.
31977            . $builddepsfile
31978            # Now extract variables from the builddeps.conf files.
31979            theroot=${builddep_alsa_ROOT}
31980            thecflags=${builddep_alsa_CFLAGS}
31981            thelibs=${builddep_alsa_LIBS}
31982            if test "x$depdir" = x; then
31983                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31984            fi
31985            ALSA=$depdir
31986            if test "x$theroot" != x; then
31987               ALSA="$theroot"
31988            fi
31989            if test "x$thecflags" != x; then
31990               ALSA_CFLAGS="$thecflags"
31991            fi
31992            if test "x$thelibs" != x; then
31993               ALSA_LIBS="$thelibs"
31994            fi
31995            ALSA_FOUND=yes
31996            else ALSA_FOUND=no
31997
31998        fi
31999        else ALSA_FOUND=no
32000
32001    fi
32002
32003	fi
32004	if test "x$ALSA_FOUND" = xno; then
32005
32006pkg_failed=no
32007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32008$as_echo_n "checking for ALSA... " >&6; }
32009
32010if test -n "$ALSA_CFLAGS"; then
32011    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32012 elif test -n "$PKG_CONFIG"; then
32013    if test -n "$PKG_CONFIG" && \
32014    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32015  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32016  ac_status=$?
32017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32018  test $ac_status = 0; }; then
32019  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32020else
32021  pkg_failed=yes
32022fi
32023 else
32024    pkg_failed=untried
32025fi
32026if test -n "$ALSA_LIBS"; then
32027    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32028 elif test -n "$PKG_CONFIG"; then
32029    if test -n "$PKG_CONFIG" && \
32030    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32031  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32032  ac_status=$?
32033  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32034  test $ac_status = 0; }; then
32035  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32036else
32037  pkg_failed=yes
32038fi
32039 else
32040    pkg_failed=untried
32041fi
32042
32043
32044
32045if test $pkg_failed = yes; then
32046
32047if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32048        _pkg_short_errors_supported=yes
32049else
32050        _pkg_short_errors_supported=no
32051fi
32052        if test $_pkg_short_errors_supported = yes; then
32053	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32054        else
32055	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32056        fi
32057	# Put the nasty error message in config.log where it belongs
32058	echo "$ALSA_PKG_ERRORS" >&5
32059
32060	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32061$as_echo "no" >&6; }
32062                ALSA_FOUND=no
32063elif test $pkg_failed = untried; then
32064	ALSA_FOUND=no
32065else
32066	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32067	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32069$as_echo "yes" >&6; }
32070	ALSA_FOUND=yes
32071fi
32072	fi
32073	if test "x$ALSA_FOUND" = xno; then
32074	    for ac_header in alsa/asoundlib.h
32075do :
32076  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32077if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32078  cat >>confdefs.h <<_ACEOF
32079#define HAVE_ALSA_ASOUNDLIB_H 1
32080_ACEOF
32081 ALSA_FOUND=yes
32082	                      ALSA_CFLAGS=-Iignoreme
32083	                      ALSA_LIBS=-lasound
32084	                      DEFAULT_ALSA=yes
32085else
32086  ALSA_FOUND=no
32087fi
32088
32089done
32090
32091	fi
32092	if test "x$ALSA_FOUND" = xno; then
32093
32094    # Print a helpful message on how to acquire the necessary build dependency.
32095    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32096    MISSING_DEPENDENCY=alsa
32097    PKGHANDLER_COMMAND=
32098
32099    case $PKGHANDLER in
32100	apt-get)
32101                apt_help     $MISSING_DEPENDENCY ;;
32102    yum)
32103                yum_help     $MISSING_DEPENDENCY ;;
32104	port)
32105                port_help    $MISSING_DEPENDENCY ;;
32106	pkgutil)
32107                pkgutil_help $MISSING_DEPENDENCY ;;
32108	pkgadd)
32109                pkgadd_help  $MISSING_DEPENDENCY ;;
32110    * )
32111      break ;;
32112    esac
32113
32114    if test "x$PKGHANDLER_COMMAND" != x; then
32115        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32116    fi
32117
32118	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32119	fi
32120fi
32121
32122
32123
32124
32125
32126
32127
32128###############################################################################
32129#
32130# Check for the jpeg library
32131#
32132
32133USE_EXTERNAL_LIBJPEG=true
32134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32135$as_echo_n "checking for main in -ljpeg... " >&6; }
32136if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32137  $as_echo_n "(cached) " >&6
32138else
32139  ac_check_lib_save_LIBS=$LIBS
32140LIBS="-ljpeg  $LIBS"
32141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32142/* end confdefs.h.  */
32143
32144
32145int
32146main ()
32147{
32148return main ();
32149  ;
32150  return 0;
32151}
32152_ACEOF
32153if ac_fn_cxx_try_link "$LINENO"; then :
32154  ac_cv_lib_jpeg_main=yes
32155else
32156  ac_cv_lib_jpeg_main=no
32157fi
32158rm -f core conftest.err conftest.$ac_objext \
32159    conftest$ac_exeext conftest.$ac_ext
32160LIBS=$ac_check_lib_save_LIBS
32161fi
32162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32163$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32164if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32165  cat >>confdefs.h <<_ACEOF
32166#define HAVE_LIBJPEG 1
32167_ACEOF
32168
32169  LIBS="-ljpeg $LIBS"
32170
32171else
32172   USE_EXTERNAL_LIBJPEG=false
32173               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32174$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32175
32176fi
32177
32178
32179
32180###############################################################################
32181#
32182# Check for the gif library
32183#
32184
32185
32186# Check whether --with-giflib was given.
32187if test "${with_giflib+set}" = set; then :
32188  withval=$with_giflib;
32189fi
32190
32191
32192
32193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32194$as_echo_n "checking for which giflib to use... " >&6; }
32195
32196# default is bundled
32197DEFAULT_GIFLIB=bundled
32198
32199#
32200# if user didn't specify, use DEFAULT_GIFLIB
32201#
32202if test "x${with_giflib}" = "x"; then
32203    with_giflib=${DEFAULT_GIFLIB}
32204fi
32205
32206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32207$as_echo "${with_giflib}" >&6; }
32208
32209if test "x${with_giflib}" = "xbundled"; then
32210    USE_EXTERNAL_LIBGIF=false
32211elif test "x${with_giflib}" = "xsystem"; then
32212    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32213if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32214
32215else
32216   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32217fi
32218
32219
32220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32221$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32222if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32223  $as_echo_n "(cached) " >&6
32224else
32225  ac_check_lib_save_LIBS=$LIBS
32226LIBS="-lgif  $LIBS"
32227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32228/* end confdefs.h.  */
32229
32230/* Override any GCC internal prototype to avoid an error.
32231   Use char because int might match the return type of a GCC
32232   builtin and then its argument prototype would still apply.  */
32233#ifdef __cplusplus
32234extern "C"
32235#endif
32236char DGifGetCode ();
32237int
32238main ()
32239{
32240return DGifGetCode ();
32241  ;
32242  return 0;
32243}
32244_ACEOF
32245if ac_fn_cxx_try_link "$LINENO"; then :
32246  ac_cv_lib_gif_DGifGetCode=yes
32247else
32248  ac_cv_lib_gif_DGifGetCode=no
32249fi
32250rm -f core conftest.err conftest.$ac_objext \
32251    conftest$ac_exeext conftest.$ac_ext
32252LIBS=$ac_check_lib_save_LIBS
32253fi
32254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32255$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32256if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32257  cat >>confdefs.h <<_ACEOF
32258#define HAVE_LIBGIF 1
32259_ACEOF
32260
32261  LIBS="-lgif $LIBS"
32262
32263else
32264   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32265fi
32266
32267
32268    USE_EXTERNAL_LIBGIF=true
32269else
32270    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32271fi
32272
32273
32274###############################################################################
32275#
32276# Check for the zlib library
32277#
32278
32279
32280# Check whether --with-zlib was given.
32281if test "${with_zlib+set}" = set; then :
32282  withval=$with_zlib;
32283fi
32284
32285
32286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32287$as_echo_n "checking for compress in -lz... " >&6; }
32288if test "${ac_cv_lib_z_compress+set}" = set; then :
32289  $as_echo_n "(cached) " >&6
32290else
32291  ac_check_lib_save_LIBS=$LIBS
32292LIBS="-lz  $LIBS"
32293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32294/* end confdefs.h.  */
32295
32296/* Override any GCC internal prototype to avoid an error.
32297   Use char because int might match the return type of a GCC
32298   builtin and then its argument prototype would still apply.  */
32299#ifdef __cplusplus
32300extern "C"
32301#endif
32302char compress ();
32303int
32304main ()
32305{
32306return compress ();
32307  ;
32308  return 0;
32309}
32310_ACEOF
32311if ac_fn_cxx_try_link "$LINENO"; then :
32312  ac_cv_lib_z_compress=yes
32313else
32314  ac_cv_lib_z_compress=no
32315fi
32316rm -f core conftest.err conftest.$ac_objext \
32317    conftest$ac_exeext conftest.$ac_ext
32318LIBS=$ac_check_lib_save_LIBS
32319fi
32320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32321$as_echo "$ac_cv_lib_z_compress" >&6; }
32322if test "x$ac_cv_lib_z_compress" = x""yes; then :
32323   ZLIB_FOUND=yes
32324else
32325   ZLIB_FOUND=no
32326fi
32327
32328
32329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32330$as_echo_n "checking for which zlib to use... " >&6; }
32331
32332DEFAULT_ZLIB=bundled
32333if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32334#
32335# On macosx default is system...on others default is
32336#
32337    DEFAULT_ZLIB=system
32338fi
32339
32340if test "x${ZLIB_FOUND}" != "xyes"; then
32341#
32342# If we don't find any system...set default to bundled
32343#
32344    DEFAULT_ZLIB=bundled
32345fi
32346
32347#
32348# If user didn't specify, use DEFAULT_ZLIB
32349#
32350if test "x${with_zlib}" = "x"; then
32351    with_zlib=${DEFAULT_ZLIB}
32352fi
32353
32354if test "x${with_zlib}" = "xbundled"; then
32355    USE_EXTERNAL_LIBZ=false
32356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32357$as_echo "bundled" >&6; }
32358elif test "x${with_zlib}" = "xsystem"; then
32359    if test "x${ZLIB_FOUND}" = "xyes"; then
32360        USE_EXTERNAL_LIBZ=true
32361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32362$as_echo "system" >&6; }
32363    else
32364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32365$as_echo "system not found" >&6; }
32366        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32367    fi
32368else
32369    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32370fi
32371
32372
32373
32374###############################################################################
32375LIBZIP_CAN_USE_MMAP=true
32376
32377
32378
32379###############################################################################
32380#
32381# Check if altzone exists in time.h
32382#
32383
32384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32385/* end confdefs.h.  */
32386#include <time.h>
32387int
32388main ()
32389{
32390return (int)altzone;
32391  ;
32392  return 0;
32393}
32394_ACEOF
32395if ac_fn_cxx_try_link "$LINENO"; then :
32396  has_altzone=yes
32397else
32398  has_altzone=no
32399fi
32400rm -f core conftest.err conftest.$ac_objext \
32401    conftest$ac_exeext conftest.$ac_ext
32402if test "x$has_altzone" = xyes; then
32403
32404$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32405
32406fi
32407
32408###############################################################################
32409#
32410# Check the maths library
32411#
32412
32413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32414$as_echo_n "checking for cos in -lm... " >&6; }
32415if test "${ac_cv_lib_m_cos+set}" = set; then :
32416  $as_echo_n "(cached) " >&6
32417else
32418  ac_check_lib_save_LIBS=$LIBS
32419LIBS="-lm  $LIBS"
32420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32421/* end confdefs.h.  */
32422
32423/* Override any GCC internal prototype to avoid an error.
32424   Use char because int might match the return type of a GCC
32425   builtin and then its argument prototype would still apply.  */
32426#ifdef __cplusplus
32427extern "C"
32428#endif
32429char cos ();
32430int
32431main ()
32432{
32433return cos ();
32434  ;
32435  return 0;
32436}
32437_ACEOF
32438if ac_fn_cxx_try_link "$LINENO"; then :
32439  ac_cv_lib_m_cos=yes
32440else
32441  ac_cv_lib_m_cos=no
32442fi
32443rm -f core conftest.err conftest.$ac_objext \
32444    conftest$ac_exeext conftest.$ac_ext
32445LIBS=$ac_check_lib_save_LIBS
32446fi
32447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32448$as_echo "$ac_cv_lib_m_cos" >&6; }
32449if test "x$ac_cv_lib_m_cos" = x""yes; then :
32450  cat >>confdefs.h <<_ACEOF
32451#define HAVE_LIBM 1
32452_ACEOF
32453
32454  LIBS="-lm $LIBS"
32455
32456else
32457
32458                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32459$as_echo "$as_me: Maths library was not found" >&6;}
32460
32461fi
32462
32463
32464
32465###############################################################################
32466#
32467# Check for libdl.so
32468
32469save_LIBS="$LIBS"
32470LIBS=""
32471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32472$as_echo_n "checking for dlopen in -ldl... " >&6; }
32473if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32474  $as_echo_n "(cached) " >&6
32475else
32476  ac_check_lib_save_LIBS=$LIBS
32477LIBS="-ldl  $LIBS"
32478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32479/* end confdefs.h.  */
32480
32481/* Override any GCC internal prototype to avoid an error.
32482   Use char because int might match the return type of a GCC
32483   builtin and then its argument prototype would still apply.  */
32484#ifdef __cplusplus
32485extern "C"
32486#endif
32487char dlopen ();
32488int
32489main ()
32490{
32491return dlopen ();
32492  ;
32493  return 0;
32494}
32495_ACEOF
32496if ac_fn_cxx_try_link "$LINENO"; then :
32497  ac_cv_lib_dl_dlopen=yes
32498else
32499  ac_cv_lib_dl_dlopen=no
32500fi
32501rm -f core conftest.err conftest.$ac_objext \
32502    conftest$ac_exeext conftest.$ac_ext
32503LIBS=$ac_check_lib_save_LIBS
32504fi
32505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32506$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32507if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32508  cat >>confdefs.h <<_ACEOF
32509#define HAVE_LIBDL 1
32510_ACEOF
32511
32512  LIBS="-ldl $LIBS"
32513
32514fi
32515
32516LIBDL="$LIBS"
32517
32518LIBS="$save_LIBS"
32519
32520
32521
32522###############################################################################
32523#
32524# statically link libstdc++ before C++ ABI is stablized on Linux unless
32525# dynamic build is configured on command line.
32526#
32527
32528# Check whether --with-stdc++lib was given.
32529if test "${with_stdc__lib+set}" = set; then :
32530  withval=$with_stdc__lib;
32531    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32532        && test "x$with_stdc__lib" != xdefault; then
32533      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32534    fi
32535
32536else
32537  with_stdc__lib=default
32538
32539fi
32540
32541
32542if test "x$OPENJDK_TARGET_OS" = xlinux; then
32543    # Test if -lstdc++ works.
32544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32545$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32546    ac_ext=cpp
32547ac_cpp='$CXXCPP $CPPFLAGS'
32548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32551
32552    OLD_CXXFLAGS="$CXXFLAGS"
32553    CXXFLAGS="$CXXFLAGS -lstdc++"
32554    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32555/* end confdefs.h.  */
32556
32557int
32558main ()
32559{
32560return 0;
32561  ;
32562  return 0;
32563}
32564_ACEOF
32565if ac_fn_cxx_try_link "$LINENO"; then :
32566  has_dynamic_libstdcxx=yes
32567else
32568  has_dynamic_libstdcxx=no
32569fi
32570rm -f core conftest.err conftest.$ac_objext \
32571    conftest$ac_exeext conftest.$ac_ext
32572    CXXFLAGS="$OLD_CXXFLAGS"
32573    ac_ext=cpp
32574ac_cpp='$CXXCPP $CPPFLAGS'
32575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32578
32579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32580$as_echo "$has_dynamic_libstdcxx" >&6; }
32581
32582    # Test if stdc++ can be linked statically.
32583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32584$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32585    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32586    ac_ext=cpp
32587ac_cpp='$CXXCPP $CPPFLAGS'
32588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32591
32592    OLD_LIBS="$LIBS"
32593    OLD_CXX="$CXX"
32594    LIBS="$STATIC_STDCXX_FLAGS"
32595    CXX="$CC"
32596    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32597/* end confdefs.h.  */
32598
32599int
32600main ()
32601{
32602return 0;
32603  ;
32604  return 0;
32605}
32606_ACEOF
32607if ac_fn_cxx_try_link "$LINENO"; then :
32608  has_static_libstdcxx=yes
32609else
32610  has_static_libstdcxx=no
32611fi
32612rm -f core conftest.err conftest.$ac_objext \
32613    conftest$ac_exeext conftest.$ac_ext
32614    LIBS="$OLD_LIBS"
32615    CXX="$OLD_CXX"
32616    ac_ext=cpp
32617ac_cpp='$CXXCPP $CPPFLAGS'
32618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32621
32622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32623$as_echo "$has_static_libstdcxx" >&6; }
32624
32625    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32626        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32627    fi
32628
32629    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32630        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32631    fi
32632
32633    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32634        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32635    fi
32636
32637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32638$as_echo_n "checking how to link with libstdc++... " >&6; }
32639    # If dynamic was requested, it's available since it would fail above otherwise.
32640    # If dynamic wasn't requested, go with static unless it isn't available.
32641    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32642        LIBCXX="$LIBCXX -lstdc++"
32643        LDCXX="$CXX"
32644        STATIC_CXX_SETTING="STATIC_CXX=false"
32645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32646$as_echo "dynamic" >&6; }
32647    else
32648        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32649        LDCXX="$CC"
32650        STATIC_CXX_SETTING="STATIC_CXX=true"
32651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32652$as_echo "static" >&6; }
32653    fi
32654fi
32655
32656
32657if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32658    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32659
32660pkg_failed=no
32661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32662$as_echo_n "checking for LIBFFI... " >&6; }
32663
32664if test -n "$LIBFFI_CFLAGS"; then
32665    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32666 elif test -n "$PKG_CONFIG"; then
32667    if test -n "$PKG_CONFIG" && \
32668    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32669  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32670  ac_status=$?
32671  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32672  test $ac_status = 0; }; then
32673  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32674else
32675  pkg_failed=yes
32676fi
32677 else
32678    pkg_failed=untried
32679fi
32680if test -n "$LIBFFI_LIBS"; then
32681    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32682 elif test -n "$PKG_CONFIG"; then
32683    if test -n "$PKG_CONFIG" && \
32684    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32685  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32686  ac_status=$?
32687  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32688  test $ac_status = 0; }; then
32689  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32690else
32691  pkg_failed=yes
32692fi
32693 else
32694    pkg_failed=untried
32695fi
32696
32697
32698
32699if test $pkg_failed = yes; then
32700
32701if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32702        _pkg_short_errors_supported=yes
32703else
32704        _pkg_short_errors_supported=no
32705fi
32706        if test $_pkg_short_errors_supported = yes; then
32707	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32708        else
32709	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32710        fi
32711	# Put the nasty error message in config.log where it belongs
32712	echo "$LIBFFI_PKG_ERRORS" >&5
32713
32714	as_fn_error $? "Package requirements (libffi) were not met:
32715
32716$LIBFFI_PKG_ERRORS
32717
32718Consider adjusting the PKG_CONFIG_PATH environment variable if you
32719installed software in a non-standard prefix.
32720
32721Alternatively, you may set the environment variables LIBFFI_CFLAGS
32722and LIBFFI_LIBS to avoid the need to call pkg-config.
32723See the pkg-config man page for more details.
32724" "$LINENO" 5
32725elif test $pkg_failed = untried; then
32726	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32728as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32729is in your PATH or set the PKG_CONFIG environment variable to the full
32730path to pkg-config.
32731
32732Alternatively, you may set the environment variables LIBFFI_CFLAGS
32733and LIBFFI_LIBS to avoid the need to call pkg-config.
32734See the pkg-config man page for more details.
32735
32736To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32737See \`config.log' for more details" "$LINENO" 5 ; }
32738else
32739	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32740	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32742$as_echo "yes" >&6; }
32743	:
32744fi
32745
32746fi
32747
32748if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32749    # Extract the first word of "llvm-config", so it can be a program name with args.
32750set dummy llvm-config; ac_word=$2
32751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32752$as_echo_n "checking for $ac_word... " >&6; }
32753if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32754  $as_echo_n "(cached) " >&6
32755else
32756  if test -n "$LLVM_CONFIG"; then
32757  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32758else
32759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32760for as_dir in $PATH
32761do
32762  IFS=$as_save_IFS
32763  test -z "$as_dir" && as_dir=.
32764    for ac_exec_ext in '' $ac_executable_extensions; do
32765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32766    ac_cv_prog_LLVM_CONFIG="llvm-config"
32767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32768    break 2
32769  fi
32770done
32771  done
32772IFS=$as_save_IFS
32773
32774fi
32775fi
32776LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32777if test -n "$LLVM_CONFIG"; then
32778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32779$as_echo "$LLVM_CONFIG" >&6; }
32780else
32781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32782$as_echo "no" >&6; }
32783fi
32784
32785
32786
32787    if test "x$LLVM_CONFIG" != xllvm-config; then
32788        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32789    fi
32790
32791    llvm_components="jit mcjit engine nativecodegen native"
32792    unset LLVM_CFLAGS
32793    for flag in $("$LLVM_CONFIG" --cxxflags); do
32794      if echo "${flag}" | grep -q '^-[ID]'; then
32795        if test "${flag}" != "-D_DEBUG" ; then
32796          if test "${LLVM_CFLAGS}" != "" ; then
32797            LLVM_CFLAGS="${LLVM_CFLAGS} "
32798          fi
32799          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32800        fi
32801      fi
32802    done
32803    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32804    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32805
32806    unset LLVM_LDFLAGS
32807    for flag in $("${LLVM_CONFIG}" --ldflags); do
32808      if echo "${flag}" | grep -q '^-L'; then
32809        if test "${LLVM_LDFLAGS}" != ""; then
32810          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32811        fi
32812        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32813      fi
32814    done
32815
32816    unset LLVM_LIBS
32817    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32818      if echo "${flag}" | grep -q '^-l'; then
32819        if test "${LLVM_LIBS}" != ""; then
32820          LLVM_LIBS="${LLVM_LIBS} "
32821        fi
32822        LLVM_LIBS="${LLVM_LIBS}${flag}"
32823      fi
32824    done
32825
32826
32827
32828
32829fi
32830
32831# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32832if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32833    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32834fi
32835
32836# TODO better (platform agnostic) test
32837if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32838    LIBCXX="-lstdc++"
32839fi
32840
32841
32842
32843
32844
32845# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32846
32847# When using cygwin or msys, we need a wrapper binary that renames
32848# /cygdrive/c/ arguments into c:/ arguments and peeks into
32849# @files and rewrites these too! This wrapper binary is
32850# called fixpath.
32851FIXPATH=
32852if test "x$OPENJDK_BUILD_OS" = xwindows; then
32853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32854$as_echo_n "checking if fixpath can be created... " >&6; }
32855    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32856    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32857    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32858      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32859      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32860      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32861      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32862    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32863      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32864      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32865
32866      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32867      # @ was chosen as separator to minimize risk of other tools messing around with it
32868      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32869      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32870
32871      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32872    fi
32873    rm -f $OUTPUT_ROOT/fixpath*
32874    cd $OUTPUT_ROOT
32875    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32876    cd $CURDIR
32877
32878    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32880$as_echo "no" >&6; }
32881        cat $OUTPUT_ROOT/fixpath1.log
32882        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32883    fi
32884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32885$as_echo "yes" >&6; }
32886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32887$as_echo_n "checking if fixpath.exe works... " >&6; }
32888    cd $OUTPUT_ROOT
32889    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32890    cd $CURDIR
32891    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32893$as_echo "no" >&6; }
32894        cat $OUTPUT_ROOT/fixpath2.log
32895        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32896    fi
32897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32898$as_echo "yes" >&6; }
32899    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32900fi
32901
32902
32903
32904
32905###############################################################################
32906#
32907# We need to do some final tweaking, when everything else is done.
32908#
32909###############################################################################
32910
32911
32912HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32913
32914
32915# The name of the Service Agent jar.
32916SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32917if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32918  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32919fi
32920
32921
32922
32923
32924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32925$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32926
32927if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32928    ENABLE_INTREE_EC=yes
32929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32930$as_echo "yes" >&6; }
32931else
32932    ENABLE_INTREE_EC=no
32933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32934$as_echo "no" >&6; }
32935fi
32936
32937
32938
32939
32940###############################################################################
32941#
32942# Configure parts of the build that only affect the build performance,
32943# not the result.
32944#
32945###############################################################################
32946
32947
32948  # How many cores do we have on this build system?
32949
32950# Check whether --with-num-cores was given.
32951if test "${with_num_cores+set}" = set; then :
32952  withval=$with_num_cores;
32953fi
32954
32955  if test "x$with_num_cores" = x; then
32956    # The number of cores were not specified, try to probe them.
32957
32958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32959$as_echo_n "checking for number of cores... " >&6; }
32960    NUM_CORES=1
32961    FOUND_CORES=no
32962
32963    if test -f /proc/cpuinfo; then
32964        # Looks like a Linux (or cygwin) system
32965        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32966        FOUND_CORES=yes
32967    elif test -x /usr/sbin/psrinfo; then
32968        # Looks like a Solaris system
32969        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32970        FOUND_CORES=yes
32971    elif test -x /usr/sbin/system_profiler; then
32972        # Looks like a MacOSX system
32973        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32974        FOUND_CORES=yes
32975    elif test -n "$NUMBER_OF_PROCESSORS"; then
32976        # On windows, look in the env
32977        NUM_CORES=$NUMBER_OF_PROCESSORS
32978        FOUND_CORES=yes
32979    fi
32980
32981    if test "x$FOUND_CORES" = xyes; then
32982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32983$as_echo "$NUM_CORES" >&6; }
32984    else
32985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32986$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32988$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32989    fi
32990
32991
32992  else
32993    NUM_CORES=$with_num_cores
32994  fi
32995
32996
32997
32998  # How much memory do we have on this build system?
32999
33000# Check whether --with-memory-size was given.
33001if test "${with_memory_size+set}" = set; then :
33002  withval=$with_memory_size;
33003fi
33004
33005  if test "x$with_memory_size" = x; then
33006    # The memory size was not specified, try to probe it.
33007
33008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33009$as_echo_n "checking for memory size... " >&6; }
33010    # Default to 1024 MB
33011    MEMORY_SIZE=1024
33012    FOUND_MEM=no
33013
33014    if test -f /proc/meminfo; then
33015        # Looks like a Linux (or cygwin) system
33016        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33017        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33018        FOUND_MEM=yes
33019    elif test -x /usr/sbin/prtconf; then
33020        # Looks like a Solaris system
33021        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33022        FOUND_MEM=yes
33023    elif test -x /usr/sbin/system_profiler; then
33024        # Looks like a MacOSX system
33025        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33026        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33027        FOUND_MEM=yes
33028    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33029        # Windows, but without cygwin
33030        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33031        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33032        FOUND_MEM=yes
33033    fi
33034
33035    if test "x$FOUND_MEM" = xyes; then
33036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33037$as_echo "$MEMORY_SIZE MB" >&6; }
33038    else
33039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33040$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33042$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33043    fi
33044
33045  else
33046    MEMORY_SIZE=$with_memory_size
33047  fi
33048
33049
33050
33051  # Provide a decent default number of parallel jobs for make depending on
33052  # number of cores, amount of memory and machine architecture.
33053
33054# Check whether --with-jobs was given.
33055if test "${with_jobs+set}" = set; then :
33056  withval=$with_jobs;
33057fi
33058
33059  if test "x$with_jobs" = x; then
33060    # Number of jobs was not specified, calculate.
33061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33062$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33063    # Approximate memory in GB, rounding up a bit.
33064    memory_gb=`expr $MEMORY_SIZE / 1100`
33065    # Pick the lowest of memory in gb and number of cores.
33066    if test "$memory_gb" -lt "$NUM_CORES"; then
33067      JOBS="$memory_gb"
33068    else
33069      JOBS="$NUM_CORES"
33070      # On bigger machines, leave some room for other processes to run
33071      if test "$JOBS" -gt "4"; then
33072        JOBS=`expr $JOBS '*' 90 / 100`
33073      fi
33074    fi
33075    # Cap number of jobs to 16
33076    if test "$JOBS" -gt "16"; then
33077      JOBS=16
33078    fi
33079    if test "$JOBS" -eq "0"; then
33080      JOBS=1
33081    fi
33082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33083$as_echo "$JOBS" >&6; }
33084  else
33085    JOBS=$with_jobs
33086  fi
33087
33088
33089
33090# Setup smart javac (after cores and memory have been setup)
33091
33092
33093# Check whether --with-sjavac-server-java was given.
33094if test "${with_sjavac_server_java+set}" = set; then :
33095  withval=$with_sjavac_server_java;
33096fi
33097
33098
33099if test "x$with_sjavac_server_java" != x; then
33100    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33101    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33102    if test "x$FOUND_VERSION" = x; then
33103        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33104    fi
33105else
33106    SJAVAC_SERVER_JAVA=""
33107    # Hotspot specific options.
33108
33109    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33110    $ECHO "Command: $JAVA -verbosegc -version" >&5
33111    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33112    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33113    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33114    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33115        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33116	JVM_ARG_OK=true
33117    else
33118	$ECHO "Arg failed:" >&5
33119	$ECHO "$OUTPUT" >&5
33120	JVM_ARG_OK=false
33121    fi
33122
33123    # JRockit specific options.
33124
33125    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33126    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33127    OUTPUT=`$JAVA -Xverbose:gc -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 -Xverbose:gc"
33132	JVM_ARG_OK=true
33133    else
33134	$ECHO "Arg failed:" >&5
33135	$ECHO "$OUTPUT" >&5
33136	JVM_ARG_OK=false
33137    fi
33138
33139    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33140fi
33141
33142
33143if test "$MEMORY_SIZE" -gt "2500"; then
33144
33145    $ECHO "Check if jvm arg is ok: -d64" >&5
33146    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33147    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33148    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33149    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33150    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33151        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33152	JVM_ARG_OK=true
33153    else
33154	$ECHO "Arg failed:" >&5
33155	$ECHO "$OUTPUT" >&5
33156	JVM_ARG_OK=false
33157    fi
33158
33159    if test "$JVM_ARG_OK" = true; then
33160        JVM_64BIT=true
33161	JVM_ARG_OK=false
33162    fi
33163    fi
33164
33165if test "$JVM_64BIT" = true; then
33166    if test "$MEMORY_SIZE" -gt "17000"; then
33167
33168    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33169    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33170    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33171    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33172    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33173    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33174        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33175	JVM_ARG_OK=true
33176    else
33177	$ECHO "Arg failed:" >&5
33178	$ECHO "$OUTPUT" >&5
33179	JVM_ARG_OK=false
33180    fi
33181
33182    fi
33183    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33184
33185    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33186    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33187    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33188    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33189    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33190    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33191        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33192	JVM_ARG_OK=true
33193    else
33194	$ECHO "Arg failed:" >&5
33195	$ECHO "$OUTPUT" >&5
33196	JVM_ARG_OK=false
33197    fi
33198
33199    fi
33200    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33201
33202    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33203    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33204    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33205    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33206    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33207    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33208        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33209	JVM_ARG_OK=true
33210    else
33211	$ECHO "Arg failed:" >&5
33212	$ECHO "$OUTPUT" >&5
33213	JVM_ARG_OK=false
33214    fi
33215
33216    fi
33217    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33218
33219    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33220    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33221    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33222    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33223    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33224    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33225        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33226	JVM_ARG_OK=true
33227    else
33228	$ECHO "Arg failed:" >&5
33229	$ECHO "$OUTPUT" >&5
33230	JVM_ARG_OK=false
33231    fi
33232
33233    fi
33234fi
33235if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33236
33237    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33238    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33239    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33240    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33241    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33242    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33243        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33244	JVM_ARG_OK=true
33245    else
33246	$ECHO "Arg failed:" >&5
33247	$ECHO "$OUTPUT" >&5
33248	JVM_ARG_OK=false
33249    fi
33250
33251fi
33252if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33253
33254    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33255    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33256    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33257    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33258    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33259    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33260        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33261	JVM_ARG_OK=true
33262    else
33263	$ECHO "Arg failed:" >&5
33264	$ECHO "$OUTPUT" >&5
33265	JVM_ARG_OK=false
33266    fi
33267
33268fi
33269if test "$JVM_ARG_OK" = false; then
33270
33271    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33272    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33273    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33274    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33275    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33276    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33277        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33278	JVM_ARG_OK=true
33279    else
33280	$ECHO "Arg failed:" >&5
33281	$ECHO "$OUTPUT" >&5
33282	JVM_ARG_OK=false
33283    fi
33284
33285fi
33286
33287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33288$as_echo_n "checking whether to use sjavac... " >&6; }
33289# Check whether --enable-sjavac was given.
33290if test "${enable_sjavac+set}" = set; then :
33291  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33292else
33293  ENABLE_SJAVAC='no'
33294fi
33295
33296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33297$as_echo "$ENABLE_SJAVAC" >&6; }
33298
33299
33300if test "x$ENABLE_SJAVAC" = xyes; then
33301    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33302else
33303    SJAVAC_SERVER_DIR=
33304fi
33305
33306
33307
33308
33309# Can the C/C++ compiler use precompiled headers?
33310
33311
33312###############################################################################
33313#
33314# Can the C/C++ compiler use precompiled headers?
33315#
33316# Check whether --enable-precompiled-headers was given.
33317if test "${enable_precompiled_headers+set}" = set; then :
33318  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33319else
33320  ENABLE_PRECOMPH=yes
33321fi
33322
33323
33324USE_PRECOMPILED_HEADER=1
33325if test "x$ENABLE_PRECOMPH" = xno; then
33326    USE_PRECOMPILED_HEADER=0
33327fi
33328
33329if test "x$ENABLE_PRECOMPH" = xyes; then
33330    # Check that the compiler actually supports precomp headers.
33331    if test "x$GCC" = xyes; then
33332         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33333$as_echo_n "checking that precompiled headers work... " >&6; }
33334         echo "int alfa();" > conftest.h
33335         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33336         if test ! -f conftest.hpp.gch; then
33337             USE_PRECOMPILED_HEADER=0
33338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33339$as_echo "no" >&6; }
33340         else
33341             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33342$as_echo "yes" >&6; }
33343         fi
33344         rm -f conftest.h conftest.hpp.gch
33345    fi
33346fi
33347
33348
33349
33350
33351# Setup use of ccache, if available
33352
33353    # Check whether --enable-ccache was given.
33354if test "${enable_ccache+set}" = set; then :
33355  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33356else
33357  ENABLE_CCACHE=yes
33358fi
33359
33360    if test "x$ENABLE_CCACHE" = xyes; then
33361        OLD_PATH="$PATH"
33362        if test "x$TOOLS_DIR" != x; then
33363          PATH=$TOOLS_DIR:$PATH
33364        fi
33365        # Extract the first word of "ccache", so it can be a program name with args.
33366set dummy ccache; ac_word=$2
33367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33368$as_echo_n "checking for $ac_word... " >&6; }
33369if test "${ac_cv_path_CCACHE+set}" = set; then :
33370  $as_echo_n "(cached) " >&6
33371else
33372  case $CCACHE in
33373  [\\/]* | ?:[\\/]*)
33374  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33375  ;;
33376  *)
33377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33378for as_dir in $PATH
33379do
33380  IFS=$as_save_IFS
33381  test -z "$as_dir" && as_dir=.
33382    for ac_exec_ext in '' $ac_executable_extensions; do
33383  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33384    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33386    break 2
33387  fi
33388done
33389  done
33390IFS=$as_save_IFS
33391
33392  ;;
33393esac
33394fi
33395CCACHE=$ac_cv_path_CCACHE
33396if test -n "$CCACHE"; then
33397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33398$as_echo "$CCACHE" >&6; }
33399else
33400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33401$as_echo "no" >&6; }
33402fi
33403
33404
33405        PATH="$OLD_PATH"
33406    else
33407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33408$as_echo_n "checking for ccache... " >&6; }
33409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33410$as_echo "explicitly disabled" >&6; }
33411        CCACHE=
33412    fi
33413
33414
33415
33416# Check whether --with-ccache-dir was given.
33417if test "${with_ccache_dir+set}" = set; then :
33418  withval=$with_ccache_dir;
33419fi
33420
33421
33422    if test "x$with_ccache_dir" != x; then
33423        # When using a non home ccache directory, assume the use is to share ccache files
33424        # with other users. Thus change the umask.
33425        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33426    fi
33427    CCACHE_FOUND=""
33428    if test "x$CCACHE" != x; then
33429
33430    if test "x$CCACHE" != x; then
33431        CCACHE_FOUND="true"
33432        # Only use ccache if it is 3.1.4 or later, which supports
33433        # precompiled headers.
33434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33435$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33436        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33437        if test "x$HAS_GOOD_CCACHE" = x; then
33438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33439$as_echo "no, disabling ccache" >&6; }
33440            CCACHE=
33441        else
33442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33443$as_echo "yes" >&6; }
33444            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33445$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33446            PUSHED_FLAGS="$CXXFLAGS"
33447            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33448            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33449/* end confdefs.h.  */
33450
33451int
33452main ()
33453{
33454
33455  ;
33456  return 0;
33457}
33458_ACEOF
33459if ac_fn_cxx_try_compile "$LINENO"; then :
33460  CC_KNOWS_CCACHE_TRICK=yes
33461else
33462  CC_KNOWS_CCACHE_TRICK=no
33463fi
33464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33465            CXXFLAGS="$PUSHED_FLAGS"
33466            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33467                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33468$as_echo "yes" >&6; }
33469            else
33470                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33471$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33472                CCACHE=
33473            fi
33474        fi
33475    fi
33476
33477    if test "x$CCACHE" != x; then
33478        CCACHE_SLOPPINESS=time_macros
33479        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33480        CCACHE_FLAGS=-fpch-preprocess
33481
33482        if test "x$SET_CCACHE_DIR" != x; then
33483            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33484	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33485        fi
33486    fi
33487
33488    fi
33489
33490
33491###############################################################################
33492#
33493# And now the finish...
33494#
33495###############################################################################
33496
33497# Check for some common pitfalls
33498
33499  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33500    file_to_test="$SRC_ROOT/LICENSE"
33501    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33502      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
33503    fi
33504  fi
33505
33506
33507
33508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33509$as_echo_n "checking if build directory is on local disk... " >&6; }
33510
33511	# df -l lists only local disks; if the given directory is not found then
33512	# a non-zero exit code is given
33513  if test "x$DF" = x; then
33514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33515      # msys does not have df; use Windows "net use" instead.
33516      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33517      if test "x$IS_NETWORK_DISK" = x; then
33518        OUTPUT_DIR_IS_LOCAL="yes"
33519      else
33520        OUTPUT_DIR_IS_LOCAL="no"
33521      fi
33522    else
33523      # No df here, say it's local
33524      OUTPUT_DIR_IS_LOCAL="yes"
33525    fi
33526  else
33527    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33528      OUTPUT_DIR_IS_LOCAL="yes"
33529    else
33530      OUTPUT_DIR_IS_LOCAL="no"
33531    fi
33532  fi
33533
33534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33535$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33536
33537
33538
33539# Check if the user has any old-style ALT_ variables set.
33540FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33541
33542# Before generating output files, test if they exist. If they do, this is a reconfigure.
33543# Since we can't properly handle the dependencies for this, warn the user about the situation
33544if test -e $OUTPUT_ROOT/spec.gmk; then
33545  IS_RECONFIGURE=yes
33546else
33547  IS_RECONFIGURE=no
33548fi
33549
33550if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33551  HIDE_PERFORMANCE_HINTS=yes
33552else
33553  HIDE_PERFORMANCE_HINTS=no
33554  # Hide it the next time around...
33555  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33556fi
33557
33558
33559
33560# At the end, call the custom hook. (Dummy macro if no custom sources available)
33561
33562
33563# We're messing a bit with internal autoconf variables to put the config.status
33564# in the output directory instead of the current directory.
33565CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33566# Create the actual output files. Now the main work of configure is done.
33567cat >confcache <<\_ACEOF
33568# This file is a shell script that caches the results of configure
33569# tests run on this system so they can be shared between configure
33570# scripts and configure runs, see configure's option --config-cache.
33571# It is not useful on other systems.  If it contains results you don't
33572# want to keep, you may remove or edit it.
33573#
33574# config.status only pays attention to the cache file if you give it
33575# the --recheck option to rerun configure.
33576#
33577# `ac_cv_env_foo' variables (set or unset) will be overridden when
33578# loading this file, other *unset* `ac_cv_foo' will be assigned the
33579# following values.
33580
33581_ACEOF
33582
33583# The following way of writing the cache mishandles newlines in values,
33584# but we know of no workaround that is simple, portable, and efficient.
33585# So, we kill variables containing newlines.
33586# Ultrix sh set writes to stderr and can't be redirected directly,
33587# and sets the high bit in the cache file unless we assign to the vars.
33588(
33589  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33590    eval ac_val=\$$ac_var
33591    case $ac_val in #(
33592    *${as_nl}*)
33593      case $ac_var in #(
33594      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33595$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33596      esac
33597      case $ac_var in #(
33598      _ | IFS | as_nl) ;; #(
33599      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33600      *) { eval $ac_var=; unset $ac_var;} ;;
33601      esac ;;
33602    esac
33603  done
33604
33605  (set) 2>&1 |
33606    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33607    *${as_nl}ac_space=\ *)
33608      # `set' does not quote correctly, so add quotes: double-quote
33609      # substitution turns \\\\ into \\, and sed turns \\ into \.
33610      sed -n \
33611	"s/'/'\\\\''/g;
33612	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33613      ;; #(
33614    *)
33615      # `set' quotes correctly as required by POSIX, so do not add quotes.
33616      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33617      ;;
33618    esac |
33619    sort
33620) |
33621  sed '
33622     /^ac_cv_env_/b end
33623     t clear
33624     :clear
33625     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33626     t end
33627     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33628     :end' >>confcache
33629if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33630  if test -w "$cache_file"; then
33631    test "x$cache_file" != "x/dev/null" &&
33632      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33633$as_echo "$as_me: updating cache $cache_file" >&6;}
33634    cat confcache >$cache_file
33635  else
33636    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33637$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33638  fi
33639fi
33640rm -f confcache
33641
33642test "x$prefix" = xNONE && prefix=$ac_default_prefix
33643# Let make expand exec_prefix.
33644test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33645
33646DEFS=-DHAVE_CONFIG_H
33647
33648ac_libobjs=
33649ac_ltlibobjs=
33650U=
33651for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33652  # 1. Remove the extension, and $U if already installed.
33653  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33654  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33655  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33656  #    will be set to the directory where LIBOBJS objects are built.
33657  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33658  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33659done
33660LIBOBJS=$ac_libobjs
33661
33662LTLIBOBJS=$ac_ltlibobjs
33663
33664
33665
33666: ${CONFIG_STATUS=./config.status}
33667ac_write_fail=0
33668ac_clean_files_save=$ac_clean_files
33669ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33670{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33671$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33672as_write_fail=0
33673cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33674#! $SHELL
33675# Generated by $as_me.
33676# Run this file to recreate the current configuration.
33677# Compiler output produced by configure, useful for debugging
33678# configure, is in config.log if it exists.
33679
33680debug=false
33681ac_cs_recheck=false
33682ac_cs_silent=false
33683
33684SHELL=\${CONFIG_SHELL-$SHELL}
33685export SHELL
33686_ASEOF
33687cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33688## -------------------- ##
33689## M4sh Initialization. ##
33690## -------------------- ##
33691
33692# Be more Bourne compatible
33693DUALCASE=1; export DUALCASE # for MKS sh
33694if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33695  emulate sh
33696  NULLCMD=:
33697  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33698  # is contrary to our usage.  Disable this feature.
33699  alias -g '${1+"$@"}'='"$@"'
33700  setopt NO_GLOB_SUBST
33701else
33702  case `(set -o) 2>/dev/null` in #(
33703  *posix*) :
33704    set -o posix ;; #(
33705  *) :
33706     ;;
33707esac
33708fi
33709
33710
33711as_nl='
33712'
33713export as_nl
33714# Printing a long string crashes Solaris 7 /usr/bin/printf.
33715as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33716as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33717as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33718# Prefer a ksh shell builtin over an external printf program on Solaris,
33719# but without wasting forks for bash or zsh.
33720if test -z "$BASH_VERSION$ZSH_VERSION" \
33721    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33722  as_echo='print -r --'
33723  as_echo_n='print -rn --'
33724elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33725  as_echo='printf %s\n'
33726  as_echo_n='printf %s'
33727else
33728  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33729    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33730    as_echo_n='/usr/ucb/echo -n'
33731  else
33732    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33733    as_echo_n_body='eval
33734      arg=$1;
33735      case $arg in #(
33736      *"$as_nl"*)
33737	expr "X$arg" : "X\\(.*\\)$as_nl";
33738	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33739      esac;
33740      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33741    '
33742    export as_echo_n_body
33743    as_echo_n='sh -c $as_echo_n_body as_echo'
33744  fi
33745  export as_echo_body
33746  as_echo='sh -c $as_echo_body as_echo'
33747fi
33748
33749# The user is always right.
33750if test "${PATH_SEPARATOR+set}" != set; then
33751  PATH_SEPARATOR=:
33752  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33753    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33754      PATH_SEPARATOR=';'
33755  }
33756fi
33757
33758
33759# IFS
33760# We need space, tab and new line, in precisely that order.  Quoting is
33761# there to prevent editors from complaining about space-tab.
33762# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33763# splitting by setting IFS to empty value.)
33764IFS=" ""	$as_nl"
33765
33766# Find who we are.  Look in the path if we contain no directory separator.
33767case $0 in #((
33768  *[\\/]* ) as_myself=$0 ;;
33769  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33775  done
33776IFS=$as_save_IFS
33777
33778     ;;
33779esac
33780# We did not find ourselves, most probably we were run as `sh COMMAND'
33781# in which case we are not to be found in the path.
33782if test "x$as_myself" = x; then
33783  as_myself=$0
33784fi
33785if test ! -f "$as_myself"; then
33786  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33787  exit 1
33788fi
33789
33790# Unset variables that we do not need and which cause bugs (e.g. in
33791# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33792# suppresses any "Segmentation fault" message there.  '((' could
33793# trigger a bug in pdksh 5.2.14.
33794for as_var in BASH_ENV ENV MAIL MAILPATH
33795do eval test x\${$as_var+set} = xset \
33796  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33797done
33798PS1='$ '
33799PS2='> '
33800PS4='+ '
33801
33802# NLS nuisances.
33803LC_ALL=C
33804export LC_ALL
33805LANGUAGE=C
33806export LANGUAGE
33807
33808# CDPATH.
33809(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33810
33811
33812# as_fn_error STATUS ERROR [LINENO LOG_FD]
33813# ----------------------------------------
33814# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33815# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33816# script with STATUS, using 1 if that was 0.
33817as_fn_error ()
33818{
33819  as_status=$1; test $as_status -eq 0 && as_status=1
33820  if test "$4"; then
33821    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33822    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33823  fi
33824  $as_echo "$as_me: error: $2" >&2
33825  as_fn_exit $as_status
33826} # as_fn_error
33827
33828
33829# as_fn_set_status STATUS
33830# -----------------------
33831# Set $? to STATUS, without forking.
33832as_fn_set_status ()
33833{
33834  return $1
33835} # as_fn_set_status
33836
33837# as_fn_exit STATUS
33838# -----------------
33839# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33840as_fn_exit ()
33841{
33842  set +e
33843  as_fn_set_status $1
33844  exit $1
33845} # as_fn_exit
33846
33847# as_fn_unset VAR
33848# ---------------
33849# Portably unset VAR.
33850as_fn_unset ()
33851{
33852  { eval $1=; unset $1;}
33853}
33854as_unset=as_fn_unset
33855# as_fn_append VAR VALUE
33856# ----------------------
33857# Append the text in VALUE to the end of the definition contained in VAR. Take
33858# advantage of any shell optimizations that allow amortized linear growth over
33859# repeated appends, instead of the typical quadratic growth present in naive
33860# implementations.
33861if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33862  eval 'as_fn_append ()
33863  {
33864    eval $1+=\$2
33865  }'
33866else
33867  as_fn_append ()
33868  {
33869    eval $1=\$$1\$2
33870  }
33871fi # as_fn_append
33872
33873# as_fn_arith ARG...
33874# ------------------
33875# Perform arithmetic evaluation on the ARGs, and store the result in the
33876# global $as_val. Take advantage of shells that can avoid forks. The arguments
33877# must be portable across $(()) and expr.
33878if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33879  eval 'as_fn_arith ()
33880  {
33881    as_val=$(( $* ))
33882  }'
33883else
33884  as_fn_arith ()
33885  {
33886    as_val=`expr "$@" || test $? -eq 1`
33887  }
33888fi # as_fn_arith
33889
33890
33891if expr a : '\(a\)' >/dev/null 2>&1 &&
33892   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33893  as_expr=expr
33894else
33895  as_expr=false
33896fi
33897
33898if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33899  as_basename=basename
33900else
33901  as_basename=false
33902fi
33903
33904if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33905  as_dirname=dirname
33906else
33907  as_dirname=false
33908fi
33909
33910as_me=`$as_basename -- "$0" ||
33911$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33912	 X"$0" : 'X\(//\)$' \| \
33913	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33914$as_echo X/"$0" |
33915    sed '/^.*\/\([^/][^/]*\)\/*$/{
33916	    s//\1/
33917	    q
33918	  }
33919	  /^X\/\(\/\/\)$/{
33920	    s//\1/
33921	    q
33922	  }
33923	  /^X\/\(\/\).*/{
33924	    s//\1/
33925	    q
33926	  }
33927	  s/.*/./; q'`
33928
33929# Avoid depending upon Character Ranges.
33930as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33931as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33932as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33933as_cr_digits='0123456789'
33934as_cr_alnum=$as_cr_Letters$as_cr_digits
33935
33936ECHO_C= ECHO_N= ECHO_T=
33937case `echo -n x` in #(((((
33938-n*)
33939  case `echo 'xy\c'` in
33940  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33941  xy)  ECHO_C='\c';;
33942  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33943       ECHO_T='	';;
33944  esac;;
33945*)
33946  ECHO_N='-n';;
33947esac
33948
33949rm -f conf$$ conf$$.exe conf$$.file
33950if test -d conf$$.dir; then
33951  rm -f conf$$.dir/conf$$.file
33952else
33953  rm -f conf$$.dir
33954  mkdir conf$$.dir 2>/dev/null
33955fi
33956if (echo >conf$$.file) 2>/dev/null; then
33957  if ln -s conf$$.file conf$$ 2>/dev/null; then
33958    as_ln_s='ln -s'
33959    # ... but there are two gotchas:
33960    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33961    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33962    # In both cases, we have to default to `cp -p'.
33963    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33964      as_ln_s='cp -p'
33965  elif ln conf$$.file conf$$ 2>/dev/null; then
33966    as_ln_s=ln
33967  else
33968    as_ln_s='cp -p'
33969  fi
33970else
33971  as_ln_s='cp -p'
33972fi
33973rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33974rmdir conf$$.dir 2>/dev/null
33975
33976
33977# as_fn_mkdir_p
33978# -------------
33979# Create "$as_dir" as a directory, including parents if necessary.
33980as_fn_mkdir_p ()
33981{
33982
33983  case $as_dir in #(
33984  -*) as_dir=./$as_dir;;
33985  esac
33986  test -d "$as_dir" || eval $as_mkdir_p || {
33987    as_dirs=
33988    while :; do
33989      case $as_dir in #(
33990      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33991      *) as_qdir=$as_dir;;
33992      esac
33993      as_dirs="'$as_qdir' $as_dirs"
33994      as_dir=`$as_dirname -- "$as_dir" ||
33995$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33996	 X"$as_dir" : 'X\(//\)[^/]' \| \
33997	 X"$as_dir" : 'X\(//\)$' \| \
33998	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33999$as_echo X"$as_dir" |
34000    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34001	    s//\1/
34002	    q
34003	  }
34004	  /^X\(\/\/\)[^/].*/{
34005	    s//\1/
34006	    q
34007	  }
34008	  /^X\(\/\/\)$/{
34009	    s//\1/
34010	    q
34011	  }
34012	  /^X\(\/\).*/{
34013	    s//\1/
34014	    q
34015	  }
34016	  s/.*/./; q'`
34017      test -d "$as_dir" && break
34018    done
34019    test -z "$as_dirs" || eval "mkdir $as_dirs"
34020  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34021
34022
34023} # as_fn_mkdir_p
34024if mkdir -p . 2>/dev/null; then
34025  as_mkdir_p='mkdir -p "$as_dir"'
34026else
34027  test -d ./-p && rmdir ./-p
34028  as_mkdir_p=false
34029fi
34030
34031if test -x / >/dev/null 2>&1; then
34032  as_test_x='test -x'
34033else
34034  if ls -dL / >/dev/null 2>&1; then
34035    as_ls_L_option=L
34036  else
34037    as_ls_L_option=
34038  fi
34039  as_test_x='
34040    eval sh -c '\''
34041      if test -d "$1"; then
34042	test -d "$1/.";
34043      else
34044	case $1 in #(
34045	-*)set "./$1";;
34046	esac;
34047	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34048	???[sx]*):;;*)false;;esac;fi
34049    '\'' sh
34050  '
34051fi
34052as_executable_p=$as_test_x
34053
34054# Sed expression to map a string onto a valid CPP name.
34055as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34056
34057# Sed expression to map a string onto a valid variable name.
34058as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34059
34060
34061exec 6>&1
34062## ----------------------------------- ##
34063## Main body of $CONFIG_STATUS script. ##
34064## ----------------------------------- ##
34065_ASEOF
34066test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34067
34068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34069# Save the log message, to keep $0 and so on meaningful, and to
34070# report actual input values of CONFIG_FILES etc. instead of their
34071# values after options handling.
34072ac_log="
34073This file was extended by OpenJDK $as_me jdk8, which was
34074generated by GNU Autoconf 2.67.  Invocation command line was
34075
34076  CONFIG_FILES    = $CONFIG_FILES
34077  CONFIG_HEADERS  = $CONFIG_HEADERS
34078  CONFIG_LINKS    = $CONFIG_LINKS
34079  CONFIG_COMMANDS = $CONFIG_COMMANDS
34080  $ $0 $@
34081
34082on `(hostname || uname -n) 2>/dev/null | sed 1q`
34083"
34084
34085_ACEOF
34086
34087case $ac_config_files in *"
34088"*) set x $ac_config_files; shift; ac_config_files=$*;;
34089esac
34090
34091case $ac_config_headers in *"
34092"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34093esac
34094
34095
34096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34097# Files that config.status was made for.
34098config_files="$ac_config_files"
34099config_headers="$ac_config_headers"
34100
34101_ACEOF
34102
34103cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34104ac_cs_usage="\
34105\`$as_me' instantiates files and other configuration actions
34106from templates according to the current configuration.  Unless the files
34107and actions are specified as TAGs, all are instantiated by default.
34108
34109Usage: $0 [OPTION]... [TAG]...
34110
34111  -h, --help       print this help, then exit
34112  -V, --version    print version number and configuration settings, then exit
34113      --config     print configuration, then exit
34114  -q, --quiet, --silent
34115                   do not print progress messages
34116  -d, --debug      don't remove temporary files
34117      --recheck    update $as_me by reconfiguring in the same conditions
34118      --file=FILE[:TEMPLATE]
34119                   instantiate the configuration file FILE
34120      --header=FILE[:TEMPLATE]
34121                   instantiate the configuration header FILE
34122
34123Configuration files:
34124$config_files
34125
34126Configuration headers:
34127$config_headers
34128
34129Report bugs to <build-dev@openjdk.java.net>.
34130OpenJDK home page: <http://openjdk.java.net>."
34131
34132_ACEOF
34133cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34134ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34135ac_cs_version="\\
34136OpenJDK config.status jdk8
34137configured by $0, generated by GNU Autoconf 2.67,
34138  with options \\"\$ac_cs_config\\"
34139
34140Copyright (C) 2010 Free Software Foundation, Inc.
34141This config.status script is free software; the Free Software Foundation
34142gives unlimited permission to copy, distribute and modify it."
34143
34144ac_pwd='$ac_pwd'
34145srcdir='$srcdir'
34146AWK='$AWK'
34147test -n "\$AWK" || AWK=awk
34148_ACEOF
34149
34150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34151# The default lists apply if the user does not specify any file.
34152ac_need_defaults=:
34153while test $# != 0
34154do
34155  case $1 in
34156  --*=?*)
34157    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34158    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34159    ac_shift=:
34160    ;;
34161  --*=)
34162    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34163    ac_optarg=
34164    ac_shift=:
34165    ;;
34166  *)
34167    ac_option=$1
34168    ac_optarg=$2
34169    ac_shift=shift
34170    ;;
34171  esac
34172
34173  case $ac_option in
34174  # Handling of the options.
34175  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34176    ac_cs_recheck=: ;;
34177  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34178    $as_echo "$ac_cs_version"; exit ;;
34179  --config | --confi | --conf | --con | --co | --c )
34180    $as_echo "$ac_cs_config"; exit ;;
34181  --debug | --debu | --deb | --de | --d | -d )
34182    debug=: ;;
34183  --file | --fil | --fi | --f )
34184    $ac_shift
34185    case $ac_optarg in
34186    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34187    '') as_fn_error $? "missing file argument" ;;
34188    esac
34189    as_fn_append CONFIG_FILES " '$ac_optarg'"
34190    ac_need_defaults=false;;
34191  --header | --heade | --head | --hea )
34192    $ac_shift
34193    case $ac_optarg in
34194    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34195    esac
34196    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34197    ac_need_defaults=false;;
34198  --he | --h)
34199    # Conflict between --help and --header
34200    as_fn_error $? "ambiguous option: \`$1'
34201Try \`$0 --help' for more information.";;
34202  --help | --hel | -h )
34203    $as_echo "$ac_cs_usage"; exit ;;
34204  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34205  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34206    ac_cs_silent=: ;;
34207
34208  # This is an error.
34209  -*) as_fn_error $? "unrecognized option: \`$1'
34210Try \`$0 --help' for more information." ;;
34211
34212  *) as_fn_append ac_config_targets " $1"
34213     ac_need_defaults=false ;;
34214
34215  esac
34216  shift
34217done
34218
34219ac_configure_extra_args=
34220
34221if $ac_cs_silent; then
34222  exec 6>/dev/null
34223  ac_configure_extra_args="$ac_configure_extra_args --silent"
34224fi
34225
34226_ACEOF
34227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34228if \$ac_cs_recheck; then
34229  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34230  shift
34231  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34232  CONFIG_SHELL='$SHELL'
34233  export CONFIG_SHELL
34234  exec "\$@"
34235fi
34236
34237_ACEOF
34238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34239exec 5>>config.log
34240{
34241  echo
34242  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34243## Running $as_me. ##
34244_ASBOX
34245  $as_echo "$ac_log"
34246} >&5
34247
34248_ACEOF
34249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34250_ACEOF
34251
34252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34253
34254# Handling of arguments.
34255for ac_config_target in $ac_config_targets
34256do
34257  case $ac_config_target in
34258    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34259    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34260    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34261    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34262    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34263    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34264    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34265
34266  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34267  esac
34268done
34269
34270
34271# If the user did not use the arguments to specify the items to instantiate,
34272# then the envvar interface is used.  Set only those that are not.
34273# We use the long form for the default assignment because of an extremely
34274# bizarre bug on SunOS 4.1.3.
34275if $ac_need_defaults; then
34276  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34277  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34278fi
34279
34280# Have a temporary directory for convenience.  Make it in the build tree
34281# simply because there is no reason against having it here, and in addition,
34282# creating and moving files from /tmp can sometimes cause problems.
34283# Hook for its removal unless debugging.
34284# Note that there is a small window in which the directory will not be cleaned:
34285# after its creation but before its name has been assigned to `$tmp'.
34286$debug ||
34287{
34288  tmp=
34289  trap 'exit_status=$?
34290  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34291' 0
34292  trap 'as_fn_exit 1' 1 2 13 15
34293}
34294# Create a (secure) tmp directory for tmp files.
34295
34296{
34297  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34298  test -n "$tmp" && test -d "$tmp"
34299}  ||
34300{
34301  tmp=./conf$$-$RANDOM
34302  (umask 077 && mkdir "$tmp")
34303} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34304
34305# Set up the scripts for CONFIG_FILES section.
34306# No need to generate them if there are no CONFIG_FILES.
34307# This happens for instance with `./config.status config.h'.
34308if test -n "$CONFIG_FILES"; then
34309
34310
34311ac_cr=`echo X | tr X '\015'`
34312# On cygwin, bash can eat \r inside `` if the user requested igncr.
34313# But we know of no other shell where ac_cr would be empty at this
34314# point, so we can use a bashism as a fallback.
34315if test "x$ac_cr" = x; then
34316  eval ac_cr=\$\'\\r\'
34317fi
34318ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34319if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34320  ac_cs_awk_cr='\\r'
34321else
34322  ac_cs_awk_cr=$ac_cr
34323fi
34324
34325echo 'BEGIN {' >"$tmp/subs1.awk" &&
34326_ACEOF
34327
34328
34329{
34330  echo "cat >conf$$subs.awk <<_ACEOF" &&
34331  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34332  echo "_ACEOF"
34333} >conf$$subs.sh ||
34334  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34335ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34336ac_delim='%!_!# '
34337for ac_last_try in false false false false false :; do
34338  . ./conf$$subs.sh ||
34339    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34340
34341  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34342  if test $ac_delim_n = $ac_delim_num; then
34343    break
34344  elif $ac_last_try; then
34345    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34346  else
34347    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34348  fi
34349done
34350rm -f conf$$subs.sh
34351
34352cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34353cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34354_ACEOF
34355sed -n '
34356h
34357s/^/S["/; s/!.*/"]=/
34358p
34359g
34360s/^[^!]*!//
34361:repl
34362t repl
34363s/'"$ac_delim"'$//
34364t delim
34365:nl
34366h
34367s/\(.\{148\}\)..*/\1/
34368t more1
34369s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34370p
34371n
34372b repl
34373:more1
34374s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34375p
34376g
34377s/.\{148\}//
34378t nl
34379:delim
34380h
34381s/\(.\{148\}\)..*/\1/
34382t more2
34383s/["\\]/\\&/g; s/^/"/; s/$/"/
34384p
34385b
34386:more2
34387s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34388p
34389g
34390s/.\{148\}//
34391t delim
34392' <conf$$subs.awk | sed '
34393/^[^""]/{
34394  N
34395  s/\n//
34396}
34397' >>$CONFIG_STATUS || ac_write_fail=1
34398rm -f conf$$subs.awk
34399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34400_ACAWK
34401cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34402  for (key in S) S_is_set[key] = 1
34403  FS = ""
34404
34405}
34406{
34407  line = $ 0
34408  nfields = split(line, field, "@")
34409  substed = 0
34410  len = length(field[1])
34411  for (i = 2; i < nfields; i++) {
34412    key = field[i]
34413    keylen = length(key)
34414    if (S_is_set[key]) {
34415      value = S[key]
34416      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34417      len += length(value) + length(field[++i])
34418      substed = 1
34419    } else
34420      len += 1 + keylen
34421  }
34422
34423  print line
34424}
34425
34426_ACAWK
34427_ACEOF
34428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34429if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34430  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34431else
34432  cat
34433fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34434  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34435_ACEOF
34436
34437# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34438# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34439# trailing colons and then remove the whole line if VPATH becomes empty
34440# (actually we leave an empty line to preserve line numbers).
34441if test "x$srcdir" = x.; then
34442  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34443h
34444s///
34445s/^/:/
34446s/[	 ]*$/:/
34447s/:\$(srcdir):/:/g
34448s/:\${srcdir}:/:/g
34449s/:@srcdir@:/:/g
34450s/^:*//
34451s/:*$//
34452x
34453s/\(=[	 ]*\).*/\1/
34454G
34455s/\n//
34456s/^[^=]*=[	 ]*$//
34457}'
34458fi
34459
34460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34461fi # test -n "$CONFIG_FILES"
34462
34463# Set up the scripts for CONFIG_HEADERS section.
34464# No need to generate them if there are no CONFIG_HEADERS.
34465# This happens for instance with `./config.status Makefile'.
34466if test -n "$CONFIG_HEADERS"; then
34467cat >"$tmp/defines.awk" <<\_ACAWK ||
34468BEGIN {
34469_ACEOF
34470
34471# Transform confdefs.h into an awk script `defines.awk', embedded as
34472# here-document in config.status, that substitutes the proper values into
34473# config.h.in to produce config.h.
34474
34475# Create a delimiter string that does not exist in confdefs.h, to ease
34476# handling of long lines.
34477ac_delim='%!_!# '
34478for ac_last_try in false false :; do
34479  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34480  if test -z "$ac_t"; then
34481    break
34482  elif $ac_last_try; then
34483    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34484  else
34485    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34486  fi
34487done
34488
34489# For the awk script, D is an array of macro values keyed by name,
34490# likewise P contains macro parameters if any.  Preserve backslash
34491# newline sequences.
34492
34493ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34494sed -n '
34495s/.\{148\}/&'"$ac_delim"'/g
34496t rset
34497:rset
34498s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34499t def
34500d
34501:def
34502s/\\$//
34503t bsnl
34504s/["\\]/\\&/g
34505s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34506D["\1"]=" \3"/p
34507s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34508d
34509:bsnl
34510s/["\\]/\\&/g
34511s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34512D["\1"]=" \3\\\\\\n"\\/p
34513t cont
34514s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34515t cont
34516d
34517:cont
34518n
34519s/.\{148\}/&'"$ac_delim"'/g
34520t clear
34521:clear
34522s/\\$//
34523t bsnlc
34524s/["\\]/\\&/g; s/^/"/; s/$/"/p
34525d
34526:bsnlc
34527s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34528b cont
34529' <confdefs.h | sed '
34530s/'"$ac_delim"'/"\\\
34531"/g' >>$CONFIG_STATUS || ac_write_fail=1
34532
34533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34534  for (key in D) D_is_set[key] = 1
34535  FS = ""
34536}
34537/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34538  line = \$ 0
34539  split(line, arg, " ")
34540  if (arg[1] == "#") {
34541    defundef = arg[2]
34542    mac1 = arg[3]
34543  } else {
34544    defundef = substr(arg[1], 2)
34545    mac1 = arg[2]
34546  }
34547  split(mac1, mac2, "(") #)
34548  macro = mac2[1]
34549  prefix = substr(line, 1, index(line, defundef) - 1)
34550  if (D_is_set[macro]) {
34551    # Preserve the white space surrounding the "#".
34552    print prefix "define", macro P[macro] D[macro]
34553    next
34554  } else {
34555    # Replace #undef with comments.  This is necessary, for example,
34556    # in the case of _POSIX_SOURCE, which is predefined and required
34557    # on some systems where configure will not decide to define it.
34558    if (defundef == "undef") {
34559      print "/*", prefix defundef, macro, "*/"
34560      next
34561    }
34562  }
34563}
34564{ print }
34565_ACAWK
34566_ACEOF
34567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34568  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34569fi # test -n "$CONFIG_HEADERS"
34570
34571
34572eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34573shift
34574for ac_tag
34575do
34576  case $ac_tag in
34577  :[FHLC]) ac_mode=$ac_tag; continue;;
34578  esac
34579  case $ac_mode$ac_tag in
34580  :[FHL]*:*);;
34581  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34582  :[FH]-) ac_tag=-:-;;
34583  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34584  esac
34585  ac_save_IFS=$IFS
34586  IFS=:
34587  set x $ac_tag
34588  IFS=$ac_save_IFS
34589  shift
34590  ac_file=$1
34591  shift
34592
34593  case $ac_mode in
34594  :L) ac_source=$1;;
34595  :[FH])
34596    ac_file_inputs=
34597    for ac_f
34598    do
34599      case $ac_f in
34600      -) ac_f="$tmp/stdin";;
34601      *) # Look for the file first in the build tree, then in the source tree
34602	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34603	 # because $ac_f cannot contain `:'.
34604	 test -f "$ac_f" ||
34605	   case $ac_f in
34606	   [\\/$]*) false;;
34607	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34608	   esac ||
34609	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34610      esac
34611      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34612      as_fn_append ac_file_inputs " '$ac_f'"
34613    done
34614
34615    # Let's still pretend it is `configure' which instantiates (i.e., don't
34616    # use $as_me), people would be surprised to read:
34617    #    /* config.h.  Generated by config.status.  */
34618    configure_input='Generated from '`
34619	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34620	`' by configure.'
34621    if test x"$ac_file" != x-; then
34622      configure_input="$ac_file.  $configure_input"
34623      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34624$as_echo "$as_me: creating $ac_file" >&6;}
34625    fi
34626    # Neutralize special characters interpreted by sed in replacement strings.
34627    case $configure_input in #(
34628    *\&* | *\|* | *\\* )
34629       ac_sed_conf_input=`$as_echo "$configure_input" |
34630       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34631    *) ac_sed_conf_input=$configure_input;;
34632    esac
34633
34634    case $ac_tag in
34635    *:-:* | *:-) cat >"$tmp/stdin" \
34636      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34637    esac
34638    ;;
34639  esac
34640
34641  ac_dir=`$as_dirname -- "$ac_file" ||
34642$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34643	 X"$ac_file" : 'X\(//\)[^/]' \| \
34644	 X"$ac_file" : 'X\(//\)$' \| \
34645	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34646$as_echo X"$ac_file" |
34647    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34648	    s//\1/
34649	    q
34650	  }
34651	  /^X\(\/\/\)[^/].*/{
34652	    s//\1/
34653	    q
34654	  }
34655	  /^X\(\/\/\)$/{
34656	    s//\1/
34657	    q
34658	  }
34659	  /^X\(\/\).*/{
34660	    s//\1/
34661	    q
34662	  }
34663	  s/.*/./; q'`
34664  as_dir="$ac_dir"; as_fn_mkdir_p
34665  ac_builddir=.
34666
34667case "$ac_dir" in
34668.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34669*)
34670  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34671  # A ".." for each directory in $ac_dir_suffix.
34672  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34673  case $ac_top_builddir_sub in
34674  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34675  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34676  esac ;;
34677esac
34678ac_abs_top_builddir=$ac_pwd
34679ac_abs_builddir=$ac_pwd$ac_dir_suffix
34680# for backward compatibility:
34681ac_top_builddir=$ac_top_build_prefix
34682
34683case $srcdir in
34684  .)  # We are building in place.
34685    ac_srcdir=.
34686    ac_top_srcdir=$ac_top_builddir_sub
34687    ac_abs_top_srcdir=$ac_pwd ;;
34688  [\\/]* | ?:[\\/]* )  # Absolute name.
34689    ac_srcdir=$srcdir$ac_dir_suffix;
34690    ac_top_srcdir=$srcdir
34691    ac_abs_top_srcdir=$srcdir ;;
34692  *) # Relative name.
34693    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34694    ac_top_srcdir=$ac_top_build_prefix$srcdir
34695    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34696esac
34697ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34698
34699
34700  case $ac_mode in
34701  :F)
34702  #
34703  # CONFIG_FILE
34704  #
34705
34706_ACEOF
34707
34708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34709# If the template does not know about datarootdir, expand it.
34710# FIXME: This hack should be removed a few years after 2.60.
34711ac_datarootdir_hack=; ac_datarootdir_seen=
34712ac_sed_dataroot='
34713/datarootdir/ {
34714  p
34715  q
34716}
34717/@datadir@/p
34718/@docdir@/p
34719/@infodir@/p
34720/@localedir@/p
34721/@mandir@/p'
34722case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34723*datarootdir*) ac_datarootdir_seen=yes;;
34724*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34725  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34726$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34727_ACEOF
34728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34729  ac_datarootdir_hack='
34730  s&@datadir@&$datadir&g
34731  s&@docdir@&$docdir&g
34732  s&@infodir@&$infodir&g
34733  s&@localedir@&$localedir&g
34734  s&@mandir@&$mandir&g
34735  s&\\\${datarootdir}&$datarootdir&g' ;;
34736esac
34737_ACEOF
34738
34739# Neutralize VPATH when `$srcdir' = `.'.
34740# Shell code in configure.ac might set extrasub.
34741# FIXME: do we really want to maintain this feature?
34742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34743ac_sed_extra="$ac_vpsub
34744$extrasub
34745_ACEOF
34746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34747:t
34748/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34749s|@configure_input@|$ac_sed_conf_input|;t t
34750s&@top_builddir@&$ac_top_builddir_sub&;t t
34751s&@top_build_prefix@&$ac_top_build_prefix&;t t
34752s&@srcdir@&$ac_srcdir&;t t
34753s&@abs_srcdir@&$ac_abs_srcdir&;t t
34754s&@top_srcdir@&$ac_top_srcdir&;t t
34755s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34756s&@builddir@&$ac_builddir&;t t
34757s&@abs_builddir@&$ac_abs_builddir&;t t
34758s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34759$ac_datarootdir_hack
34760"
34761eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34762  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34763
34764test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34765  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34766  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34767  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34768which seems to be undefined.  Please make sure it is defined" >&5
34769$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34770which seems to be undefined.  Please make sure it is defined" >&2;}
34771
34772  rm -f "$tmp/stdin"
34773  case $ac_file in
34774  -) cat "$tmp/out" && rm -f "$tmp/out";;
34775  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34776  esac \
34777  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34778 ;;
34779  :H)
34780  #
34781  # CONFIG_HEADER
34782  #
34783  if test x"$ac_file" != x-; then
34784    {
34785      $as_echo "/* $configure_input  */" \
34786      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34787    } >"$tmp/config.h" \
34788      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34789    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34790      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34791$as_echo "$as_me: $ac_file is unchanged" >&6;}
34792    else
34793      rm -f "$ac_file"
34794      mv "$tmp/config.h" "$ac_file" \
34795	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34796    fi
34797  else
34798    $as_echo "/* $configure_input  */" \
34799      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34800      || as_fn_error $? "could not create -" "$LINENO" 5
34801  fi
34802 ;;
34803
34804
34805  esac
34806
34807done # for ac_tag
34808
34809
34810as_fn_exit 0
34811_ACEOF
34812ac_clean_files=$ac_clean_files_save
34813
34814test $ac_write_fail = 0 ||
34815  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34816
34817
34818# configure is writing to config.log, and then calls config.status.
34819# config.status does its own redirection, appending to config.log.
34820# Unfortunately, on DOS this fails, as config.log is still kept open
34821# by configure, so config.status won't be able to write to it; its
34822# output is simply discarded.  So we exec the FD to /dev/null,
34823# effectively closing config.log, so it can be properly (re)opened and
34824# appended to by config.status.  When coming back to configure, we
34825# need to make the FD available again.
34826if test "$no_create" != yes; then
34827  ac_cs_success=:
34828  ac_config_status_args=
34829  test "$silent" = yes &&
34830    ac_config_status_args="$ac_config_status_args --quiet"
34831  exec 5>/dev/null
34832  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34833  exec 5>>config.log
34834  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34835  # would make configure fail if this is the last instruction.
34836  $ac_cs_success || as_fn_exit 1
34837fi
34838if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34839  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34840$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34841fi
34842
34843
34844# Make the compare script executable
34845$CHMOD +x $OUTPUT_ROOT/compare.sh
34846
34847# Finally output some useful information to the user
34848
34849# Finally output some useful information to the user
34850
34851if test "x$CCACHE_FOUND" != x; then
34852	if  test "x$HAS_GOOD_CCACHE" = x; then
34853		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34854		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34855	else
34856		CCACHE_STATUS="installed and in use"
34857	fi
34858else
34859	if test "x$GCC" = xyes; then
34860		CCACHE_STATUS="not installed (consider installing)"
34861		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34862	else
34863		CCACHE_STATUS="not available for your system"
34864	fi
34865fi
34866
34867printf "\n"
34868printf "====================================================\n"
34869printf "A new configuration has been successfully created in\n"
34870printf "$OUTPUT_ROOT\n"
34871if test "x$CONFIGURE_COMMAND_LINE" != x; then
34872	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34873else
34874	printf "using default settings.\n"
34875fi
34876
34877printf "\n"
34878printf "Configuration summary:\n"
34879printf "* Debug level:    $DEBUG_LEVEL\n"
34880printf "* JDK variant:    $JDK_VARIANT\n"
34881printf "* JVM variants:   $with_jvm_variants\n"
34882printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34883
34884printf "\n"
34885printf "Tools summary:\n"
34886if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34887  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34888fi
34889printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34890printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34891printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34892
34893printf "\n"
34894printf "Build performance summary:\n"
34895printf "* Cores to use:   $JOBS\n"
34896printf "* Memory limit:   $MEMORY_SIZE MB\n"
34897printf "* ccache status:  $CCACHE_STATUS\n"
34898printf "\n"
34899
34900if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34901	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34902	printf "$CCACHE_HELP_MSG\n"
34903
34904    # Print a helpful message on how to acquire the necessary build dependency.
34905    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34906    MISSING_DEPENDENCY=ccache
34907    PKGHANDLER_COMMAND=
34908
34909    case $PKGHANDLER in
34910	apt-get)
34911                apt_help     $MISSING_DEPENDENCY ;;
34912    yum)
34913                yum_help     $MISSING_DEPENDENCY ;;
34914	port)
34915                port_help    $MISSING_DEPENDENCY ;;
34916	pkgutil)
34917                pkgutil_help $MISSING_DEPENDENCY ;;
34918	pkgadd)
34919                pkgadd_help  $MISSING_DEPENDENCY ;;
34920    * )
34921      break ;;
34922    esac
34923
34924    if test "x$PKGHANDLER_COMMAND" != x; then
34925        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34926    fi
34927
34928	printf "$HELP_MSG\n"
34929	printf "\n"
34930fi
34931
34932if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34933	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34934	printf "will result in longer build times.\n"
34935	printf "\n"
34936fi
34937
34938if test "x$FOUND_ALT_VARIABLES" != "x"; then
34939	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34940	printf "These are not respected, and will be ignored. It is recommended\n"
34941	printf "that you clean your environment. The following variables are set:\n"
34942	printf "$FOUND_ALT_VARIABLES\n"
34943	printf "\n"
34944fi
34945
34946if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34947	printf "WARNING: Your build output directory is not on a local disk.\n"
34948	printf "This will severely degrade build performance!\n"
34949	printf "It is recommended that you create an output directory on a local disk,\n"
34950	printf "and run the configure script again from that directory.\n"
34951	printf "\n"
34952fi
34953
34954if test "x$IS_RECONFIGURE" = "xyes"; then
34955	printf "WARNING: The result of this configuration has overridden an older\n"
34956	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34957	printf "proper build. Failure to do so might result in strange build problems.\n"
34958	printf "\n"
34959fi
34960
34961