generated-configure.sh revision 876:ecd447139a39
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741NASHORN_TOPDIR
742HOTSPOT_TOPDIR
743JAXWS_TOPDIR
744JAXP_TOPDIR
745CORBA_TOPDIR
746LANGTOOLS_TOPDIR
747BOOT_JDK_JVMARGS
748JAVAC_FLAGS
749BOOT_JDK_SOURCETARGET
750BOOT_JDK
751BOOT_TOOLSJAR
752BOOT_RTJAR
753JAVA_CHECK
754JAVAC_CHECK
755COOKED_BUILD_NUMBER
756JDK_VERSION
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771USER_RELEASE_SUFFIX
772COMPRESS_JARS
773UNLIMITED_CRYPTO
774CACERTS_FILE
775TEST_IN_BUILD
776BUILD_HEADLESS
777SUPPORT_HEADFUL
778SUPPORT_HEADLESS
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785TIME
786STAT
787HG
788READELF
789OTOOL
790LDD
791ZIP
792UNZIP
793FIND_DELETE
794MAKE
795CHECK_TOOLSDIR_MAKE
796CHECK_TOOLSDIR_GMAKE
797CHECK_MAKE
798CHECK_GMAKE
799PKGHANDLER
800OUTPUT_ROOT
801CONF_NAME
802SPEC
803BUILD_VARIANT_RELEASE
804DEBUG_CLASSFILES
805FASTDEBUG
806VARIANT
807DEBUG_LEVEL
808MACOSX_UNIVERSAL
809JVM_VARIANT_ZEROSHARK
810JVM_VARIANT_ZERO
811JVM_VARIANT_KERNEL
812JVM_VARIANT_MINIMAL1
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817SET_OPENJDK
818BUILD_LOG_WRAPPER
819BUILD_LOG_PREVIOUS
820BUILD_LOG
821SYS_ROOT
822PATH_SEP
823SRC_ROOT
824DEFINE_CROSS_COMPILE_ARCH
825LP64
826OPENJDK_TARGET_OS_API_DIR
827OPENJDK_TARGET_CPU_JLI_CFLAGS
828OPENJDK_TARGET_CPU_OSARCH
829OPENJDK_TARGET_CPU_ISADIR
830OPENJDK_TARGET_CPU_LIBDIR
831OPENJDK_TARGET_CPU_LEGACY_LIB
832OPENJDK_TARGET_CPU_LEGACY
833REQUIRED_OS_VERSION
834REQUIRED_OS_NAME
835COMPILE_TYPE
836OPENJDK_TARGET_CPU_ENDIAN
837OPENJDK_TARGET_CPU_BITS
838OPENJDK_TARGET_CPU_ARCH
839OPENJDK_TARGET_CPU
840OPENJDK_TARGET_OS_API
841OPENJDK_TARGET_OS
842OPENJDK_BUILD_CPU_ENDIAN
843OPENJDK_BUILD_CPU_BITS
844OPENJDK_BUILD_CPU_ARCH
845OPENJDK_BUILD_CPU
846OPENJDK_BUILD_OS_API
847OPENJDK_BUILD_OS
848OPENJDK_BUILD_AUTOCONF_NAME
849OPENJDK_TARGET_AUTOCONF_NAME
850target_os
851target_vendor
852target_cpu
853target
854host_os
855host_vendor
856host_cpu
857host
858build_os
859build_vendor
860build_cpu
861build
862SETFILE
863DF
864READLINK
865CYGPATH
866NAWK
867SED
868FGREP
869EGREP
870GREP
871AWK
872XARGS
873WHICH
874WC
875UNIQ
876UNAME
877TR
878TOUCH
879TEE
880TAR
881TAIL
882SORT
883SH
884RM
885THEPWDCMD
886PRINTF
887MV
888MKTEMP
889MKDIR
890LS
891LN
892HEAD
893FIND
894FILE
895EXPR
896ECHO
897DIRNAME
898DIFF
899DATE
900CUT
901CPIO
902CP
903COMM
904CMP
905CHMOD
906CAT
907BASH
908BASENAME
909DATE_WHEN_CONFIGURED
910CONFIGURE_COMMAND_LINE
911CUSTOM_MAKE_DIR
912target_alias
913host_alias
914build_alias
915LIBS
916ECHO_T
917ECHO_N
918ECHO_C
919DEFS
920mandir
921localedir
922libdir
923psdir
924pdfdir
925dvidir
926htmldir
927infodir
928docdir
929oldincludedir
930includedir
931localstatedir
932sharedstatedir
933sysconfdir
934datadir
935datarootdir
936libexecdir
937sbindir
938bindir
939program_transform_name
940prefix
941exec_prefix
942PACKAGE_URL
943PACKAGE_BUGREPORT
944PACKAGE_STRING
945PACKAGE_VERSION
946PACKAGE_TARNAME
947PACKAGE_NAME
948PATH_SEPARATOR
949SHELL'
950ac_subst_files=''
951ac_user_opts='
952enable_option_checking
953with_custom_make_dir
954with_target_bits
955with_sys_root
956with_tools_dir
957with_devkit
958enable_openjdk_only
959with_jdk_variant
960with_jvm_variants
961enable_debug
962with_debug_level
963with_conf_name
964with_builddeps_conf
965with_builddeps_server
966with_builddeps_dir
967with_builddeps_group
968enable_headful
969enable_hotspot_test_in_build
970with_cacerts_file
971enable_unlimited_crypto
972with_milestone
973with_build_number
974with_user_release_suffix
975with_boot_jdk
976with_boot_jdk_jvmargs
977with_add_source_root
978with_override_source_root
979with_adds_and_overrides
980with_override_langtools
981with_override_corba
982with_override_jaxp
983with_override_jaxws
984with_override_hotspot
985with_override_jdk
986with_import_hotspot
987with_msvcr_dll
988with_extra_cflags
989with_extra_cxxflags
990with_extra_ldflags
991enable_debug_symbols
992enable_zip_debug_info
993enable_macosx_runtime_support
994with_x
995with_cups
996with_cups_include
997with_freetype
998with_alsa
999with_alsa_include
1000with_alsa_lib
1001with_zlib
1002with_stdc__lib
1003with_num_cores
1004with_memory_size
1005with_sjavac_server_java
1006with_sjavac_server_cores
1007enable_sjavac
1008enable_precompiled_headers
1009enable_ccache
1010with_ccache_dir
1011'
1012      ac_precious_vars='build_alias
1013host_alias
1014target_alias
1015PKG_CONFIG
1016CC
1017CFLAGS
1018LDFLAGS
1019LIBS
1020CPPFLAGS
1021CXX
1022CXXFLAGS
1023CCC
1024OBJC
1025OBJCFLAGS
1026CPP
1027CXXCPP
1028XMKMF
1029FREETYPE2_CFLAGS
1030FREETYPE2_LIBS
1031ALSA_CFLAGS
1032ALSA_LIBS'
1033
1034
1035# Initialize some variables set by options.
1036ac_init_help=
1037ac_init_version=false
1038ac_unrecognized_opts=
1039ac_unrecognized_sep=
1040# The variables have the same names as the options, with
1041# dashes changed to underlines.
1042cache_file=/dev/null
1043exec_prefix=NONE
1044no_create=
1045no_recursion=
1046prefix=NONE
1047program_prefix=NONE
1048program_suffix=NONE
1049program_transform_name=s,x,x,
1050silent=
1051site=
1052srcdir=
1053verbose=
1054x_includes=NONE
1055x_libraries=NONE
1056
1057# Installation directory options.
1058# These are left unexpanded so users can "make install exec_prefix=/foo"
1059# and all the variables that are supposed to be based on exec_prefix
1060# by default will actually change.
1061# Use braces instead of parens because sh, perl, etc. also accept them.
1062# (The list follows the same order as the GNU Coding Standards.)
1063bindir='${exec_prefix}/bin'
1064sbindir='${exec_prefix}/sbin'
1065libexecdir='${exec_prefix}/libexec'
1066datarootdir='${prefix}/share'
1067datadir='${datarootdir}'
1068sysconfdir='${prefix}/etc'
1069sharedstatedir='${prefix}/com'
1070localstatedir='${prefix}/var'
1071includedir='${prefix}/include'
1072oldincludedir='/usr/include'
1073docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1074infodir='${datarootdir}/info'
1075htmldir='${docdir}'
1076dvidir='${docdir}'
1077pdfdir='${docdir}'
1078psdir='${docdir}'
1079libdir='${exec_prefix}/lib'
1080localedir='${datarootdir}/locale'
1081mandir='${datarootdir}/man'
1082
1083ac_prev=
1084ac_dashdash=
1085for ac_option
1086do
1087  # If the previous option needs an argument, assign it.
1088  if test -n "$ac_prev"; then
1089    eval $ac_prev=\$ac_option
1090    ac_prev=
1091    continue
1092  fi
1093
1094  case $ac_option in
1095  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1096  *=)   ac_optarg= ;;
1097  *)    ac_optarg=yes ;;
1098  esac
1099
1100  # Accept the important Cygnus configure options, so we can diagnose typos.
1101
1102  case $ac_dashdash$ac_option in
1103  --)
1104    ac_dashdash=yes ;;
1105
1106  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1107    ac_prev=bindir ;;
1108  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1109    bindir=$ac_optarg ;;
1110
1111  -build | --build | --buil | --bui | --bu)
1112    ac_prev=build_alias ;;
1113  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1114    build_alias=$ac_optarg ;;
1115
1116  -cache-file | --cache-file | --cache-fil | --cache-fi \
1117  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1118    ac_prev=cache_file ;;
1119  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1120  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1121    cache_file=$ac_optarg ;;
1122
1123  --config-cache | -C)
1124    cache_file=config.cache ;;
1125
1126  -datadir | --datadir | --datadi | --datad)
1127    ac_prev=datadir ;;
1128  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1129    datadir=$ac_optarg ;;
1130
1131  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1132  | --dataroo | --dataro | --datar)
1133    ac_prev=datarootdir ;;
1134  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1135  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1136    datarootdir=$ac_optarg ;;
1137
1138  -disable-* | --disable-*)
1139    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1140    # Reject names that are not valid shell variable names.
1141    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142      as_fn_error $? "invalid feature name: $ac_useropt"
1143    ac_useropt_orig=$ac_useropt
1144    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145    case $ac_user_opts in
1146      *"
1147"enable_$ac_useropt"
1148"*) ;;
1149      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1150	 ac_unrecognized_sep=', ';;
1151    esac
1152    eval enable_$ac_useropt=no ;;
1153
1154  -docdir | --docdir | --docdi | --doc | --do)
1155    ac_prev=docdir ;;
1156  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1157    docdir=$ac_optarg ;;
1158
1159  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1160    ac_prev=dvidir ;;
1161  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1162    dvidir=$ac_optarg ;;
1163
1164  -enable-* | --enable-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid feature name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"enable_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval enable_$ac_useropt=\$ac_optarg ;;
1179
1180  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1181  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1182  | --exec | --exe | --ex)
1183    ac_prev=exec_prefix ;;
1184  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1185  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1186  | --exec=* | --exe=* | --ex=*)
1187    exec_prefix=$ac_optarg ;;
1188
1189  -gas | --gas | --ga | --g)
1190    # Obsolete; use --with-gas.
1191    with_gas=yes ;;
1192
1193  -help | --help | --hel | --he | -h)
1194    ac_init_help=long ;;
1195  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1196    ac_init_help=recursive ;;
1197  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1198    ac_init_help=short ;;
1199
1200  -host | --host | --hos | --ho)
1201    ac_prev=host_alias ;;
1202  -host=* | --host=* | --hos=* | --ho=*)
1203    host_alias=$ac_optarg ;;
1204
1205  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1206    ac_prev=htmldir ;;
1207  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1208  | --ht=*)
1209    htmldir=$ac_optarg ;;
1210
1211  -includedir | --includedir | --includedi | --included | --include \
1212  | --includ | --inclu | --incl | --inc)
1213    ac_prev=includedir ;;
1214  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1215  | --includ=* | --inclu=* | --incl=* | --inc=*)
1216    includedir=$ac_optarg ;;
1217
1218  -infodir | --infodir | --infodi | --infod | --info | --inf)
1219    ac_prev=infodir ;;
1220  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1221    infodir=$ac_optarg ;;
1222
1223  -libdir | --libdir | --libdi | --libd)
1224    ac_prev=libdir ;;
1225  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1226    libdir=$ac_optarg ;;
1227
1228  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1229  | --libexe | --libex | --libe)
1230    ac_prev=libexecdir ;;
1231  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1232  | --libexe=* | --libex=* | --libe=*)
1233    libexecdir=$ac_optarg ;;
1234
1235  -localedir | --localedir | --localedi | --localed | --locale)
1236    ac_prev=localedir ;;
1237  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1238    localedir=$ac_optarg ;;
1239
1240  -localstatedir | --localstatedir | --localstatedi | --localstated \
1241  | --localstate | --localstat | --localsta | --localst | --locals)
1242    ac_prev=localstatedir ;;
1243  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1244  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1245    localstatedir=$ac_optarg ;;
1246
1247  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1248    ac_prev=mandir ;;
1249  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1250    mandir=$ac_optarg ;;
1251
1252  -nfp | --nfp | --nf)
1253    # Obsolete; use --without-fp.
1254    with_fp=no ;;
1255
1256  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1257  | --no-cr | --no-c | -n)
1258    no_create=yes ;;
1259
1260  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1261  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1262    no_recursion=yes ;;
1263
1264  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1265  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1266  | --oldin | --oldi | --old | --ol | --o)
1267    ac_prev=oldincludedir ;;
1268  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1269  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1270  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1271    oldincludedir=$ac_optarg ;;
1272
1273  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1274    ac_prev=prefix ;;
1275  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1276    prefix=$ac_optarg ;;
1277
1278  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1279  | --program-pre | --program-pr | --program-p)
1280    ac_prev=program_prefix ;;
1281  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1282  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1283    program_prefix=$ac_optarg ;;
1284
1285  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1286  | --program-suf | --program-su | --program-s)
1287    ac_prev=program_suffix ;;
1288  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1289  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1290    program_suffix=$ac_optarg ;;
1291
1292  -program-transform-name | --program-transform-name \
1293  | --program-transform-nam | --program-transform-na \
1294  | --program-transform-n | --program-transform- \
1295  | --program-transform | --program-transfor \
1296  | --program-transfo | --program-transf \
1297  | --program-trans | --program-tran \
1298  | --progr-tra | --program-tr | --program-t)
1299    ac_prev=program_transform_name ;;
1300  -program-transform-name=* | --program-transform-name=* \
1301  | --program-transform-nam=* | --program-transform-na=* \
1302  | --program-transform-n=* | --program-transform-=* \
1303  | --program-transform=* | --program-transfor=* \
1304  | --program-transfo=* | --program-transf=* \
1305  | --program-trans=* | --program-tran=* \
1306  | --progr-tra=* | --program-tr=* | --program-t=*)
1307    program_transform_name=$ac_optarg ;;
1308
1309  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1310    ac_prev=pdfdir ;;
1311  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1312    pdfdir=$ac_optarg ;;
1313
1314  -psdir | --psdir | --psdi | --psd | --ps)
1315    ac_prev=psdir ;;
1316  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1317    psdir=$ac_optarg ;;
1318
1319  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1320  | -silent | --silent | --silen | --sile | --sil)
1321    silent=yes ;;
1322
1323  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1324    ac_prev=sbindir ;;
1325  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1326  | --sbi=* | --sb=*)
1327    sbindir=$ac_optarg ;;
1328
1329  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1330  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1331  | --sharedst | --shareds | --shared | --share | --shar \
1332  | --sha | --sh)
1333    ac_prev=sharedstatedir ;;
1334  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1335  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1336  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1337  | --sha=* | --sh=*)
1338    sharedstatedir=$ac_optarg ;;
1339
1340  -site | --site | --sit)
1341    ac_prev=site ;;
1342  -site=* | --site=* | --sit=*)
1343    site=$ac_optarg ;;
1344
1345  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1346    ac_prev=srcdir ;;
1347  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1348    srcdir=$ac_optarg ;;
1349
1350  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1351  | --syscon | --sysco | --sysc | --sys | --sy)
1352    ac_prev=sysconfdir ;;
1353  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1354  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1355    sysconfdir=$ac_optarg ;;
1356
1357  -target | --target | --targe | --targ | --tar | --ta | --t)
1358    ac_prev=target_alias ;;
1359  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1360    target_alias=$ac_optarg ;;
1361
1362  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1363    verbose=yes ;;
1364
1365  -version | --version | --versio | --versi | --vers | -V)
1366    ac_init_version=: ;;
1367
1368  -with-* | --with-*)
1369    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1370    # Reject names that are not valid shell variable names.
1371    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1372      as_fn_error $? "invalid package name: $ac_useropt"
1373    ac_useropt_orig=$ac_useropt
1374    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1375    case $ac_user_opts in
1376      *"
1377"with_$ac_useropt"
1378"*) ;;
1379      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1380	 ac_unrecognized_sep=', ';;
1381    esac
1382    eval with_$ac_useropt=\$ac_optarg ;;
1383
1384  -without-* | --without-*)
1385    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1386    # Reject names that are not valid shell variable names.
1387    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1388      as_fn_error $? "invalid package name: $ac_useropt"
1389    ac_useropt_orig=$ac_useropt
1390    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1391    case $ac_user_opts in
1392      *"
1393"with_$ac_useropt"
1394"*) ;;
1395      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1396	 ac_unrecognized_sep=', ';;
1397    esac
1398    eval with_$ac_useropt=no ;;
1399
1400  --x)
1401    # Obsolete; use --with-x.
1402    with_x=yes ;;
1403
1404  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1405  | --x-incl | --x-inc | --x-in | --x-i)
1406    ac_prev=x_includes ;;
1407  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1408  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1409    x_includes=$ac_optarg ;;
1410
1411  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1412  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1413    ac_prev=x_libraries ;;
1414  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1415  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1416    x_libraries=$ac_optarg ;;
1417
1418  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1419Try \`$0 --help' for more information"
1420    ;;
1421
1422  *=*)
1423    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1424    # Reject names that are not valid shell variable names.
1425    case $ac_envvar in #(
1426      '' | [0-9]* | *[!_$as_cr_alnum]* )
1427      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1428    esac
1429    eval $ac_envvar=\$ac_optarg
1430    export $ac_envvar ;;
1431
1432  *)
1433    # FIXME: should be removed in autoconf 3.0.
1434    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1435    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1436      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1437    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1438    ;;
1439
1440  esac
1441done
1442
1443if test -n "$ac_prev"; then
1444  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1445  as_fn_error $? "missing argument to $ac_option"
1446fi
1447
1448if test -n "$ac_unrecognized_opts"; then
1449  case $enable_option_checking in
1450    no) ;;
1451    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1452    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1453  esac
1454fi
1455
1456# Check all directory arguments for consistency.
1457for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1458		datadir sysconfdir sharedstatedir localstatedir includedir \
1459		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1460		libdir localedir mandir
1461do
1462  eval ac_val=\$$ac_var
1463  # Remove trailing slashes.
1464  case $ac_val in
1465    */ )
1466      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1467      eval $ac_var=\$ac_val;;
1468  esac
1469  # Be sure to have absolute directory names.
1470  case $ac_val in
1471    [\\/$]* | ?:[\\/]* )  continue;;
1472    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1473  esac
1474  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1475done
1476
1477# There might be people who depend on the old broken behavior: `$host'
1478# used to hold the argument of --host etc.
1479# FIXME: To remove some day.
1480build=$build_alias
1481host=$host_alias
1482target=$target_alias
1483
1484# FIXME: To remove some day.
1485if test "x$host_alias" != x; then
1486  if test "x$build_alias" = x; then
1487    cross_compiling=maybe
1488    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1489    If a cross compiler is detected then cross compile mode will be used" >&2
1490  elif test "x$build_alias" != "x$host_alias"; then
1491    cross_compiling=yes
1492  fi
1493fi
1494
1495ac_tool_prefix=
1496test -n "$host_alias" && ac_tool_prefix=$host_alias-
1497
1498test "$silent" = yes && exec 6>/dev/null
1499
1500
1501ac_pwd=`pwd` && test -n "$ac_pwd" &&
1502ac_ls_di=`ls -di .` &&
1503ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1504  as_fn_error $? "working directory cannot be determined"
1505test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1506  as_fn_error $? "pwd does not report name of working directory"
1507
1508
1509# Find the source files, if location was not specified.
1510if test -z "$srcdir"; then
1511  ac_srcdir_defaulted=yes
1512  # Try the directory containing this script, then the parent directory.
1513  ac_confdir=`$as_dirname -- "$as_myself" ||
1514$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1515	 X"$as_myself" : 'X\(//\)[^/]' \| \
1516	 X"$as_myself" : 'X\(//\)$' \| \
1517	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1518$as_echo X"$as_myself" |
1519    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1520	    s//\1/
1521	    q
1522	  }
1523	  /^X\(\/\/\)[^/].*/{
1524	    s//\1/
1525	    q
1526	  }
1527	  /^X\(\/\/\)$/{
1528	    s//\1/
1529	    q
1530	  }
1531	  /^X\(\/\).*/{
1532	    s//\1/
1533	    q
1534	  }
1535	  s/.*/./; q'`
1536  srcdir=$ac_confdir
1537  if test ! -r "$srcdir/$ac_unique_file"; then
1538    srcdir=..
1539  fi
1540else
1541  ac_srcdir_defaulted=no
1542fi
1543if test ! -r "$srcdir/$ac_unique_file"; then
1544  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1545  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1546fi
1547ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1548ac_abs_confdir=`(
1549	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1550	pwd)`
1551# When building in place, set srcdir=.
1552if test "$ac_abs_confdir" = "$ac_pwd"; then
1553  srcdir=.
1554fi
1555# Remove unnecessary trailing slashes from srcdir.
1556# Double slashes in file names in object file debugging info
1557# mess up M-x gdb in Emacs.
1558case $srcdir in
1559*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1560esac
1561for ac_var in $ac_precious_vars; do
1562  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1563  eval ac_env_${ac_var}_value=\$${ac_var}
1564  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1565  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1566done
1567
1568#
1569# Report the --help message.
1570#
1571if test "$ac_init_help" = "long"; then
1572  # Omit some internal or obsolete options to make the list less imposing.
1573  # This message is too long to be a string in the A/UX 3.1 sh.
1574  cat <<_ACEOF
1575\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1576
1577Usage: $0 [OPTION]... [VAR=VALUE]...
1578
1579To assign environment variables (e.g., CC, CFLAGS...), specify them as
1580VAR=VALUE.  See below for descriptions of some of the useful variables.
1581
1582Defaults for the options are specified in brackets.
1583
1584Configuration:
1585  -h, --help              display this help and exit
1586      --help=short        display options specific to this package
1587      --help=recursive    display the short help of all the included packages
1588  -V, --version           display version information and exit
1589  -q, --quiet, --silent   do not print \`checking ...' messages
1590      --cache-file=FILE   cache test results in FILE [disabled]
1591  -C, --config-cache      alias for \`--cache-file=config.cache'
1592  -n, --no-create         do not create output files
1593      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1594
1595Installation directories:
1596  --prefix=PREFIX         install architecture-independent files in PREFIX
1597                          [$ac_default_prefix]
1598  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1599                          [PREFIX]
1600
1601By default, \`make install' will install all the files in
1602\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1603an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1604for instance \`--prefix=\$HOME'.
1605
1606For better control, use the options below.
1607
1608Fine tuning of the installation directories:
1609  --bindir=DIR            user executables [EPREFIX/bin]
1610  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1611  --libexecdir=DIR        program executables [EPREFIX/libexec]
1612  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1613  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1614  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1615  --libdir=DIR            object code libraries [EPREFIX/lib]
1616  --includedir=DIR        C header files [PREFIX/include]
1617  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1618  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1619  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1620  --infodir=DIR           info documentation [DATAROOTDIR/info]
1621  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1622  --mandir=DIR            man documentation [DATAROOTDIR/man]
1623  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1624  --htmldir=DIR           html documentation [DOCDIR]
1625  --dvidir=DIR            dvi documentation [DOCDIR]
1626  --pdfdir=DIR            pdf documentation [DOCDIR]
1627  --psdir=DIR             ps documentation [DOCDIR]
1628_ACEOF
1629
1630  cat <<\_ACEOF
1631
1632X features:
1633  --x-includes=DIR    X include files are in DIR
1634  --x-libraries=DIR   X library files are in DIR
1635
1636System types:
1637  --build=BUILD     configure for building on BUILD [guessed]
1638  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1639  --target=TARGET   configure for building compilers for TARGET [HOST]
1640_ACEOF
1641fi
1642
1643if test -n "$ac_init_help"; then
1644  case $ac_init_help in
1645     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1646   esac
1647  cat <<\_ACEOF
1648
1649Optional Features:
1650  --disable-option-checking  ignore unrecognized --enable/--with options
1651  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1652  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1653  --enable-openjdk-only   suppress building custom source even if present
1654                          [disabled]
1655  --enable-debug          set the debug level to fastdebug (shorthand for
1656                          --with-debug-level=fastdebug) [disabled]
1657  --disable-headful       disable building headful support (graphical UI
1658                          support) [enabled]
1659  --enable-hotspot-test-in-build
1660                          run the Queens test after Hotspot build [disabled]
1661  --enable-unlimited-crypto
1662                          Enable unlimited crypto policy [disabled]
1663  --disable-debug-symbols disable generation of debug symbols [enabled]
1664  --disable-zip-debug-info
1665                          disable zipping of debug-info files [enabled]
1666  --disable-macosx-runtime-support
1667                          disable the use of MacOSX Java runtime support
1668                          framework [enabled]
1669  --enable-sjavac         use sjavac to do fast incremental compiles
1670                          [disabled]
1671  --disable-precompiled-headers
1672                          disable using precompiled headers when compiling C++
1673                          [enabled]
1674  --disable-ccache        disable using ccache to speed up recompilations
1675                          [enabled]
1676
1677Optional Packages:
1678  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1679  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1680  --with-custom-make-dir  use this directory for custom build/make files
1681  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1682                          support it), e.g. --with-target-bits=32 [guessed]
1683  --with-sys-root         pass this sys-root to the compilers and tools (for
1684                          cross-compiling)
1685  --with-tools-dir        search this directory for compilers and tools (for
1686                          cross-compiling)
1687  --with-devkit           use this directory as base for tools-dir and
1688                          sys-root (for cross-compiling)
1689  --with-jdk-variant      JDK variant to build (normal) [normal]
1690  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1691                          client, minimal1, kernel, zero, zeroshark) [server]
1692  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1693                          [release]
1694  --with-conf-name        use this as the name of the configuration [generated
1695                          from important configuration options]
1696  --with-builddeps-conf   use this configuration file for the builddeps
1697  --with-builddeps-server download and use build dependencies from this server
1698                          url
1699  --with-builddeps-dir    store downloaded build dependencies here
1700                          [/localhome/builddeps]
1701  --with-builddeps-group  chgrp the downloaded build dependencies to this
1702                          group
1703  --with-cacerts-file     specify alternative cacerts file
1704  --with-milestone        Set milestone value for build [internal]
1705  --with-build-number     Set build number value for build [b00]
1706  --with-user-release-suffix
1707                          Add a custom string to the version string if build
1708                          number isn't set.[username_builddateb00]
1709  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1710  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1711                          invocations of the Boot JDK, overriding the default
1712                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1713                          -enableassertions"
1714  --with-add-source-root  for each and every source directory, look in this
1715                          additional source root for the same directory; if it
1716                          exists and have files in it, include it in the build
1717  --with-override-source-root
1718                          for each and every source directory, look in this
1719                          override source root for the same directory; if it
1720                          exists, use that directory instead and ignore the
1721                          directory in the original source root
1722  --with-adds-and-overrides
1723                          use the subdirs 'adds' and 'overrides' in the
1724                          specified directory as add-source-root and
1725                          override-source-root
1726  --with-override-langtools
1727                          use this langtools dir for the build
1728  --with-override-corba   use this corba dir for the build
1729  --with-override-jaxp    use this jaxp dir for the build
1730  --with-override-jaxws   use this jaxws dir for the build
1731  --with-override-hotspot use this hotspot dir for the build
1732  --with-override-jdk     use this jdk dir for the build
1733  --with-import-hotspot   import hotspot binaries from this jdk image or
1734                          hotspot build dist dir instead of building from
1735                          source
1736  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1737                          only) [probed]
1738  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1739  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1740  --with-extra-ldflags    extra flags to be used when linking jdk
1741  --with-x                use the X Window System
1742  --with-cups             specify prefix directory for the cups package
1743                          (expecting the headers under PATH/include)
1744  --with-cups-include     specify directory for the cups include files
1745  --with-freetype         specify prefix directory for the freetype2 package
1746                          (expecting the libraries under PATH/lib and the
1747                          headers under PATH/include)
1748  --with-alsa             specify prefix directory for the alsa package
1749                          (expecting the libraries under PATH/lib and the
1750                          headers under PATH/include)
1751  --with-alsa-include     specify directory for the alsa include files
1752  --with-alsa-lib         specify directory for the alsa library
1753  --with-zlib             use zlib from build system or OpenJDK source
1754                          (system, bundled) [bundled]
1755  --with-stdc++lib=<static>,<dynamic>,<default>
1756                          force linking of the C++ runtime on Linux to either
1757                          static or dynamic, default is static with dynamic as
1758                          fallback
1759  --with-num-cores        number of cores in the build system, e.g.
1760                          --with-num-cores=8 [probed]
1761  --with-memory-size      memory (in MB) available in the build system, e.g.
1762                          --with-memory-size=1024 [probed]
1763  --with-sjavac-server-java
1764                          use this java binary for running the sjavac
1765                          background server [Boot JDK java]
1766  --with-sjavac-server-cores
1767                          use at most this number of concurrent threads on the
1768                          sjavac server [probed]
1769  --with-ccache-dir       where to store ccache files [~/.ccache]
1770
1771Some influential environment variables:
1772  PKG_CONFIG  path to pkg-config utility
1773  CC          C compiler command
1774  CFLAGS      C compiler flags
1775  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1776              nonstandard directory <lib dir>
1777  LIBS        libraries to pass to the linker, e.g. -l<library>
1778  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1779              you have headers in a nonstandard directory <include dir>
1780  CXX         C++ compiler command
1781  CXXFLAGS    C++ compiler flags
1782  OBJC        Objective C compiler command
1783  OBJCFLAGS   Objective C compiler flags
1784  CPP         C preprocessor
1785  CXXCPP      C++ preprocessor
1786  XMKMF       Path to xmkmf, Makefile generator for X Window System
1787  FREETYPE2_CFLAGS
1788              C compiler flags for FREETYPE2, overriding pkg-config
1789  FREETYPE2_LIBS
1790              linker flags for FREETYPE2, overriding pkg-config
1791  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1792  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1793
1794Use these variables to override the choices made by `configure' or to help
1795it to find libraries and programs with nonstandard names/locations.
1796
1797Report bugs to <build-dev@openjdk.java.net>.
1798OpenJDK home page: <http://openjdk.java.net>.
1799_ACEOF
1800ac_status=$?
1801fi
1802
1803if test "$ac_init_help" = "recursive"; then
1804  # If there are subdirs, report their specific --help.
1805  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1806    test -d "$ac_dir" ||
1807      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1808      continue
1809    ac_builddir=.
1810
1811case "$ac_dir" in
1812.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1813*)
1814  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1815  # A ".." for each directory in $ac_dir_suffix.
1816  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1817  case $ac_top_builddir_sub in
1818  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1819  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1820  esac ;;
1821esac
1822ac_abs_top_builddir=$ac_pwd
1823ac_abs_builddir=$ac_pwd$ac_dir_suffix
1824# for backward compatibility:
1825ac_top_builddir=$ac_top_build_prefix
1826
1827case $srcdir in
1828  .)  # We are building in place.
1829    ac_srcdir=.
1830    ac_top_srcdir=$ac_top_builddir_sub
1831    ac_abs_top_srcdir=$ac_pwd ;;
1832  [\\/]* | ?:[\\/]* )  # Absolute name.
1833    ac_srcdir=$srcdir$ac_dir_suffix;
1834    ac_top_srcdir=$srcdir
1835    ac_abs_top_srcdir=$srcdir ;;
1836  *) # Relative name.
1837    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1838    ac_top_srcdir=$ac_top_build_prefix$srcdir
1839    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1840esac
1841ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1842
1843    cd "$ac_dir" || { ac_status=$?; continue; }
1844    # Check for guested configure.
1845    if test -f "$ac_srcdir/configure.gnu"; then
1846      echo &&
1847      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1848    elif test -f "$ac_srcdir/configure"; then
1849      echo &&
1850      $SHELL "$ac_srcdir/configure" --help=recursive
1851    else
1852      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1853    fi || ac_status=$?
1854    cd "$ac_pwd" || { ac_status=$?; break; }
1855  done
1856fi
1857
1858test -n "$ac_init_help" && exit $ac_status
1859if $ac_init_version; then
1860  cat <<\_ACEOF
1861OpenJDK configure jdk8
1862generated by GNU Autoconf 2.67
1863
1864Copyright (C) 2010 Free Software Foundation, Inc.
1865This configure script is free software; the Free Software Foundation
1866gives unlimited permission to copy, distribute and modify it.
1867_ACEOF
1868  exit
1869fi
1870
1871## ------------------------ ##
1872## Autoconf initialization. ##
1873## ------------------------ ##
1874
1875# ac_fn_c_try_compile LINENO
1876# --------------------------
1877# Try to compile conftest.$ac_ext, and return whether this succeeded.
1878ac_fn_c_try_compile ()
1879{
1880  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881  rm -f conftest.$ac_objext
1882  if { { ac_try="$ac_compile"
1883case "(($ac_try" in
1884  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885  *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889  (eval "$ac_compile") 2>conftest.err
1890  ac_status=$?
1891  if test -s conftest.err; then
1892    grep -v '^ *+' conftest.err >conftest.er1
1893    cat conftest.er1 >&5
1894    mv -f conftest.er1 conftest.err
1895  fi
1896  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897  test $ac_status = 0; } && {
1898	 test -z "$ac_c_werror_flag" ||
1899	 test ! -s conftest.err
1900       } && test -s conftest.$ac_objext; then :
1901  ac_retval=0
1902else
1903  $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
1905
1906	ac_retval=1
1907fi
1908  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909  as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_compile
1912
1913# ac_fn_cxx_try_compile LINENO
1914# ----------------------------
1915# Try to compile conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_cxx_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_cxx_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_cxx_try_compile
1950
1951# ac_fn_objc_try_compile LINENO
1952# -----------------------------
1953# Try to compile conftest.$ac_ext, and return whether this succeeded.
1954ac_fn_objc_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_objc_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_objc_try_compile
1988
1989# ac_fn_c_try_cpp LINENO
1990# ----------------------
1991# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1992ac_fn_c_try_cpp ()
1993{
1994  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995  if { { ac_try="$ac_cpp conftest.$ac_ext"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } > conftest.i && {
2011	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2012	 test ! -s conftest.err
2013       }; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019    ac_retval=1
2020fi
2021  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_c_try_cpp
2025
2026# ac_fn_cxx_try_cpp LINENO
2027# ------------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_cxx_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_cxx_try_cpp
2062
2063# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2064# ---------------------------------------------------------
2065# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2066# the include files in INCLUDES and setting the cache variable VAR
2067# accordingly.
2068ac_fn_cxx_check_header_mongrel ()
2069{
2070  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071  if eval "test \"\${$3+set}\"" = set; then :
2072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073$as_echo_n "checking for $2... " >&6; }
2074if eval "test \"\${$3+set}\"" = set; then :
2075  $as_echo_n "(cached) " >&6
2076fi
2077eval ac_res=\$$3
2078	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2079$as_echo "$ac_res" >&6; }
2080else
2081  # Is the header compilable?
2082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2083$as_echo_n "checking $2 usability... " >&6; }
2084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h.  */
2086$4
2087#include <$2>
2088_ACEOF
2089if ac_fn_cxx_try_compile "$LINENO"; then :
2090  ac_header_compiler=yes
2091else
2092  ac_header_compiler=no
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2096$as_echo "$ac_header_compiler" >&6; }
2097
2098# Is the header present?
2099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2100$as_echo_n "checking $2 presence... " >&6; }
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h.  */
2103#include <$2>
2104_ACEOF
2105if ac_fn_cxx_try_cpp "$LINENO"; then :
2106  ac_header_preproc=yes
2107else
2108  ac_header_preproc=no
2109fi
2110rm -f conftest.err conftest.i conftest.$ac_ext
2111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2112$as_echo "$ac_header_preproc" >&6; }
2113
2114# So?  What about this header?
2115case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2116  yes:no: )
2117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2118$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2119    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2120$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2121    ;;
2122  no:yes:* )
2123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2124$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2126$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2128$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2130$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2132$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2133( $as_echo "## ----------------------------------------- ##
2134## Report this to build-dev@openjdk.java.net ##
2135## ----------------------------------------- ##"
2136     ) | sed "s/^/$as_me: WARNING:     /" >&2
2137    ;;
2138esac
2139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140$as_echo_n "checking for $2... " >&6; }
2141if eval "test \"\${$3+set}\"" = set; then :
2142  $as_echo_n "(cached) " >&6
2143else
2144  eval "$3=\$ac_header_compiler"
2145fi
2146eval ac_res=\$$3
2147	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2148$as_echo "$ac_res" >&6; }
2149fi
2150  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2151
2152} # ac_fn_cxx_check_header_mongrel
2153
2154# ac_fn_cxx_try_run LINENO
2155# ------------------------
2156# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2157# that executables *can* be run.
2158ac_fn_cxx_try_run ()
2159{
2160  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161  if { { ac_try="$ac_link"
2162case "(($ac_try" in
2163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2164  *) ac_try_echo=$ac_try;;
2165esac
2166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2167$as_echo "$ac_try_echo"; } >&5
2168  (eval "$ac_link") 2>&5
2169  ac_status=$?
2170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2171  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2172  { { case "(($ac_try" in
2173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2174  *) ac_try_echo=$ac_try;;
2175esac
2176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2177$as_echo "$ac_try_echo"; } >&5
2178  (eval "$ac_try") 2>&5
2179  ac_status=$?
2180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2181  test $ac_status = 0; }; }; then :
2182  ac_retval=0
2183else
2184  $as_echo "$as_me: program exited with status $ac_status" >&5
2185       $as_echo "$as_me: failed program was:" >&5
2186sed 's/^/| /' conftest.$ac_ext >&5
2187
2188       ac_retval=$ac_status
2189fi
2190  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2191  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2192  as_fn_set_status $ac_retval
2193
2194} # ac_fn_cxx_try_run
2195
2196# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2197# ---------------------------------------------------------
2198# Tests whether HEADER exists and can be compiled using the include files in
2199# INCLUDES, setting the cache variable VAR accordingly.
2200ac_fn_cxx_check_header_compile ()
2201{
2202  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2204$as_echo_n "checking for $2... " >&6; }
2205if eval "test \"\${$3+set}\"" = set; then :
2206  $as_echo_n "(cached) " >&6
2207else
2208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h.  */
2210$4
2211#include <$2>
2212_ACEOF
2213if ac_fn_cxx_try_compile "$LINENO"; then :
2214  eval "$3=yes"
2215else
2216  eval "$3=no"
2217fi
2218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
2223  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2224
2225} # ac_fn_cxx_check_header_compile
2226
2227# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2228# ----------------------------------------------
2229# Tries to find the compile-time value of EXPR in a program that includes
2230# INCLUDES, setting VAR accordingly. Returns whether the value could be
2231# computed
2232ac_fn_cxx_compute_int ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  if test "$cross_compiling" = yes; then
2236    # Depending upon the size, compute the lo and hi bounds.
2237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h.  */
2239$4
2240int
2241main ()
2242{
2243static int test_array [1 - 2 * !(($2) >= 0)];
2244test_array [0] = 0
2245
2246  ;
2247  return 0;
2248}
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  ac_lo=0 ac_mid=0
2252  while :; do
2253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h.  */
2255$4
2256int
2257main ()
2258{
2259static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2260test_array [0] = 0
2261
2262  ;
2263  return 0;
2264}
2265_ACEOF
2266if ac_fn_cxx_try_compile "$LINENO"; then :
2267  ac_hi=$ac_mid; break
2268else
2269  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2270			if test $ac_lo -le $ac_mid; then
2271			  ac_lo= ac_hi=
2272			  break
2273			fi
2274			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277  done
2278else
2279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) < 0)];
2286test_array [0] = 0
2287
2288  ;
2289  return 0;
2290}
2291_ACEOF
2292if ac_fn_cxx_try_compile "$LINENO"; then :
2293  ac_hi=-1 ac_mid=-1
2294  while :; do
2295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h.  */
2297$4
2298int
2299main ()
2300{
2301static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2302test_array [0] = 0
2303
2304  ;
2305  return 0;
2306}
2307_ACEOF
2308if ac_fn_cxx_try_compile "$LINENO"; then :
2309  ac_lo=$ac_mid; break
2310else
2311  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2312			if test $ac_mid -le $ac_hi; then
2313			  ac_lo= ac_hi=
2314			  break
2315			fi
2316			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319  done
2320else
2321  ac_lo= ac_hi=
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326# Binary search between lo and hi bounds.
2327while test "x$ac_lo" != "x$ac_hi"; do
2328  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h.  */
2331$4
2332int
2333main ()
2334{
2335static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336test_array [0] = 0
2337
2338  ;
2339  return 0;
2340}
2341_ACEOF
2342if ac_fn_cxx_try_compile "$LINENO"; then :
2343  ac_hi=$ac_mid
2344else
2345  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348done
2349case $ac_lo in #((
2350?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2351'') ac_retval=1 ;;
2352esac
2353  else
2354    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h.  */
2356$4
2357static long int longval () { return $2; }
2358static unsigned long int ulongval () { return $2; }
2359#include <stdio.h>
2360#include <stdlib.h>
2361int
2362main ()
2363{
2364
2365  FILE *f = fopen ("conftest.val", "w");
2366  if (! f)
2367    return 1;
2368  if (($2) < 0)
2369    {
2370      long int i = longval ();
2371      if (i != ($2))
2372	return 1;
2373      fprintf (f, "%ld", i);
2374    }
2375  else
2376    {
2377      unsigned long int i = ulongval ();
2378      if (i != ($2))
2379	return 1;
2380      fprintf (f, "%lu", i);
2381    }
2382  /* Do not output a trailing newline, as this causes \r\n confusion
2383     on some platforms.  */
2384  return ferror (f) || fclose (f) != 0;
2385
2386  ;
2387  return 0;
2388}
2389_ACEOF
2390if ac_fn_cxx_try_run "$LINENO"; then :
2391  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2392else
2393  ac_retval=1
2394fi
2395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2396  conftest.$ac_objext conftest.beam conftest.$ac_ext
2397rm -f conftest.val
2398
2399  fi
2400  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401  as_fn_set_status $ac_retval
2402
2403} # ac_fn_cxx_compute_int
2404
2405# ac_fn_cxx_try_link LINENO
2406# -------------------------
2407# Try to link conftest.$ac_ext, and return whether this succeeded.
2408ac_fn_cxx_try_link ()
2409{
2410  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411  rm -f conftest.$ac_objext conftest$ac_exeext
2412  if { { ac_try="$ac_link"
2413case "(($ac_try" in
2414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415  *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419  (eval "$ac_link") 2>conftest.err
2420  ac_status=$?
2421  if test -s conftest.err; then
2422    grep -v '^ *+' conftest.err >conftest.er1
2423    cat conftest.er1 >&5
2424    mv -f conftest.er1 conftest.err
2425  fi
2426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427  test $ac_status = 0; } && {
2428	 test -z "$ac_cxx_werror_flag" ||
2429	 test ! -s conftest.err
2430       } && test -s conftest$ac_exeext && {
2431	 test "$cross_compiling" = yes ||
2432	 $as_test_x conftest$ac_exeext
2433       }; then :
2434  ac_retval=0
2435else
2436  $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439	ac_retval=1
2440fi
2441  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2442  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2443  # interfere with the next link command; also delete a directory that is
2444  # left behind by Apple's compiler.  We do this before executing the actions.
2445  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2446  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_cxx_try_link
2450
2451# ac_fn_cxx_check_func LINENO FUNC VAR
2452# ------------------------------------
2453# Tests whether FUNC exists, setting the cache variable VAR accordingly
2454ac_fn_cxx_check_func ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2458$as_echo_n "checking for $2... " >&6; }
2459if eval "test \"\${$3+set}\"" = set; then :
2460  $as_echo_n "(cached) " >&6
2461else
2462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2465   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2466#define $2 innocuous_$2
2467
2468/* System header to define __stub macros and hopefully few prototypes,
2469    which can conflict with char $2 (); below.
2470    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2471    <limits.h> exists even on freestanding compilers.  */
2472
2473#ifdef __STDC__
2474# include <limits.h>
2475#else
2476# include <assert.h>
2477#endif
2478
2479#undef $2
2480
2481/* Override any GCC internal prototype to avoid an error.
2482   Use char because int might match the return type of a GCC
2483   builtin and then its argument prototype would still apply.  */
2484#ifdef __cplusplus
2485extern "C"
2486#endif
2487char $2 ();
2488/* The GNU C library defines this for functions which it implements
2489    to always fail with ENOSYS.  Some functions are actually named
2490    something starting with __ and the normal name is an alias.  */
2491#if defined __stub_$2 || defined __stub___$2
2492choke me
2493#endif
2494
2495int
2496main ()
2497{
2498return $2 ();
2499  ;
2500  return 0;
2501}
2502_ACEOF
2503if ac_fn_cxx_try_link "$LINENO"; then :
2504  eval "$3=yes"
2505else
2506  eval "$3=no"
2507fi
2508rm -f core conftest.err conftest.$ac_objext \
2509    conftest$ac_exeext conftest.$ac_ext
2510fi
2511eval ac_res=\$$3
2512	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513$as_echo "$ac_res" >&6; }
2514  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2515
2516} # ac_fn_cxx_check_func
2517
2518# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2519# -------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_c_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval "test \"\${$3+set}\"" = set; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_c_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2546
2547} # ac_fn_c_check_header_compile
2548cat >config.log <<_ACEOF
2549This file contains any messages produced by compilers while
2550running configure, to aid debugging if configure makes a mistake.
2551
2552It was created by OpenJDK $as_me jdk8, which was
2553generated by GNU Autoconf 2.67.  Invocation command line was
2554
2555  $ $0 $@
2556
2557_ACEOF
2558exec 5>>config.log
2559{
2560cat <<_ASUNAME
2561## --------- ##
2562## Platform. ##
2563## --------- ##
2564
2565hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2566uname -m = `(uname -m) 2>/dev/null || echo unknown`
2567uname -r = `(uname -r) 2>/dev/null || echo unknown`
2568uname -s = `(uname -s) 2>/dev/null || echo unknown`
2569uname -v = `(uname -v) 2>/dev/null || echo unknown`
2570
2571/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2572/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2573
2574/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2575/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2576/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2577/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2578/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2579/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2580/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2581
2582_ASUNAME
2583
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587  IFS=$as_save_IFS
2588  test -z "$as_dir" && as_dir=.
2589    $as_echo "PATH: $as_dir"
2590  done
2591IFS=$as_save_IFS
2592
2593} >&5
2594
2595cat >&5 <<_ACEOF
2596
2597
2598## ----------- ##
2599## Core tests. ##
2600## ----------- ##
2601
2602_ACEOF
2603
2604
2605# Keep a trace of the command line.
2606# Strip out --no-create and --no-recursion so they do not pile up.
2607# Strip out --silent because we don't want to record it for future runs.
2608# Also quote any args containing shell meta-characters.
2609# Make two passes to allow for proper duplicate-argument suppression.
2610ac_configure_args=
2611ac_configure_args0=
2612ac_configure_args1=
2613ac_must_keep_next=false
2614for ac_pass in 1 2
2615do
2616  for ac_arg
2617  do
2618    case $ac_arg in
2619    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2620    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2621    | -silent | --silent | --silen | --sile | --sil)
2622      continue ;;
2623    *\'*)
2624      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2625    esac
2626    case $ac_pass in
2627    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2628    2)
2629      as_fn_append ac_configure_args1 " '$ac_arg'"
2630      if test $ac_must_keep_next = true; then
2631	ac_must_keep_next=false # Got value, back to normal.
2632      else
2633	case $ac_arg in
2634	  *=* | --config-cache | -C | -disable-* | --disable-* \
2635	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2636	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2637	  | -with-* | --with-* | -without-* | --without-* | --x)
2638	    case "$ac_configure_args0 " in
2639	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2640	    esac
2641	    ;;
2642	  -* ) ac_must_keep_next=true ;;
2643	esac
2644      fi
2645      as_fn_append ac_configure_args " '$ac_arg'"
2646      ;;
2647    esac
2648  done
2649done
2650{ ac_configure_args0=; unset ac_configure_args0;}
2651{ ac_configure_args1=; unset ac_configure_args1;}
2652
2653# When interrupted or exit'd, cleanup temporary files, and complete
2654# config.log.  We remove comments because anyway the quotes in there
2655# would cause problems or look ugly.
2656# WARNING: Use '\'' to represent an apostrophe within the trap.
2657# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2658trap 'exit_status=$?
2659  # Save into config.log some information that might help in debugging.
2660  {
2661    echo
2662
2663    $as_echo "## ---------------- ##
2664## Cache variables. ##
2665## ---------------- ##"
2666    echo
2667    # The following way of writing the cache mishandles newlines in values,
2668(
2669  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2670    eval ac_val=\$$ac_var
2671    case $ac_val in #(
2672    *${as_nl}*)
2673      case $ac_var in #(
2674      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2675$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2676      esac
2677      case $ac_var in #(
2678      _ | IFS | as_nl) ;; #(
2679      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2680      *) { eval $ac_var=; unset $ac_var;} ;;
2681      esac ;;
2682    esac
2683  done
2684  (set) 2>&1 |
2685    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2686    *${as_nl}ac_space=\ *)
2687      sed -n \
2688	"s/'\''/'\''\\\\'\'''\''/g;
2689	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2690      ;; #(
2691    *)
2692      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2693      ;;
2694    esac |
2695    sort
2696)
2697    echo
2698
2699    $as_echo "## ----------------- ##
2700## Output variables. ##
2701## ----------------- ##"
2702    echo
2703    for ac_var in $ac_subst_vars
2704    do
2705      eval ac_val=\$$ac_var
2706      case $ac_val in
2707      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2708      esac
2709      $as_echo "$ac_var='\''$ac_val'\''"
2710    done | sort
2711    echo
2712
2713    if test -n "$ac_subst_files"; then
2714      $as_echo "## ------------------- ##
2715## File substitutions. ##
2716## ------------------- ##"
2717      echo
2718      for ac_var in $ac_subst_files
2719      do
2720	eval ac_val=\$$ac_var
2721	case $ac_val in
2722	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2723	esac
2724	$as_echo "$ac_var='\''$ac_val'\''"
2725      done | sort
2726      echo
2727    fi
2728
2729    if test -s confdefs.h; then
2730      $as_echo "## ----------- ##
2731## confdefs.h. ##
2732## ----------- ##"
2733      echo
2734      cat confdefs.h
2735      echo
2736    fi
2737    test "$ac_signal" != 0 &&
2738      $as_echo "$as_me: caught signal $ac_signal"
2739    $as_echo "$as_me: exit $exit_status"
2740  } >&5
2741  rm -f core *.core core.conftest.* &&
2742    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2743    exit $exit_status
2744' 0
2745for ac_signal in 1 2 13 15; do
2746  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2747done
2748ac_signal=0
2749
2750# confdefs.h avoids OS command line length limits that DEFS can exceed.
2751rm -f -r conftest* confdefs.h
2752
2753$as_echo "/* confdefs.h */" > confdefs.h
2754
2755# Predefined preprocessor variables.
2756
2757cat >>confdefs.h <<_ACEOF
2758#define PACKAGE_NAME "$PACKAGE_NAME"
2759_ACEOF
2760
2761cat >>confdefs.h <<_ACEOF
2762#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2763_ACEOF
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_VERSION "$PACKAGE_VERSION"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_STRING "$PACKAGE_STRING"
2771_ACEOF
2772
2773cat >>confdefs.h <<_ACEOF
2774#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2775_ACEOF
2776
2777cat >>confdefs.h <<_ACEOF
2778#define PACKAGE_URL "$PACKAGE_URL"
2779_ACEOF
2780
2781
2782# Let the site file select an alternate cache file if it wants to.
2783# Prefer an explicitly selected file to automatically selected ones.
2784ac_site_file1=NONE
2785ac_site_file2=NONE
2786if test -n "$CONFIG_SITE"; then
2787  # We do not want a PATH search for config.site.
2788  case $CONFIG_SITE in #((
2789    -*)  ac_site_file1=./$CONFIG_SITE;;
2790    */*) ac_site_file1=$CONFIG_SITE;;
2791    *)   ac_site_file1=./$CONFIG_SITE;;
2792  esac
2793elif test "x$prefix" != xNONE; then
2794  ac_site_file1=$prefix/share/config.site
2795  ac_site_file2=$prefix/etc/config.site
2796else
2797  ac_site_file1=$ac_default_prefix/share/config.site
2798  ac_site_file2=$ac_default_prefix/etc/config.site
2799fi
2800for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2801do
2802  test "x$ac_site_file" = xNONE && continue
2803  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2804    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2805$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2806    sed 's/^/| /' "$ac_site_file" >&5
2807    . "$ac_site_file" \
2808      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2810as_fn_error $? "failed to load site script $ac_site_file
2811See \`config.log' for more details" "$LINENO" 5 ; }
2812  fi
2813done
2814
2815if test -r "$cache_file"; then
2816  # Some versions of bash will fail to source /dev/null (special files
2817  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2818  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2819    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2820$as_echo "$as_me: loading cache $cache_file" >&6;}
2821    case $cache_file in
2822      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2823      *)                      . "./$cache_file";;
2824    esac
2825  fi
2826else
2827  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2828$as_echo "$as_me: creating cache $cache_file" >&6;}
2829  >$cache_file
2830fi
2831
2832# Check that the precious variables saved in the cache have kept the same
2833# value.
2834ac_cache_corrupted=false
2835for ac_var in $ac_precious_vars; do
2836  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2837  eval ac_new_set=\$ac_env_${ac_var}_set
2838  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2839  eval ac_new_val=\$ac_env_${ac_var}_value
2840  case $ac_old_set,$ac_new_set in
2841    set,)
2842      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2843$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2844      ac_cache_corrupted=: ;;
2845    ,set)
2846      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2847$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2848      ac_cache_corrupted=: ;;
2849    ,);;
2850    *)
2851      if test "x$ac_old_val" != "x$ac_new_val"; then
2852	# differences in whitespace do not lead to failure.
2853	ac_old_val_w=`echo x $ac_old_val`
2854	ac_new_val_w=`echo x $ac_new_val`
2855	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2856	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2857$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2858	  ac_cache_corrupted=:
2859	else
2860	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2861$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2862	  eval $ac_var=\$ac_old_val
2863	fi
2864	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2865$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2866	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2867$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2868      fi;;
2869  esac
2870  # Pass precious variables to config.status.
2871  if test "$ac_new_set" = set; then
2872    case $ac_new_val in
2873    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2874    *) ac_arg=$ac_var=$ac_new_val ;;
2875    esac
2876    case " $ac_configure_args " in
2877      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2878      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2879    esac
2880  fi
2881done
2882if $ac_cache_corrupted; then
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2885  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2886$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2887  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2888fi
2889## -------------------- ##
2890## Main body of script. ##
2891## -------------------- ##
2892
2893ac_ext=c
2894ac_cpp='$CPP $CPPFLAGS'
2895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897ac_compiler_gnu=$ac_cv_c_compiler_gnu
2898
2899
2900
2901ac_aux_dir=
2902for ac_dir in build-aux "$srcdir"/build-aux; do
2903  if test -f "$ac_dir/install-sh"; then
2904    ac_aux_dir=$ac_dir
2905    ac_install_sh="$ac_aux_dir/install-sh -c"
2906    break
2907  elif test -f "$ac_dir/install.sh"; then
2908    ac_aux_dir=$ac_dir
2909    ac_install_sh="$ac_aux_dir/install.sh -c"
2910    break
2911  elif test -f "$ac_dir/shtool"; then
2912    ac_aux_dir=$ac_dir
2913    ac_install_sh="$ac_aux_dir/shtool install -c"
2914    break
2915  fi
2916done
2917if test -z "$ac_aux_dir"; then
2918  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2919fi
2920
2921# These three variables are undocumented and unsupported,
2922# and are intended to be withdrawn in a future Autoconf release.
2923# They can cause serious problems if a builder's source tree is in a directory
2924# whose full name contains unusual characters.
2925ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2926ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2927ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2928
2929
2930# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2931
2932#
2933# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2935#
2936# This code is free software; you can redistribute it and/or modify it
2937# under the terms of the GNU General Public License version 2 only, as
2938# published by the Free Software Foundation.  Oracle designates this
2939# particular file as subject to the "Classpath" exception as provided
2940# by Oracle in the LICENSE file that accompanied this code.
2941#
2942# This code is distributed in the hope that it will be useful, but WITHOUT
2943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2945# version 2 for more details (a copy is included in the LICENSE file that
2946# accompanied this code).
2947#
2948# You should have received a copy of the GNU General Public License version
2949# 2 along with this work; if not, write to the Free Software Foundation,
2950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2951#
2952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2953# or visit www.oracle.com if you need additional information or have any
2954# questions.
2955#
2956
2957#
2958# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2959#
2960# This program is free software; you can redistribute it and/or modify
2961# it under the terms of the GNU General Public License as published by
2962# the Free Software Foundation; either version 2 of the License, or
2963# (at your option) any later version.
2964#
2965# This program is distributed in the hope that it will be useful, but
2966# WITHOUT ANY WARRANTY; without even the implied warranty of
2967# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2968# General Public License for more details.
2969#
2970# You should have received a copy of the GNU General Public License
2971# along with this program; if not, write to the Free Software
2972# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2973#
2974# As a special exception to the GNU General Public License, if you
2975# distribute this file as part of a program that contains a
2976# configuration script generated by Autoconf, you may include it under
2977# the same distribution terms that you use for the rest of that program.
2978
2979# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2980# ----------------------------------
2981# PKG_PROG_PKG_CONFIG
2982
2983# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2984#
2985# Check to see whether a particular set of modules exists.  Similar
2986# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2987#
2988#
2989# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2990# this or PKG_CHECK_MODULES is called, or make sure to call
2991# PKG_CHECK_EXISTS manually
2992# --------------------------------------------------------------
2993
2994
2995
2996# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2997# ---------------------------------------------
2998# _PKG_CONFIG
2999
3000# _PKG_SHORT_ERRORS_SUPPORTED
3001# -----------------------------
3002# _PKG_SHORT_ERRORS_SUPPORTED
3003
3004
3005# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3006# [ACTION-IF-NOT-FOUND])
3007#
3008#
3009# Note that if there is a possibility the first call to
3010# PKG_CHECK_MODULES might not happen, you should be sure to include an
3011# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3012#
3013#
3014# --------------------------------------------------------------
3015# PKG_CHECK_MODULES
3016
3017
3018# Include these first...
3019#
3020# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3021# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3022#
3023# This code is free software; you can redistribute it and/or modify it
3024# under the terms of the GNU General Public License version 2 only, as
3025# published by the Free Software Foundation.  Oracle designates this
3026# particular file as subject to the "Classpath" exception as provided
3027# by Oracle in the LICENSE file that accompanied this code.
3028#
3029# This code is distributed in the hope that it will be useful, but WITHOUT
3030# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3031# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3032# version 2 for more details (a copy is included in the LICENSE file that
3033# accompanied this code).
3034#
3035# You should have received a copy of the GNU General Public License version
3036# 2 along with this work; if not, write to the Free Software Foundation,
3037# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3038#
3039# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3040# or visit www.oracle.com if you need additional information or have any
3041# questions.
3042#
3043
3044
3045
3046# This will make sure the given variable points to a full and proper
3047# path. This means:
3048# 1) There will be no spaces in the path. On posix platforms,
3049#    spaces in the path will result in an error. On Windows,
3050#    the path will be rewritten using short-style to be space-free.
3051# 2) The path will be absolute, and it will be in unix-style (on
3052#     cygwin).
3053# $1: The name of the variable to fix
3054
3055
3056# This will make sure the given variable points to a executable
3057# with a full and proper path. This means:
3058# 1) There will be no spaces in the path. On posix platforms,
3059#    spaces in the path will result in an error. On Windows,
3060#    the path will be rewritten using short-style to be space-free.
3061# 2) The path will be absolute, and it will be in unix-style (on
3062#     cygwin).
3063# Any arguments given to the executable is preserved.
3064# If the input variable does not have a directory specification, then
3065# it need to be in the PATH.
3066# $1: The name of the variable to fix
3067
3068
3069
3070
3071
3072
3073# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3074# $1: variable to check
3075# $2: executable name to print in warning (optional)
3076
3077
3078# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3079# Arguments as AC_PATH_PROG:
3080# $1: variable to set
3081# $2: executable name to look for
3082
3083
3084# Setup the most fundamental tools that relies on not much else to set up,
3085# but is used by much of the early bootstrap code.
3086
3087
3088# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3089
3090
3091
3092
3093
3094
3095
3096#%%% Simple tools %%%
3097
3098# Check if we have found a usable version of make
3099# $1: the path to a potential make binary (or empty)
3100# $2: the description on how we found this
3101
3102
3103# Goes looking for a usable version of GNU make.
3104
3105
3106
3107
3108
3109
3110# Check if build directory is on local disk. If not possible to determine,
3111# we prefer to claim it's local.
3112# Argument 1: directory to test
3113# Argument 2: what to do if it is on local disk
3114# Argument 3: what to do otherwise (remote disk or failure)
3115
3116
3117# Check that source files have basic read permissions set. This might
3118# not be the case in cygwin in certain conditions.
3119
3120
3121
3122
3123#
3124# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3126#
3127# This code is free software; you can redistribute it and/or modify it
3128# under the terms of the GNU General Public License version 2 only, as
3129# published by the Free Software Foundation.  Oracle designates this
3130# particular file as subject to the "Classpath" exception as provided
3131# by Oracle in the LICENSE file that accompanied this code.
3132#
3133# This code is distributed in the hope that it will be useful, but WITHOUT
3134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3136# version 2 for more details (a copy is included in the LICENSE file that
3137# accompanied this code).
3138#
3139# You should have received a copy of the GNU General Public License version
3140# 2 along with this work; if not, write to the Free Software Foundation,
3141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3142#
3143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3144# or visit www.oracle.com if you need additional information or have any
3145# questions.
3146#
3147
3148
3149
3150
3151
3152# Helper function which possibly converts a path using DOS-style short mode.
3153# If so, the updated path is stored in $new_path.
3154# $1: The path to check
3155
3156
3157# Helper function which possibly converts a path using DOS-style short mode.
3158# If so, the updated path is stored in $new_path.
3159# $1: The path to check
3160
3161
3162# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3163# and could probably be heavily simplified. However, all changes in this
3164# area tend to need lot of testing in different scenarios, and in lack of
3165# proper unit testing, cleaning this up has not been deemed worth the effort
3166# at the moment.
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3177
3178
3179
3180
3181#
3182# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3183# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3184#
3185# This code is free software; you can redistribute it and/or modify it
3186# under the terms of the GNU General Public License version 2 only, as
3187# published by the Free Software Foundation.  Oracle designates this
3188# particular file as subject to the "Classpath" exception as provided
3189# by Oracle in the LICENSE file that accompanied this code.
3190#
3191# This code is distributed in the hope that it will be useful, but WITHOUT
3192# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3193# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3194# version 2 for more details (a copy is included in the LICENSE file that
3195# accompanied this code).
3196#
3197# You should have received a copy of the GNU General Public License version
3198# 2 along with this work; if not, write to the Free Software Foundation,
3199# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3200#
3201# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3202# or visit www.oracle.com if you need additional information or have any
3203# questions.
3204#
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216# ... then the rest
3217#
3218# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3219# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3220#
3221# This code is free software; you can redistribute it and/or modify it
3222# under the terms of the GNU General Public License version 2 only, as
3223# published by the Free Software Foundation.  Oracle designates this
3224# particular file as subject to the "Classpath" exception as provided
3225# by Oracle in the LICENSE file that accompanied this code.
3226#
3227# This code is distributed in the hope that it will be useful, but WITHOUT
3228# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3229# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3230# version 2 for more details (a copy is included in the LICENSE file that
3231# accompanied this code).
3232#
3233# You should have received a copy of the GNU General Public License version
3234# 2 along with this work; if not, write to the Free Software Foundation,
3235# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3236#
3237# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3238# or visit www.oracle.com if you need additional information or have any
3239# questions.
3240#
3241
3242# Execute the check given as argument, and verify the result
3243# If the Boot JDK was previously found, do nothing
3244# $1 A command line (typically autoconf macro) to execute
3245
3246
3247# Test: Is bootjdk explicitely set by command line arguments?
3248
3249
3250# Test: Is bootjdk available from builddeps?
3251
3252
3253# Test: Is $JAVA_HOME set?
3254
3255
3256# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3257
3258
3259# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3260
3261
3262# Look for a jdk in the given path. If there are multiple, try to select the newest.
3263# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3264# $1 = Path to directory containing jdk installations.
3265# $2 = String to append to the found JDK directory to get the proper JDK home
3266
3267
3268# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3269# environmental variable as base for where to look.
3270# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3271
3272
3273# Test: Is there a JDK installed in default, well-known locations?
3274
3275
3276# Check that a command-line tool in the Boot JDK is correct
3277# $1 = name of variable to assign
3278# $2 = name of binary
3279
3280
3281###############################################################################
3282#
3283# We need a Boot JDK to bootstrap the build.
3284#
3285
3286
3287
3288
3289
3290#
3291# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3293#
3294# This code is free software; you can redistribute it and/or modify it
3295# under the terms of the GNU General Public License version 2 only, as
3296# published by the Free Software Foundation.  Oracle designates this
3297# particular file as subject to the "Classpath" exception as provided
3298# by Oracle in the LICENSE file that accompanied this code.
3299#
3300# This code is distributed in the hope that it will be useful, but WITHOUT
3301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3303# version 2 for more details (a copy is included in the LICENSE file that
3304# accompanied this code).
3305#
3306# You should have received a copy of the GNU General Public License version
3307# 2 along with this work; if not, write to the Free Software Foundation,
3308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3309#
3310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3311# or visit www.oracle.com if you need additional information or have any
3312# questions.
3313#
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332#
3333# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3334# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3335#
3336# This code is free software; you can redistribute it and/or modify it
3337# under the terms of the GNU General Public License version 2 only, as
3338# published by the Free Software Foundation.  Oracle designates this
3339# particular file as subject to the "Classpath" exception as provided
3340# by Oracle in the LICENSE file that accompanied this code.
3341#
3342# This code is distributed in the hope that it will be useful, but WITHOUT
3343# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3344# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3345# version 2 for more details (a copy is included in the LICENSE file that
3346# accompanied this code).
3347#
3348# You should have received a copy of the GNU General Public License version
3349# 2 along with this work; if not, write to the Free Software Foundation,
3350# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3351#
3352# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3353# or visit www.oracle.com if you need additional information or have any
3354# questions.
3355#
3356
3357
3358
3359
3360
3361cygwin_help() {
3362    case $1 in
3363    unzip)
3364        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3365    zip)
3366        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3367    make)
3368        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3369    * )
3370       break ;;
3371    esac
3372}
3373
3374apt_help() {
3375    case $1 in
3376    devkit)
3377        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3378    openjdk)
3379        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3380    alsa)
3381        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3382    cups)
3383        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3384    freetype2)
3385        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3386    pulse)
3387        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3388    x11)
3389        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3390    ccache)
3391        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3392    * )
3393       break ;;
3394    esac
3395}
3396
3397yum_help() {
3398    case $1 in
3399    devkit)
3400        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3401    openjdk)
3402        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3403    alsa)
3404        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3405    cups)
3406        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3407    freetype2)
3408        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3409    pulse)
3410        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3411    x11)
3412        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3413    ccache)
3414        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3415    * )
3416       break ;;
3417    esac
3418}
3419
3420port_help() {
3421    PKGHANDLER_COMMAND=""
3422}
3423
3424pkgutil_help() {
3425    PKGHANDLER_COMMAND=""
3426}
3427
3428pkgadd_help() {
3429    PKGHANDLER_COMMAND=""
3430}
3431
3432
3433
3434#
3435# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3436# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3437#
3438# This code is free software; you can redistribute it and/or modify it
3439# under the terms of the GNU General Public License version 2 only, as
3440# published by the Free Software Foundation.  Oracle designates this
3441# particular file as subject to the "Classpath" exception as provided
3442# by Oracle in the LICENSE file that accompanied this code.
3443#
3444# This code is distributed in the hope that it will be useful, but WITHOUT
3445# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3446# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3447# version 2 for more details (a copy is included in the LICENSE file that
3448# accompanied this code).
3449#
3450# You should have received a copy of the GNU General Public License version
3451# 2 along with this work; if not, write to the Free Software Foundation,
3452# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3453#
3454# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3455# or visit www.oracle.com if you need additional information or have any
3456# questions.
3457#
3458
3459
3460
3461
3462
3463
3464
3465
3466###############################################################################
3467#
3468# Should we build only OpenJDK even if closed sources are present?
3469#
3470
3471
3472
3473
3474###############################################################################
3475#
3476# Setup version numbers
3477#
3478
3479
3480
3481
3482
3483
3484# Support for customization of the build process. Some build files
3485# will include counterparts from this location, if they exist. This allows
3486# for a degree of customization of the build targets and the rules/recipes
3487# to create them
3488
3489# Check whether --with-custom-make-dir was given.
3490if test "${with_custom_make_dir+set}" = set; then :
3491  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3492fi
3493
3494
3495
3496#
3497# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3498# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3499#
3500# This code is free software; you can redistribute it and/or modify it
3501# under the terms of the GNU General Public License version 2 only, as
3502# published by the Free Software Foundation.  Oracle designates this
3503# particular file as subject to the "Classpath" exception as provided
3504# by Oracle in the LICENSE file that accompanied this code.
3505#
3506# This code is distributed in the hope that it will be useful, but WITHOUT
3507# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3508# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3509# version 2 for more details (a copy is included in the LICENSE file that
3510# accompanied this code).
3511#
3512# You should have received a copy of the GNU General Public License version
3513# 2 along with this work; if not, write to the Free Software Foundation,
3514# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3515#
3516# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3517# or visit www.oracle.com if you need additional information or have any
3518# questions.
3519#
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535#
3536# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3537# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3538#
3539# This code is free software; you can redistribute it and/or modify it
3540# under the terms of the GNU General Public License version 2 only, as
3541# published by the Free Software Foundation.  Oracle designates this
3542# particular file as subject to the "Classpath" exception as provided
3543# by Oracle in the LICENSE file that accompanied this code.
3544#
3545# This code is distributed in the hope that it will be useful, but WITHOUT
3546# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3547# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3548# version 2 for more details (a copy is included in the LICENSE file that
3549# accompanied this code).
3550#
3551# You should have received a copy of the GNU General Public License version
3552# 2 along with this work; if not, write to the Free Software Foundation,
3553# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3554#
3555# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3556# or visit www.oracle.com if you need additional information or have any
3557# questions.
3558#
3559
3560# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3561# Converts autoconf style CPU name to OpenJDK style, into
3562# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3563
3564
3565# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3566# Converts autoconf style OS name to OpenJDK style, into
3567# VAR_OS and VAR_OS_API.
3568
3569
3570# Expects $host_os $host_cpu $build_os and $build_cpu
3571# and $with_target_bits to have been setup!
3572#
3573# Translate the standard triplet(quadruplet) definition
3574# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3575# OPENJDK_BUILD_OS, etc.
3576
3577
3578# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3579# accordingly. Must be done after setting up build and target system, but before
3580# doing anything else with these values.
3581
3582
3583    # Setup the legacy variables, for controlling the old makefiles.
3584    #
3585
3586
3587
3588
3589#%%% Build and target systems %%%
3590
3591
3592
3593
3594# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3595# Add -mX to various FLAGS variables.
3596
3597
3598
3599
3600
3601
3602#
3603# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3604# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3605#
3606# This code is free software; you can redistribute it and/or modify it
3607# under the terms of the GNU General Public License version 2 only, as
3608# published by the Free Software Foundation.  Oracle designates this
3609# particular file as subject to the "Classpath" exception as provided
3610# by Oracle in the LICENSE file that accompanied this code.
3611#
3612# This code is distributed in the hope that it will be useful, but WITHOUT
3613# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3614# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3615# version 2 for more details (a copy is included in the LICENSE file that
3616# accompanied this code).
3617#
3618# You should have received a copy of the GNU General Public License version
3619# 2 along with this work; if not, write to the Free Software Foundation,
3620# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3621#
3622# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3623# or visit www.oracle.com if you need additional information or have any
3624# questions.
3625#
3626
3627
3628
3629
3630
3631
3632
3633
3634#
3635# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3637#
3638# This code is free software; you can redistribute it and/or modify it
3639# under the terms of the GNU General Public License version 2 only, as
3640# published by the Free Software Foundation.  Oracle designates this
3641# particular file as subject to the "Classpath" exception as provided
3642# by Oracle in the LICENSE file that accompanied this code.
3643#
3644# This code is distributed in the hope that it will be useful, but WITHOUT
3645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3647# version 2 for more details (a copy is included in the LICENSE file that
3648# accompanied this code).
3649#
3650# You should have received a copy of the GNU General Public License version
3651# 2 along with this work; if not, write to the Free Software Foundation,
3652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3653#
3654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3655# or visit www.oracle.com if you need additional information or have any
3656# questions.
3657#
3658
3659# $1 = compiler to test (CC or CXX)
3660# $2 = human readable name of compiler (C or C++)
3661
3662
3663
3664
3665
3666# $1 = compiler to test (CC or CXX)
3667# $2 = human readable name of compiler (C or C++)
3668# $3 = list of compiler names to search for
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681#
3682# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3683# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3684#
3685# This code is free software; you can redistribute it and/or modify it
3686# under the terms of the GNU General Public License version 2 only, as
3687# published by the Free Software Foundation.  Oracle designates this
3688# particular file as subject to the "Classpath" exception as provided
3689# by Oracle in the LICENSE file that accompanied this code.
3690#
3691# This code is distributed in the hope that it will be useful, but WITHOUT
3692# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3693# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3694# version 2 for more details (a copy is included in the LICENSE file that
3695# accompanied this code).
3696#
3697# You should have received a copy of the GNU General Public License version
3698# 2 along with this work; if not, write to the Free Software Foundation,
3699# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3700#
3701# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3702# or visit www.oracle.com if you need additional information or have any
3703# questions.
3704#
3705
3706
3707
3708
3709
3710
3711
3712# Check if the VS env variables were setup prior to running configure.
3713# If not, then find vcvarsall.bat and run it automatically, and integrate
3714# the set env variables into the spec file.
3715
3716
3717
3718
3719
3720
3721# This line needs to be here, verbatim, after all includes and the dummy hook
3722# definitions. It is replaced with custom functionality when building
3723# custom sources.
3724#CUSTOM_AUTOCONF_INCLUDE
3725
3726# Do not change or remove the following line, it is needed for consistency checks:
3727DATE_WHEN_GENERATED=1359376859
3728
3729###############################################################################
3730#
3731# Initialization / Boot-strapping
3732#
3733# The bootstrapping process needs to solve the "chicken or the egg" problem,
3734# thus it jumps back and forth, each time gaining something needed later on.
3735#
3736###############################################################################
3737
3738# Basic initialization that must happen first of all
3739
3740# Save the original command line. This is passed to us by the wrapper configure script.
3741
3742DATE_WHEN_CONFIGURED=`LANG=C date`
3743
3744{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3745$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3747$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3748
3749
3750
3751# Start with tools that do not need have cross compilation support
3752# and can be expected to be found in the default PATH. These tools are
3753# used by configure. Nor are these tools expected to be found in the
3754# devkit from the builddeps server either, since they are
3755# needed to download the devkit.
3756
3757# First are all the simple required tools.
3758
3759    for ac_prog in basename
3760do
3761  # Extract the first word of "$ac_prog", so it can be a program name with args.
3762set dummy $ac_prog; ac_word=$2
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3764$as_echo_n "checking for $ac_word... " >&6; }
3765if test "${ac_cv_path_BASENAME+set}" = set; then :
3766  $as_echo_n "(cached) " >&6
3767else
3768  case $BASENAME in
3769  [\\/]* | ?:[\\/]*)
3770  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3771  ;;
3772  *)
3773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776  IFS=$as_save_IFS
3777  test -z "$as_dir" && as_dir=.
3778    for ac_exec_ext in '' $ac_executable_extensions; do
3779  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3780    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3782    break 2
3783  fi
3784done
3785  done
3786IFS=$as_save_IFS
3787
3788  ;;
3789esac
3790fi
3791BASENAME=$ac_cv_path_BASENAME
3792if test -n "$BASENAME"; then
3793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3794$as_echo "$BASENAME" >&6; }
3795else
3796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
3798fi
3799
3800
3801  test -n "$BASENAME" && break
3802done
3803
3804
3805    if test "x$BASENAME" = x; then
3806        if test "xbasename" = x; then
3807          PROG_NAME=basename
3808        else
3809          PROG_NAME=basename
3810        fi
3811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3813        as_fn_error $? "Cannot continue" "$LINENO" 5
3814    fi
3815
3816
3817
3818    for ac_prog in bash
3819do
3820  # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
3824if test "${ac_cv_path_BASH+set}" = set; then :
3825  $as_echo_n "(cached) " >&6
3826else
3827  case $BASH in
3828  [\\/]* | ?:[\\/]*)
3829  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3830  ;;
3831  *)
3832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835  IFS=$as_save_IFS
3836  test -z "$as_dir" && as_dir=.
3837    for ac_exec_ext in '' $ac_executable_extensions; do
3838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3839    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841    break 2
3842  fi
3843done
3844  done
3845IFS=$as_save_IFS
3846
3847  ;;
3848esac
3849fi
3850BASH=$ac_cv_path_BASH
3851if test -n "$BASH"; then
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3853$as_echo "$BASH" >&6; }
3854else
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
3857fi
3858
3859
3860  test -n "$BASH" && break
3861done
3862
3863
3864    if test "x$BASH" = x; then
3865        if test "xbash" = x; then
3866          PROG_NAME=bash
3867        else
3868          PROG_NAME=bash
3869        fi
3870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3872        as_fn_error $? "Cannot continue" "$LINENO" 5
3873    fi
3874
3875
3876
3877    for ac_prog in cat
3878do
3879  # Extract the first word of "$ac_prog", so it can be a program name with args.
3880set dummy $ac_prog; ac_word=$2
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3882$as_echo_n "checking for $ac_word... " >&6; }
3883if test "${ac_cv_path_CAT+set}" = set; then :
3884  $as_echo_n "(cached) " >&6
3885else
3886  case $CAT in
3887  [\\/]* | ?:[\\/]*)
3888  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3889  ;;
3890  *)
3891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3892for as_dir in $PATH
3893do
3894  IFS=$as_save_IFS
3895  test -z "$as_dir" && as_dir=.
3896    for ac_exec_ext in '' $ac_executable_extensions; do
3897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3898    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3900    break 2
3901  fi
3902done
3903  done
3904IFS=$as_save_IFS
3905
3906  ;;
3907esac
3908fi
3909CAT=$ac_cv_path_CAT
3910if test -n "$CAT"; then
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3912$as_echo "$CAT" >&6; }
3913else
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915$as_echo "no" >&6; }
3916fi
3917
3918
3919  test -n "$CAT" && break
3920done
3921
3922
3923    if test "x$CAT" = x; then
3924        if test "xcat" = x; then
3925          PROG_NAME=cat
3926        else
3927          PROG_NAME=cat
3928        fi
3929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3931        as_fn_error $? "Cannot continue" "$LINENO" 5
3932    fi
3933
3934
3935
3936    for ac_prog in chmod
3937do
3938  # Extract the first word of "$ac_prog", so it can be a program name with args.
3939set dummy $ac_prog; ac_word=$2
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3941$as_echo_n "checking for $ac_word... " >&6; }
3942if test "${ac_cv_path_CHMOD+set}" = set; then :
3943  $as_echo_n "(cached) " >&6
3944else
3945  case $CHMOD in
3946  [\\/]* | ?:[\\/]*)
3947  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3948  ;;
3949  *)
3950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in $PATH
3952do
3953  IFS=$as_save_IFS
3954  test -z "$as_dir" && as_dir=.
3955    for ac_exec_ext in '' $ac_executable_extensions; do
3956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3957    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3959    break 2
3960  fi
3961done
3962  done
3963IFS=$as_save_IFS
3964
3965  ;;
3966esac
3967fi
3968CHMOD=$ac_cv_path_CHMOD
3969if test -n "$CHMOD"; then
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3971$as_echo "$CHMOD" >&6; }
3972else
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975fi
3976
3977
3978  test -n "$CHMOD" && break
3979done
3980
3981
3982    if test "x$CHMOD" = x; then
3983        if test "xchmod" = x; then
3984          PROG_NAME=chmod
3985        else
3986          PROG_NAME=chmod
3987        fi
3988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3990        as_fn_error $? "Cannot continue" "$LINENO" 5
3991    fi
3992
3993
3994
3995    for ac_prog in cmp
3996do
3997  # Extract the first word of "$ac_prog", so it can be a program name with args.
3998set dummy $ac_prog; ac_word=$2
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4000$as_echo_n "checking for $ac_word... " >&6; }
4001if test "${ac_cv_path_CMP+set}" = set; then :
4002  $as_echo_n "(cached) " >&6
4003else
4004  case $CMP in
4005  [\\/]* | ?:[\\/]*)
4006  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4007  ;;
4008  *)
4009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010for as_dir in $PATH
4011do
4012  IFS=$as_save_IFS
4013  test -z "$as_dir" && as_dir=.
4014    for ac_exec_ext in '' $ac_executable_extensions; do
4015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4016    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4018    break 2
4019  fi
4020done
4021  done
4022IFS=$as_save_IFS
4023
4024  ;;
4025esac
4026fi
4027CMP=$ac_cv_path_CMP
4028if test -n "$CMP"; then
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4030$as_echo "$CMP" >&6; }
4031else
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
4034fi
4035
4036
4037  test -n "$CMP" && break
4038done
4039
4040
4041    if test "x$CMP" = x; then
4042        if test "xcmp" = x; then
4043          PROG_NAME=cmp
4044        else
4045          PROG_NAME=cmp
4046        fi
4047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4049        as_fn_error $? "Cannot continue" "$LINENO" 5
4050    fi
4051
4052
4053
4054    for ac_prog in comm
4055do
4056  # Extract the first word of "$ac_prog", so it can be a program name with args.
4057set dummy $ac_prog; ac_word=$2
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4059$as_echo_n "checking for $ac_word... " >&6; }
4060if test "${ac_cv_path_COMM+set}" = set; then :
4061  $as_echo_n "(cached) " >&6
4062else
4063  case $COMM in
4064  [\\/]* | ?:[\\/]*)
4065  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4066  ;;
4067  *)
4068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071  IFS=$as_save_IFS
4072  test -z "$as_dir" && as_dir=.
4073    for ac_exec_ext in '' $ac_executable_extensions; do
4074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4075    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4077    break 2
4078  fi
4079done
4080  done
4081IFS=$as_save_IFS
4082
4083  ;;
4084esac
4085fi
4086COMM=$ac_cv_path_COMM
4087if test -n "$COMM"; then
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4089$as_echo "$COMM" >&6; }
4090else
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
4093fi
4094
4095
4096  test -n "$COMM" && break
4097done
4098
4099
4100    if test "x$COMM" = x; then
4101        if test "xcomm" = x; then
4102          PROG_NAME=comm
4103        else
4104          PROG_NAME=comm
4105        fi
4106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4108        as_fn_error $? "Cannot continue" "$LINENO" 5
4109    fi
4110
4111
4112
4113    for ac_prog in cp
4114do
4115  # Extract the first word of "$ac_prog", so it can be a program name with args.
4116set dummy $ac_prog; ac_word=$2
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
4119if test "${ac_cv_path_CP+set}" = set; then :
4120  $as_echo_n "(cached) " >&6
4121else
4122  case $CP in
4123  [\\/]* | ?:[\\/]*)
4124  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4125  ;;
4126  *)
4127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130  IFS=$as_save_IFS
4131  test -z "$as_dir" && as_dir=.
4132    for ac_exec_ext in '' $ac_executable_extensions; do
4133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4134    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4136    break 2
4137  fi
4138done
4139  done
4140IFS=$as_save_IFS
4141
4142  ;;
4143esac
4144fi
4145CP=$ac_cv_path_CP
4146if test -n "$CP"; then
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4148$as_echo "$CP" >&6; }
4149else
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
4152fi
4153
4154
4155  test -n "$CP" && break
4156done
4157
4158
4159    if test "x$CP" = x; then
4160        if test "xcp" = x; then
4161          PROG_NAME=cp
4162        else
4163          PROG_NAME=cp
4164        fi
4165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4167        as_fn_error $? "Cannot continue" "$LINENO" 5
4168    fi
4169
4170
4171
4172    for ac_prog in cpio
4173do
4174  # Extract the first word of "$ac_prog", so it can be a program name with args.
4175set dummy $ac_prog; ac_word=$2
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4177$as_echo_n "checking for $ac_word... " >&6; }
4178if test "${ac_cv_path_CPIO+set}" = set; then :
4179  $as_echo_n "(cached) " >&6
4180else
4181  case $CPIO in
4182  [\\/]* | ?:[\\/]*)
4183  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4184  ;;
4185  *)
4186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189  IFS=$as_save_IFS
4190  test -z "$as_dir" && as_dir=.
4191    for ac_exec_ext in '' $ac_executable_extensions; do
4192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195    break 2
4196  fi
4197done
4198  done
4199IFS=$as_save_IFS
4200
4201  ;;
4202esac
4203fi
4204CPIO=$ac_cv_path_CPIO
4205if test -n "$CPIO"; then
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4207$as_echo "$CPIO" >&6; }
4208else
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
4211fi
4212
4213
4214  test -n "$CPIO" && break
4215done
4216
4217
4218    if test "x$CPIO" = x; then
4219        if test "xcpio" = x; then
4220          PROG_NAME=cpio
4221        else
4222          PROG_NAME=cpio
4223        fi
4224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4226        as_fn_error $? "Cannot continue" "$LINENO" 5
4227    fi
4228
4229
4230
4231    for ac_prog in cut
4232do
4233  # Extract the first word of "$ac_prog", so it can be a program name with args.
4234set dummy $ac_prog; ac_word=$2
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4236$as_echo_n "checking for $ac_word... " >&6; }
4237if test "${ac_cv_path_CUT+set}" = set; then :
4238  $as_echo_n "(cached) " >&6
4239else
4240  case $CUT in
4241  [\\/]* | ?:[\\/]*)
4242  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4243  ;;
4244  *)
4245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH
4247do
4248  IFS=$as_save_IFS
4249  test -z "$as_dir" && as_dir=.
4250    for ac_exec_ext in '' $ac_executable_extensions; do
4251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4252    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4254    break 2
4255  fi
4256done
4257  done
4258IFS=$as_save_IFS
4259
4260  ;;
4261esac
4262fi
4263CUT=$ac_cv_path_CUT
4264if test -n "$CUT"; then
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4266$as_echo "$CUT" >&6; }
4267else
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4269$as_echo "no" >&6; }
4270fi
4271
4272
4273  test -n "$CUT" && break
4274done
4275
4276
4277    if test "x$CUT" = x; then
4278        if test "xcut" = x; then
4279          PROG_NAME=cut
4280        else
4281          PROG_NAME=cut
4282        fi
4283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4285        as_fn_error $? "Cannot continue" "$LINENO" 5
4286    fi
4287
4288
4289
4290    for ac_prog in date
4291do
4292  # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4295$as_echo_n "checking for $ac_word... " >&6; }
4296if test "${ac_cv_path_DATE+set}" = set; then :
4297  $as_echo_n "(cached) " >&6
4298else
4299  case $DATE in
4300  [\\/]* | ?:[\\/]*)
4301  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4302  ;;
4303  *)
4304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307  IFS=$as_save_IFS
4308  test -z "$as_dir" && as_dir=.
4309    for ac_exec_ext in '' $ac_executable_extensions; do
4310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313    break 2
4314  fi
4315done
4316  done
4317IFS=$as_save_IFS
4318
4319  ;;
4320esac
4321fi
4322DATE=$ac_cv_path_DATE
4323if test -n "$DATE"; then
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4325$as_echo "$DATE" >&6; }
4326else
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
4329fi
4330
4331
4332  test -n "$DATE" && break
4333done
4334
4335
4336    if test "x$DATE" = x; then
4337        if test "xdate" = x; then
4338          PROG_NAME=date
4339        else
4340          PROG_NAME=date
4341        fi
4342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4344        as_fn_error $? "Cannot continue" "$LINENO" 5
4345    fi
4346
4347
4348
4349    for ac_prog in gdiff diff
4350do
4351  # Extract the first word of "$ac_prog", so it can be a program name with args.
4352set dummy $ac_prog; ac_word=$2
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
4355if test "${ac_cv_path_DIFF+set}" = set; then :
4356  $as_echo_n "(cached) " >&6
4357else
4358  case $DIFF in
4359  [\\/]* | ?:[\\/]*)
4360  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4361  ;;
4362  *)
4363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366  IFS=$as_save_IFS
4367  test -z "$as_dir" && as_dir=.
4368    for ac_exec_ext in '' $ac_executable_extensions; do
4369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4370    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372    break 2
4373  fi
4374done
4375  done
4376IFS=$as_save_IFS
4377
4378  ;;
4379esac
4380fi
4381DIFF=$ac_cv_path_DIFF
4382if test -n "$DIFF"; then
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4384$as_echo "$DIFF" >&6; }
4385else
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
4389
4390
4391  test -n "$DIFF" && break
4392done
4393
4394
4395    if test "x$DIFF" = x; then
4396        if test "xgdiff diff" = x; then
4397          PROG_NAME=diff
4398        else
4399          PROG_NAME=gdiff diff
4400        fi
4401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4403        as_fn_error $? "Cannot continue" "$LINENO" 5
4404    fi
4405
4406
4407
4408    for ac_prog in dirname
4409do
4410  # Extract the first word of "$ac_prog", so it can be a program name with args.
4411set dummy $ac_prog; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if test "${ac_cv_path_DIRNAME+set}" = set; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $DIRNAME in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4429    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440DIRNAME=$ac_cv_path_DIRNAME
4441if test -n "$DIRNAME"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4443$as_echo "$DIRNAME" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450  test -n "$DIRNAME" && break
4451done
4452
4453
4454    if test "x$DIRNAME" = x; then
4455        if test "xdirname" = x; then
4456          PROG_NAME=dirname
4457        else
4458          PROG_NAME=dirname
4459        fi
4460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4462        as_fn_error $? "Cannot continue" "$LINENO" 5
4463    fi
4464
4465
4466
4467    for ac_prog in echo
4468do
4469  # Extract the first word of "$ac_prog", so it can be a program name with args.
4470set dummy $ac_prog; ac_word=$2
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
4473if test "${ac_cv_path_ECHO+set}" = set; then :
4474  $as_echo_n "(cached) " >&6
4475else
4476  case $ECHO in
4477  [\\/]* | ?:[\\/]*)
4478  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4479  ;;
4480  *)
4481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in $PATH
4483do
4484  IFS=$as_save_IFS
4485  test -z "$as_dir" && as_dir=.
4486    for ac_exec_ext in '' $ac_executable_extensions; do
4487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4488    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490    break 2
4491  fi
4492done
4493  done
4494IFS=$as_save_IFS
4495
4496  ;;
4497esac
4498fi
4499ECHO=$ac_cv_path_ECHO
4500if test -n "$ECHO"; then
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4502$as_echo "$ECHO" >&6; }
4503else
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508
4509  test -n "$ECHO" && break
4510done
4511
4512
4513    if test "x$ECHO" = x; then
4514        if test "xecho" = x; then
4515          PROG_NAME=echo
4516        else
4517          PROG_NAME=echo
4518        fi
4519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4521        as_fn_error $? "Cannot continue" "$LINENO" 5
4522    fi
4523
4524
4525
4526    for ac_prog in expr
4527do
4528  # Extract the first word of "$ac_prog", so it can be a program name with args.
4529set dummy $ac_prog; ac_word=$2
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
4532if test "${ac_cv_path_EXPR+set}" = set; then :
4533  $as_echo_n "(cached) " >&6
4534else
4535  case $EXPR in
4536  [\\/]* | ?:[\\/]*)
4537  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4538  ;;
4539  *)
4540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543  IFS=$as_save_IFS
4544  test -z "$as_dir" && as_dir=.
4545    for ac_exec_ext in '' $ac_executable_extensions; do
4546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4547    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4549    break 2
4550  fi
4551done
4552  done
4553IFS=$as_save_IFS
4554
4555  ;;
4556esac
4557fi
4558EXPR=$ac_cv_path_EXPR
4559if test -n "$EXPR"; then
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4561$as_echo "$EXPR" >&6; }
4562else
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
4565fi
4566
4567
4568  test -n "$EXPR" && break
4569done
4570
4571
4572    if test "x$EXPR" = x; then
4573        if test "xexpr" = x; then
4574          PROG_NAME=expr
4575        else
4576          PROG_NAME=expr
4577        fi
4578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4580        as_fn_error $? "Cannot continue" "$LINENO" 5
4581    fi
4582
4583
4584
4585    for ac_prog in file
4586do
4587  # Extract the first word of "$ac_prog", so it can be a program name with args.
4588set dummy $ac_prog; ac_word=$2
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
4591if test "${ac_cv_path_FILE+set}" = set; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  case $FILE in
4595  [\\/]* | ?:[\\/]*)
4596  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4597  ;;
4598  *)
4599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4606    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608    break 2
4609  fi
4610done
4611  done
4612IFS=$as_save_IFS
4613
4614  ;;
4615esac
4616fi
4617FILE=$ac_cv_path_FILE
4618if test -n "$FILE"; then
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4620$as_echo "$FILE" >&6; }
4621else
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623$as_echo "no" >&6; }
4624fi
4625
4626
4627  test -n "$FILE" && break
4628done
4629
4630
4631    if test "x$FILE" = x; then
4632        if test "xfile" = x; then
4633          PROG_NAME=file
4634        else
4635          PROG_NAME=file
4636        fi
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4639        as_fn_error $? "Cannot continue" "$LINENO" 5
4640    fi
4641
4642
4643
4644    for ac_prog in find
4645do
4646  # Extract the first word of "$ac_prog", so it can be a program name with args.
4647set dummy $ac_prog; ac_word=$2
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
4650if test "${ac_cv_path_FIND+set}" = set; then :
4651  $as_echo_n "(cached) " >&6
4652else
4653  case $FIND in
4654  [\\/]* | ?:[\\/]*)
4655  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4656  ;;
4657  *)
4658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4665    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673  ;;
4674esac
4675fi
4676FIND=$ac_cv_path_FIND
4677if test -n "$FIND"; then
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4679$as_echo "$FIND" >&6; }
4680else
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686  test -n "$FIND" && break
4687done
4688
4689
4690    if test "x$FIND" = x; then
4691        if test "xfind" = x; then
4692          PROG_NAME=find
4693        else
4694          PROG_NAME=find
4695        fi
4696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4698        as_fn_error $? "Cannot continue" "$LINENO" 5
4699    fi
4700
4701
4702
4703    for ac_prog in head
4704do
4705  # Extract the first word of "$ac_prog", so it can be a program name with args.
4706set dummy $ac_prog; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if test "${ac_cv_path_HEAD+set}" = set; then :
4710  $as_echo_n "(cached) " >&6
4711else
4712  case $HEAD in
4713  [\\/]* | ?:[\\/]*)
4714  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4715  ;;
4716  *)
4717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in $PATH
4719do
4720  IFS=$as_save_IFS
4721  test -z "$as_dir" && as_dir=.
4722    for ac_exec_ext in '' $ac_executable_extensions; do
4723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4724    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726    break 2
4727  fi
4728done
4729  done
4730IFS=$as_save_IFS
4731
4732  ;;
4733esac
4734fi
4735HEAD=$ac_cv_path_HEAD
4736if test -n "$HEAD"; then
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4738$as_echo "$HEAD" >&6; }
4739else
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745  test -n "$HEAD" && break
4746done
4747
4748
4749    if test "x$HEAD" = x; then
4750        if test "xhead" = x; then
4751          PROG_NAME=head
4752        else
4753          PROG_NAME=head
4754        fi
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4757        as_fn_error $? "Cannot continue" "$LINENO" 5
4758    fi
4759
4760
4761
4762    for ac_prog in ln
4763do
4764  # Extract the first word of "$ac_prog", so it can be a program name with args.
4765set dummy $ac_prog; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
4768if test "${ac_cv_path_LN+set}" = set; then :
4769  $as_echo_n "(cached) " >&6
4770else
4771  case $LN in
4772  [\\/]* | ?:[\\/]*)
4773  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4774  ;;
4775  *)
4776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in $PATH
4778do
4779  IFS=$as_save_IFS
4780  test -z "$as_dir" && as_dir=.
4781    for ac_exec_ext in '' $ac_executable_extensions; do
4782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4783    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4785    break 2
4786  fi
4787done
4788  done
4789IFS=$as_save_IFS
4790
4791  ;;
4792esac
4793fi
4794LN=$ac_cv_path_LN
4795if test -n "$LN"; then
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4797$as_echo "$LN" >&6; }
4798else
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
4801fi
4802
4803
4804  test -n "$LN" && break
4805done
4806
4807
4808    if test "x$LN" = x; then
4809        if test "xln" = x; then
4810          PROG_NAME=ln
4811        else
4812          PROG_NAME=ln
4813        fi
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4816        as_fn_error $? "Cannot continue" "$LINENO" 5
4817    fi
4818
4819
4820
4821    for ac_prog in ls
4822do
4823  # Extract the first word of "$ac_prog", so it can be a program name with args.
4824set dummy $ac_prog; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if test "${ac_cv_path_LS+set}" = set; then :
4828  $as_echo_n "(cached) " >&6
4829else
4830  case $LS in
4831  [\\/]* | ?:[\\/]*)
4832  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4833  ;;
4834  *)
4835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in $PATH
4837do
4838  IFS=$as_save_IFS
4839  test -z "$as_dir" && as_dir=.
4840    for ac_exec_ext in '' $ac_executable_extensions; do
4841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4842    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844    break 2
4845  fi
4846done
4847  done
4848IFS=$as_save_IFS
4849
4850  ;;
4851esac
4852fi
4853LS=$ac_cv_path_LS
4854if test -n "$LS"; then
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4856$as_echo "$LS" >&6; }
4857else
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
4862
4863  test -n "$LS" && break
4864done
4865
4866
4867    if test "x$LS" = x; then
4868        if test "xls" = x; then
4869          PROG_NAME=ls
4870        else
4871          PROG_NAME=ls
4872        fi
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4875        as_fn_error $? "Cannot continue" "$LINENO" 5
4876    fi
4877
4878
4879
4880    for ac_prog in mkdir
4881do
4882  # Extract the first word of "$ac_prog", so it can be a program name with args.
4883set dummy $ac_prog; ac_word=$2
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885$as_echo_n "checking for $ac_word... " >&6; }
4886if test "${ac_cv_path_MKDIR+set}" = set; then :
4887  $as_echo_n "(cached) " >&6
4888else
4889  case $MKDIR in
4890  [\\/]* | ?:[\\/]*)
4891  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4892  ;;
4893  *)
4894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895for as_dir in $PATH
4896do
4897  IFS=$as_save_IFS
4898  test -z "$as_dir" && as_dir=.
4899    for ac_exec_ext in '' $ac_executable_extensions; do
4900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4901    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903    break 2
4904  fi
4905done
4906  done
4907IFS=$as_save_IFS
4908
4909  ;;
4910esac
4911fi
4912MKDIR=$ac_cv_path_MKDIR
4913if test -n "$MKDIR"; then
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4915$as_echo "$MKDIR" >&6; }
4916else
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922  test -n "$MKDIR" && break
4923done
4924
4925
4926    if test "x$MKDIR" = x; then
4927        if test "xmkdir" = x; then
4928          PROG_NAME=mkdir
4929        else
4930          PROG_NAME=mkdir
4931        fi
4932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4934        as_fn_error $? "Cannot continue" "$LINENO" 5
4935    fi
4936
4937
4938
4939    for ac_prog in mktemp
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if test "${ac_cv_path_MKTEMP+set}" = set; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $MKTEMP in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4960    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971MKTEMP=$ac_cv_path_MKTEMP
4972if test -n "$MKTEMP"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4974$as_echo "$MKTEMP" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$MKTEMP" && break
4982done
4983
4984
4985    if test "x$MKTEMP" = x; then
4986        if test "xmktemp" = x; then
4987          PROG_NAME=mktemp
4988        else
4989          PROG_NAME=mktemp
4990        fi
4991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4993        as_fn_error $? "Cannot continue" "$LINENO" 5
4994    fi
4995
4996
4997
4998    for ac_prog in mv
4999do
5000  # Extract the first word of "$ac_prog", so it can be a program name with args.
5001set dummy $ac_prog; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if test "${ac_cv_path_MV+set}" = set; then :
5005  $as_echo_n "(cached) " >&6
5006else
5007  case $MV in
5008  [\\/]* | ?:[\\/]*)
5009  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5010  ;;
5011  *)
5012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  test -z "$as_dir" && as_dir=.
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027  ;;
5028esac
5029fi
5030MV=$ac_cv_path_MV
5031if test -n "$MV"; then
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5033$as_echo "$MV" >&6; }
5034else
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039
5040  test -n "$MV" && break
5041done
5042
5043
5044    if test "x$MV" = x; then
5045        if test "xmv" = x; then
5046          PROG_NAME=mv
5047        else
5048          PROG_NAME=mv
5049        fi
5050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5052        as_fn_error $? "Cannot continue" "$LINENO" 5
5053    fi
5054
5055
5056
5057    for ac_prog in printf
5058do
5059  # Extract the first word of "$ac_prog", so it can be a program name with args.
5060set dummy $ac_prog; ac_word=$2
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
5063if test "${ac_cv_path_PRINTF+set}" = set; then :
5064  $as_echo_n "(cached) " >&6
5065else
5066  case $PRINTF in
5067  [\\/]* | ?:[\\/]*)
5068  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5069  ;;
5070  *)
5071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074  IFS=$as_save_IFS
5075  test -z "$as_dir" && as_dir=.
5076    for ac_exec_ext in '' $ac_executable_extensions; do
5077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080    break 2
5081  fi
5082done
5083  done
5084IFS=$as_save_IFS
5085
5086  ;;
5087esac
5088fi
5089PRINTF=$ac_cv_path_PRINTF
5090if test -n "$PRINTF"; then
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5092$as_echo "$PRINTF" >&6; }
5093else
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099  test -n "$PRINTF" && break
5100done
5101
5102
5103    if test "x$PRINTF" = x; then
5104        if test "xprintf" = x; then
5105          PROG_NAME=printf
5106        else
5107          PROG_NAME=printf
5108        fi
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5111        as_fn_error $? "Cannot continue" "$LINENO" 5
5112    fi
5113
5114
5115
5116    for ac_prog in pwd
5117do
5118  # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $THEPWDCMD in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5137    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148THEPWDCMD=$ac_cv_path_THEPWDCMD
5149if test -n "$THEPWDCMD"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5151$as_echo "$THEPWDCMD" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158  test -n "$THEPWDCMD" && break
5159done
5160
5161
5162    if test "x$THEPWDCMD" = x; then
5163        if test "xpwd" = x; then
5164          PROG_NAME=thepwdcmd
5165        else
5166          PROG_NAME=pwd
5167        fi
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5170        as_fn_error $? "Cannot continue" "$LINENO" 5
5171    fi
5172
5173
5174
5175    for ac_prog in rm
5176do
5177  # Extract the first word of "$ac_prog", so it can be a program name with args.
5178set dummy $ac_prog; ac_word=$2
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5180$as_echo_n "checking for $ac_word... " >&6; }
5181if test "${ac_cv_path_RM+set}" = set; then :
5182  $as_echo_n "(cached) " >&6
5183else
5184  case $RM in
5185  [\\/]* | ?:[\\/]*)
5186  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5187  ;;
5188  *)
5189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192  IFS=$as_save_IFS
5193  test -z "$as_dir" && as_dir=.
5194    for ac_exec_ext in '' $ac_executable_extensions; do
5195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5196    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198    break 2
5199  fi
5200done
5201  done
5202IFS=$as_save_IFS
5203
5204  ;;
5205esac
5206fi
5207RM=$ac_cv_path_RM
5208if test -n "$RM"; then
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5210$as_echo "$RM" >&6; }
5211else
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217  test -n "$RM" && break
5218done
5219
5220
5221    if test "x$RM" = x; then
5222        if test "xrm" = x; then
5223          PROG_NAME=rm
5224        else
5225          PROG_NAME=rm
5226        fi
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5229        as_fn_error $? "Cannot continue" "$LINENO" 5
5230    fi
5231
5232
5233
5234    for ac_prog in sh
5235do
5236  # Extract the first word of "$ac_prog", so it can be a program name with args.
5237set dummy $ac_prog; ac_word=$2
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5239$as_echo_n "checking for $ac_word... " >&6; }
5240if test "${ac_cv_path_SH+set}" = set; then :
5241  $as_echo_n "(cached) " >&6
5242else
5243  case $SH in
5244  [\\/]* | ?:[\\/]*)
5245  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5246  ;;
5247  *)
5248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5249for as_dir in $PATH
5250do
5251  IFS=$as_save_IFS
5252  test -z "$as_dir" && as_dir=.
5253    for ac_exec_ext in '' $ac_executable_extensions; do
5254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5255    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5257    break 2
5258  fi
5259done
5260  done
5261IFS=$as_save_IFS
5262
5263  ;;
5264esac
5265fi
5266SH=$ac_cv_path_SH
5267if test -n "$SH"; then
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5269$as_echo "$SH" >&6; }
5270else
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272$as_echo "no" >&6; }
5273fi
5274
5275
5276  test -n "$SH" && break
5277done
5278
5279
5280    if test "x$SH" = x; then
5281        if test "xsh" = x; then
5282          PROG_NAME=sh
5283        else
5284          PROG_NAME=sh
5285        fi
5286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5288        as_fn_error $? "Cannot continue" "$LINENO" 5
5289    fi
5290
5291
5292
5293    for ac_prog in sort
5294do
5295  # Extract the first word of "$ac_prog", so it can be a program name with args.
5296set dummy $ac_prog; ac_word=$2
5297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5298$as_echo_n "checking for $ac_word... " >&6; }
5299if test "${ac_cv_path_SORT+set}" = set; then :
5300  $as_echo_n "(cached) " >&6
5301else
5302  case $SORT in
5303  [\\/]* | ?:[\\/]*)
5304  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5305  ;;
5306  *)
5307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310  IFS=$as_save_IFS
5311  test -z "$as_dir" && as_dir=.
5312    for ac_exec_ext in '' $ac_executable_extensions; do
5313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5314    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5316    break 2
5317  fi
5318done
5319  done
5320IFS=$as_save_IFS
5321
5322  ;;
5323esac
5324fi
5325SORT=$ac_cv_path_SORT
5326if test -n "$SORT"; then
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5328$as_echo "$SORT" >&6; }
5329else
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335  test -n "$SORT" && break
5336done
5337
5338
5339    if test "x$SORT" = x; then
5340        if test "xsort" = x; then
5341          PROG_NAME=sort
5342        else
5343          PROG_NAME=sort
5344        fi
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5347        as_fn_error $? "Cannot continue" "$LINENO" 5
5348    fi
5349
5350
5351
5352    for ac_prog in tail
5353do
5354  # Extract the first word of "$ac_prog", so it can be a program name with args.
5355set dummy $ac_prog; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if test "${ac_cv_path_TAIL+set}" = set; then :
5359  $as_echo_n "(cached) " >&6
5360else
5361  case $TAIL in
5362  [\\/]* | ?:[\\/]*)
5363  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5364  ;;
5365  *)
5366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369  IFS=$as_save_IFS
5370  test -z "$as_dir" && as_dir=.
5371    for ac_exec_ext in '' $ac_executable_extensions; do
5372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5373    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375    break 2
5376  fi
5377done
5378  done
5379IFS=$as_save_IFS
5380
5381  ;;
5382esac
5383fi
5384TAIL=$ac_cv_path_TAIL
5385if test -n "$TAIL"; then
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5387$as_echo "$TAIL" >&6; }
5388else
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394  test -n "$TAIL" && break
5395done
5396
5397
5398    if test "x$TAIL" = x; then
5399        if test "xtail" = x; then
5400          PROG_NAME=tail
5401        else
5402          PROG_NAME=tail
5403        fi
5404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5406        as_fn_error $? "Cannot continue" "$LINENO" 5
5407    fi
5408
5409
5410
5411    for ac_prog in tar
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if test "${ac_cv_path_TAR+set}" = set; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $TAR in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443TAR=$ac_cv_path_TAR
5444if test -n "$TAR"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5446$as_echo "$TAR" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$TAR" && break
5454done
5455
5456
5457    if test "x$TAR" = x; then
5458        if test "xtar" = x; then
5459          PROG_NAME=tar
5460        else
5461          PROG_NAME=tar
5462        fi
5463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5465        as_fn_error $? "Cannot continue" "$LINENO" 5
5466    fi
5467
5468
5469
5470    for ac_prog in tee
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if test "${ac_cv_path_TEE+set}" = set; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $TEE in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5491    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502TEE=$ac_cv_path_TEE
5503if test -n "$TEE"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5505$as_echo "$TEE" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$TEE" && break
5513done
5514
5515
5516    if test "x$TEE" = x; then
5517        if test "xtee" = x; then
5518          PROG_NAME=tee
5519        else
5520          PROG_NAME=tee
5521        fi
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5524        as_fn_error $? "Cannot continue" "$LINENO" 5
5525    fi
5526
5527
5528
5529    for ac_prog in touch
5530do
5531  # Extract the first word of "$ac_prog", so it can be a program name with args.
5532set dummy $ac_prog; ac_word=$2
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
5535if test "${ac_cv_path_TOUCH+set}" = set; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  case $TOUCH in
5539  [\\/]* | ?:[\\/]*)
5540  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5541  ;;
5542  *)
5543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546  IFS=$as_save_IFS
5547  test -z "$as_dir" && as_dir=.
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5550    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552    break 2
5553  fi
5554done
5555  done
5556IFS=$as_save_IFS
5557
5558  ;;
5559esac
5560fi
5561TOUCH=$ac_cv_path_TOUCH
5562if test -n "$TOUCH"; then
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5564$as_echo "$TOUCH" >&6; }
5565else
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568fi
5569
5570
5571  test -n "$TOUCH" && break
5572done
5573
5574
5575    if test "x$TOUCH" = x; then
5576        if test "xtouch" = x; then
5577          PROG_NAME=touch
5578        else
5579          PROG_NAME=touch
5580        fi
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5583        as_fn_error $? "Cannot continue" "$LINENO" 5
5584    fi
5585
5586
5587
5588    for ac_prog in tr
5589do
5590  # Extract the first word of "$ac_prog", so it can be a program name with args.
5591set dummy $ac_prog; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if test "${ac_cv_path_TR+set}" = set; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $TR in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5609    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620TR=$ac_cv_path_TR
5621if test -n "$TR"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5623$as_echo "$TR" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630  test -n "$TR" && break
5631done
5632
5633
5634    if test "x$TR" = x; then
5635        if test "xtr" = x; then
5636          PROG_NAME=tr
5637        else
5638          PROG_NAME=tr
5639        fi
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5642        as_fn_error $? "Cannot continue" "$LINENO" 5
5643    fi
5644
5645
5646
5647    for ac_prog in uname
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if test "${ac_cv_path_UNAME+set}" = set; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $UNAME in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5668    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679UNAME=$ac_cv_path_UNAME
5680if test -n "$UNAME"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5682$as_echo "$UNAME" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$UNAME" && break
5690done
5691
5692
5693    if test "x$UNAME" = x; then
5694        if test "xuname" = x; then
5695          PROG_NAME=uname
5696        else
5697          PROG_NAME=uname
5698        fi
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5701        as_fn_error $? "Cannot continue" "$LINENO" 5
5702    fi
5703
5704
5705
5706    for ac_prog in uniq
5707do
5708  # Extract the first word of "$ac_prog", so it can be a program name with args.
5709set dummy $ac_prog; ac_word=$2
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if test "${ac_cv_path_UNIQ+set}" = set; then :
5713  $as_echo_n "(cached) " >&6
5714else
5715  case $UNIQ in
5716  [\\/]* | ?:[\\/]*)
5717  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5718  ;;
5719  *)
5720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721for as_dir in $PATH
5722do
5723  IFS=$as_save_IFS
5724  test -z "$as_dir" && as_dir=.
5725    for ac_exec_ext in '' $ac_executable_extensions; do
5726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5727    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5729    break 2
5730  fi
5731done
5732  done
5733IFS=$as_save_IFS
5734
5735  ;;
5736esac
5737fi
5738UNIQ=$ac_cv_path_UNIQ
5739if test -n "$UNIQ"; then
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5741$as_echo "$UNIQ" >&6; }
5742else
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745fi
5746
5747
5748  test -n "$UNIQ" && break
5749done
5750
5751
5752    if test "x$UNIQ" = x; then
5753        if test "xuniq" = x; then
5754          PROG_NAME=uniq
5755        else
5756          PROG_NAME=uniq
5757        fi
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5760        as_fn_error $? "Cannot continue" "$LINENO" 5
5761    fi
5762
5763
5764
5765    for ac_prog in wc
5766do
5767  # Extract the first word of "$ac_prog", so it can be a program name with args.
5768set dummy $ac_prog; ac_word=$2
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
5771if test "${ac_cv_path_WC+set}" = set; then :
5772  $as_echo_n "(cached) " >&6
5773else
5774  case $WC in
5775  [\\/]* | ?:[\\/]*)
5776  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5777  ;;
5778  *)
5779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5780for as_dir in $PATH
5781do
5782  IFS=$as_save_IFS
5783  test -z "$as_dir" && as_dir=.
5784    for ac_exec_ext in '' $ac_executable_extensions; do
5785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5786    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5788    break 2
5789  fi
5790done
5791  done
5792IFS=$as_save_IFS
5793
5794  ;;
5795esac
5796fi
5797WC=$ac_cv_path_WC
5798if test -n "$WC"; then
5799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5800$as_echo "$WC" >&6; }
5801else
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803$as_echo "no" >&6; }
5804fi
5805
5806
5807  test -n "$WC" && break
5808done
5809
5810
5811    if test "x$WC" = x; then
5812        if test "xwc" = x; then
5813          PROG_NAME=wc
5814        else
5815          PROG_NAME=wc
5816        fi
5817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5819        as_fn_error $? "Cannot continue" "$LINENO" 5
5820    fi
5821
5822
5823
5824    for ac_prog in which
5825do
5826  # Extract the first word of "$ac_prog", so it can be a program name with args.
5827set dummy $ac_prog; ac_word=$2
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5829$as_echo_n "checking for $ac_word... " >&6; }
5830if test "${ac_cv_path_WHICH+set}" = set; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833  case $WHICH in
5834  [\\/]* | ?:[\\/]*)
5835  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5836  ;;
5837  *)
5838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839for as_dir in $PATH
5840do
5841  IFS=$as_save_IFS
5842  test -z "$as_dir" && as_dir=.
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5845    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5847    break 2
5848  fi
5849done
5850  done
5851IFS=$as_save_IFS
5852
5853  ;;
5854esac
5855fi
5856WHICH=$ac_cv_path_WHICH
5857if test -n "$WHICH"; then
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5859$as_echo "$WHICH" >&6; }
5860else
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862$as_echo "no" >&6; }
5863fi
5864
5865
5866  test -n "$WHICH" && break
5867done
5868
5869
5870    if test "x$WHICH" = x; then
5871        if test "xwhich" = x; then
5872          PROG_NAME=which
5873        else
5874          PROG_NAME=which
5875        fi
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5877$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5878        as_fn_error $? "Cannot continue" "$LINENO" 5
5879    fi
5880
5881
5882
5883    for ac_prog in xargs
5884do
5885  # Extract the first word of "$ac_prog", so it can be a program name with args.
5886set dummy $ac_prog; ac_word=$2
5887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5888$as_echo_n "checking for $ac_word... " >&6; }
5889if test "${ac_cv_path_XARGS+set}" = set; then :
5890  $as_echo_n "(cached) " >&6
5891else
5892  case $XARGS in
5893  [\\/]* | ?:[\\/]*)
5894  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5895  ;;
5896  *)
5897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5898for as_dir in $PATH
5899do
5900  IFS=$as_save_IFS
5901  test -z "$as_dir" && as_dir=.
5902    for ac_exec_ext in '' $ac_executable_extensions; do
5903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5904    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5906    break 2
5907  fi
5908done
5909  done
5910IFS=$as_save_IFS
5911
5912  ;;
5913esac
5914fi
5915XARGS=$ac_cv_path_XARGS
5916if test -n "$XARGS"; then
5917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5918$as_echo "$XARGS" >&6; }
5919else
5920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921$as_echo "no" >&6; }
5922fi
5923
5924
5925  test -n "$XARGS" && break
5926done
5927
5928
5929    if test "x$XARGS" = x; then
5930        if test "xxargs" = x; then
5931          PROG_NAME=xargs
5932        else
5933          PROG_NAME=xargs
5934        fi
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5937        as_fn_error $? "Cannot continue" "$LINENO" 5
5938    fi
5939
5940
5941
5942# Then required tools that require some special treatment.
5943for ac_prog in gawk mawk nawk awk
5944do
5945  # Extract the first word of "$ac_prog", so it can be a program name with args.
5946set dummy $ac_prog; ac_word=$2
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5948$as_echo_n "checking for $ac_word... " >&6; }
5949if test "${ac_cv_prog_AWK+set}" = set; then :
5950  $as_echo_n "(cached) " >&6
5951else
5952  if test -n "$AWK"; then
5953  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5954else
5955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958  IFS=$as_save_IFS
5959  test -z "$as_dir" && as_dir=.
5960    for ac_exec_ext in '' $ac_executable_extensions; do
5961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5962    ac_cv_prog_AWK="$ac_prog"
5963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964    break 2
5965  fi
5966done
5967  done
5968IFS=$as_save_IFS
5969
5970fi
5971fi
5972AWK=$ac_cv_prog_AWK
5973if test -n "$AWK"; then
5974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5975$as_echo "$AWK" >&6; }
5976else
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
5979fi
5980
5981
5982  test -n "$AWK" && break
5983done
5984
5985
5986    if test "x$AWK" = x; then
5987        if test "x" = x; then
5988          PROG_NAME=awk
5989        else
5990          PROG_NAME=
5991        fi
5992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5993$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5994        as_fn_error $? "Cannot continue" "$LINENO" 5
5995    fi
5996
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5998$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5999if test "${ac_cv_path_GREP+set}" = set; then :
6000  $as_echo_n "(cached) " >&6
6001else
6002  if test -z "$GREP"; then
6003  ac_path_GREP_found=false
6004  # Loop through the user's path and test for each of PROGNAME-LIST
6005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6007do
6008  IFS=$as_save_IFS
6009  test -z "$as_dir" && as_dir=.
6010    for ac_prog in grep ggrep; do
6011    for ac_exec_ext in '' $ac_executable_extensions; do
6012      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6013      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6014# Check for GNU ac_path_GREP and select it if it is found.
6015  # Check for GNU $ac_path_GREP
6016case `"$ac_path_GREP" --version 2>&1` in
6017*GNU*)
6018  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6019*)
6020  ac_count=0
6021  $as_echo_n 0123456789 >"conftest.in"
6022  while :
6023  do
6024    cat "conftest.in" "conftest.in" >"conftest.tmp"
6025    mv "conftest.tmp" "conftest.in"
6026    cp "conftest.in" "conftest.nl"
6027    $as_echo 'GREP' >> "conftest.nl"
6028    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6029    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6030    as_fn_arith $ac_count + 1 && ac_count=$as_val
6031    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6032      # Best one so far, save it but keep looking for a better one
6033      ac_cv_path_GREP="$ac_path_GREP"
6034      ac_path_GREP_max=$ac_count
6035    fi
6036    # 10*(2^10) chars as input seems more than enough
6037    test $ac_count -gt 10 && break
6038  done
6039  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6040esac
6041
6042      $ac_path_GREP_found && break 3
6043    done
6044  done
6045  done
6046IFS=$as_save_IFS
6047  if test -z "$ac_cv_path_GREP"; then
6048    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6049  fi
6050else
6051  ac_cv_path_GREP=$GREP
6052fi
6053
6054fi
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6056$as_echo "$ac_cv_path_GREP" >&6; }
6057 GREP="$ac_cv_path_GREP"
6058
6059
6060
6061    if test "x$GREP" = x; then
6062        if test "x" = x; then
6063          PROG_NAME=grep
6064        else
6065          PROG_NAME=
6066        fi
6067        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6068$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6069        as_fn_error $? "Cannot continue" "$LINENO" 5
6070    fi
6071
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6073$as_echo_n "checking for egrep... " >&6; }
6074if test "${ac_cv_path_EGREP+set}" = set; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6078   then ac_cv_path_EGREP="$GREP -E"
6079   else
6080     if test -z "$EGREP"; then
6081  ac_path_EGREP_found=false
6082  # Loop through the user's path and test for each of PROGNAME-LIST
6083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6085do
6086  IFS=$as_save_IFS
6087  test -z "$as_dir" && as_dir=.
6088    for ac_prog in egrep; do
6089    for ac_exec_ext in '' $ac_executable_extensions; do
6090      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6091      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6092# Check for GNU ac_path_EGREP and select it if it is found.
6093  # Check for GNU $ac_path_EGREP
6094case `"$ac_path_EGREP" --version 2>&1` in
6095*GNU*)
6096  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6097*)
6098  ac_count=0
6099  $as_echo_n 0123456789 >"conftest.in"
6100  while :
6101  do
6102    cat "conftest.in" "conftest.in" >"conftest.tmp"
6103    mv "conftest.tmp" "conftest.in"
6104    cp "conftest.in" "conftest.nl"
6105    $as_echo 'EGREP' >> "conftest.nl"
6106    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6107    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6108    as_fn_arith $ac_count + 1 && ac_count=$as_val
6109    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6110      # Best one so far, save it but keep looking for a better one
6111      ac_cv_path_EGREP="$ac_path_EGREP"
6112      ac_path_EGREP_max=$ac_count
6113    fi
6114    # 10*(2^10) chars as input seems more than enough
6115    test $ac_count -gt 10 && break
6116  done
6117  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6118esac
6119
6120      $ac_path_EGREP_found && break 3
6121    done
6122  done
6123  done
6124IFS=$as_save_IFS
6125  if test -z "$ac_cv_path_EGREP"; then
6126    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6127  fi
6128else
6129  ac_cv_path_EGREP=$EGREP
6130fi
6131
6132   fi
6133fi
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6135$as_echo "$ac_cv_path_EGREP" >&6; }
6136 EGREP="$ac_cv_path_EGREP"
6137
6138
6139
6140    if test "x$EGREP" = x; then
6141        if test "x" = x; then
6142          PROG_NAME=egrep
6143        else
6144          PROG_NAME=
6145        fi
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6147$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6148        as_fn_error $? "Cannot continue" "$LINENO" 5
6149    fi
6150
6151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6152$as_echo_n "checking for fgrep... " >&6; }
6153if test "${ac_cv_path_FGREP+set}" = set; then :
6154  $as_echo_n "(cached) " >&6
6155else
6156  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6157   then ac_cv_path_FGREP="$GREP -F"
6158   else
6159     if test -z "$FGREP"; then
6160  ac_path_FGREP_found=false
6161  # Loop through the user's path and test for each of PROGNAME-LIST
6162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6163for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6164do
6165  IFS=$as_save_IFS
6166  test -z "$as_dir" && as_dir=.
6167    for ac_prog in fgrep; do
6168    for ac_exec_ext in '' $ac_executable_extensions; do
6169      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6170      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6171# Check for GNU ac_path_FGREP and select it if it is found.
6172  # Check for GNU $ac_path_FGREP
6173case `"$ac_path_FGREP" --version 2>&1` in
6174*GNU*)
6175  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6176*)
6177  ac_count=0
6178  $as_echo_n 0123456789 >"conftest.in"
6179  while :
6180  do
6181    cat "conftest.in" "conftest.in" >"conftest.tmp"
6182    mv "conftest.tmp" "conftest.in"
6183    cp "conftest.in" "conftest.nl"
6184    $as_echo 'FGREP' >> "conftest.nl"
6185    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6186    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6187    as_fn_arith $ac_count + 1 && ac_count=$as_val
6188    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6189      # Best one so far, save it but keep looking for a better one
6190      ac_cv_path_FGREP="$ac_path_FGREP"
6191      ac_path_FGREP_max=$ac_count
6192    fi
6193    # 10*(2^10) chars as input seems more than enough
6194    test $ac_count -gt 10 && break
6195  done
6196  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6197esac
6198
6199      $ac_path_FGREP_found && break 3
6200    done
6201  done
6202  done
6203IFS=$as_save_IFS
6204  if test -z "$ac_cv_path_FGREP"; then
6205    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6206  fi
6207else
6208  ac_cv_path_FGREP=$FGREP
6209fi
6210
6211   fi
6212fi
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6214$as_echo "$ac_cv_path_FGREP" >&6; }
6215 FGREP="$ac_cv_path_FGREP"
6216
6217
6218
6219    if test "x$FGREP" = x; then
6220        if test "x" = x; then
6221          PROG_NAME=fgrep
6222        else
6223          PROG_NAME=
6224        fi
6225        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6226$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6227        as_fn_error $? "Cannot continue" "$LINENO" 5
6228    fi
6229
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6231$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6232if test "${ac_cv_path_SED+set}" = set; then :
6233  $as_echo_n "(cached) " >&6
6234else
6235            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6236     for ac_i in 1 2 3 4 5 6 7; do
6237       ac_script="$ac_script$as_nl$ac_script"
6238     done
6239     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6240     { ac_script=; unset ac_script;}
6241     if test -z "$SED"; then
6242  ac_path_SED_found=false
6243  # Loop through the user's path and test for each of PROGNAME-LIST
6244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH
6246do
6247  IFS=$as_save_IFS
6248  test -z "$as_dir" && as_dir=.
6249    for ac_prog in sed gsed; do
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6252      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6253# Check for GNU ac_path_SED and select it if it is found.
6254  # Check for GNU $ac_path_SED
6255case `"$ac_path_SED" --version 2>&1` in
6256*GNU*)
6257  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6258*)
6259  ac_count=0
6260  $as_echo_n 0123456789 >"conftest.in"
6261  while :
6262  do
6263    cat "conftest.in" "conftest.in" >"conftest.tmp"
6264    mv "conftest.tmp" "conftest.in"
6265    cp "conftest.in" "conftest.nl"
6266    $as_echo '' >> "conftest.nl"
6267    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269    as_fn_arith $ac_count + 1 && ac_count=$as_val
6270    if test $ac_count -gt ${ac_path_SED_max-0}; then
6271      # Best one so far, save it but keep looking for a better one
6272      ac_cv_path_SED="$ac_path_SED"
6273      ac_path_SED_max=$ac_count
6274    fi
6275    # 10*(2^10) chars as input seems more than enough
6276    test $ac_count -gt 10 && break
6277  done
6278  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6279esac
6280
6281      $ac_path_SED_found && break 3
6282    done
6283  done
6284  done
6285IFS=$as_save_IFS
6286  if test -z "$ac_cv_path_SED"; then
6287    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6288  fi
6289else
6290  ac_cv_path_SED=$SED
6291fi
6292
6293fi
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6295$as_echo "$ac_cv_path_SED" >&6; }
6296 SED="$ac_cv_path_SED"
6297  rm -f conftest.sed
6298
6299
6300    if test "x$SED" = x; then
6301        if test "x" = x; then
6302          PROG_NAME=sed
6303        else
6304          PROG_NAME=
6305        fi
6306        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6307$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6308        as_fn_error $? "Cannot continue" "$LINENO" 5
6309    fi
6310
6311
6312for ac_prog in nawk gawk awk
6313do
6314  # Extract the first word of "$ac_prog", so it can be a program name with args.
6315set dummy $ac_prog; ac_word=$2
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6317$as_echo_n "checking for $ac_word... " >&6; }
6318if test "${ac_cv_path_NAWK+set}" = set; then :
6319  $as_echo_n "(cached) " >&6
6320else
6321  case $NAWK in
6322  [\\/]* | ?:[\\/]*)
6323  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6324  ;;
6325  *)
6326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6327for as_dir in $PATH
6328do
6329  IFS=$as_save_IFS
6330  test -z "$as_dir" && as_dir=.
6331    for ac_exec_ext in '' $ac_executable_extensions; do
6332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6333    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6335    break 2
6336  fi
6337done
6338  done
6339IFS=$as_save_IFS
6340
6341  ;;
6342esac
6343fi
6344NAWK=$ac_cv_path_NAWK
6345if test -n "$NAWK"; then
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6347$as_echo "$NAWK" >&6; }
6348else
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
6351fi
6352
6353
6354  test -n "$NAWK" && break
6355done
6356
6357
6358    if test "x$NAWK" = x; then
6359        if test "x" = x; then
6360          PROG_NAME=nawk
6361        else
6362          PROG_NAME=
6363        fi
6364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6365$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6366        as_fn_error $? "Cannot continue" "$LINENO" 5
6367    fi
6368
6369
6370# Always force rm.
6371RM="$RM -f"
6372
6373# These are not required on all platforms
6374# Extract the first word of "cygpath", so it can be a program name with args.
6375set dummy cygpath; ac_word=$2
6376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6377$as_echo_n "checking for $ac_word... " >&6; }
6378if test "${ac_cv_path_CYGPATH+set}" = set; then :
6379  $as_echo_n "(cached) " >&6
6380else
6381  case $CYGPATH in
6382  [\\/]* | ?:[\\/]*)
6383  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6384  ;;
6385  *)
6386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH
6388do
6389  IFS=$as_save_IFS
6390  test -z "$as_dir" && as_dir=.
6391    for ac_exec_ext in '' $ac_executable_extensions; do
6392  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6393    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6395    break 2
6396  fi
6397done
6398  done
6399IFS=$as_save_IFS
6400
6401  ;;
6402esac
6403fi
6404CYGPATH=$ac_cv_path_CYGPATH
6405if test -n "$CYGPATH"; then
6406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6407$as_echo "$CYGPATH" >&6; }
6408else
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413
6414# Extract the first word of "readlink", so it can be a program name with args.
6415set dummy readlink; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if test "${ac_cv_path_READLINK+set}" = set; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $READLINK in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6433    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444READLINK=$ac_cv_path_READLINK
6445if test -n "$READLINK"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6447$as_echo "$READLINK" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454# Extract the first word of "df", so it can be a program name with args.
6455set dummy df; ac_word=$2
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6457$as_echo_n "checking for $ac_word... " >&6; }
6458if test "${ac_cv_path_DF+set}" = set; then :
6459  $as_echo_n "(cached) " >&6
6460else
6461  case $DF in
6462  [\\/]* | ?:[\\/]*)
6463  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6464  ;;
6465  *)
6466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6467for as_dir in $PATH
6468do
6469  IFS=$as_save_IFS
6470  test -z "$as_dir" && as_dir=.
6471    for ac_exec_ext in '' $ac_executable_extensions; do
6472  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6473    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6475    break 2
6476  fi
6477done
6478  done
6479IFS=$as_save_IFS
6480
6481  ;;
6482esac
6483fi
6484DF=$ac_cv_path_DF
6485if test -n "$DF"; then
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6487$as_echo "$DF" >&6; }
6488else
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
6491fi
6492
6493
6494# Extract the first word of "SetFile", so it can be a program name with args.
6495set dummy SetFile; ac_word=$2
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497$as_echo_n "checking for $ac_word... " >&6; }
6498if test "${ac_cv_path_SETFILE+set}" = set; then :
6499  $as_echo_n "(cached) " >&6
6500else
6501  case $SETFILE in
6502  [\\/]* | ?:[\\/]*)
6503  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6504  ;;
6505  *)
6506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507for as_dir in $PATH
6508do
6509  IFS=$as_save_IFS
6510  test -z "$as_dir" && as_dir=.
6511    for ac_exec_ext in '' $ac_executable_extensions; do
6512  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6513    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6515    break 2
6516  fi
6517done
6518  done
6519IFS=$as_save_IFS
6520
6521  ;;
6522esac
6523fi
6524SETFILE=$ac_cv_path_SETFILE
6525if test -n "$SETFILE"; then
6526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6527$as_echo "$SETFILE" >&6; }
6528else
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; }
6531fi
6532
6533
6534
6535
6536# Now we can determine OpenJDK build and target platforms. This is required to
6537# have early on.
6538# Make sure we can run config.sub.
6539$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6540  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6541
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6543$as_echo_n "checking build system type... " >&6; }
6544if test "${ac_cv_build+set}" = set; then :
6545  $as_echo_n "(cached) " >&6
6546else
6547  ac_build_alias=$build_alias
6548test "x$ac_build_alias" = x &&
6549  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6550test "x$ac_build_alias" = x &&
6551  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6552ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6553  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6554
6555fi
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6557$as_echo "$ac_cv_build" >&6; }
6558case $ac_cv_build in
6559*-*-*) ;;
6560*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6561esac
6562build=$ac_cv_build
6563ac_save_IFS=$IFS; IFS='-'
6564set x $ac_cv_build
6565shift
6566build_cpu=$1
6567build_vendor=$2
6568shift; shift
6569# Remember, the first character of IFS is used to create $*,
6570# except with old shells:
6571build_os=$*
6572IFS=$ac_save_IFS
6573case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6574
6575
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6577$as_echo_n "checking host system type... " >&6; }
6578if test "${ac_cv_host+set}" = set; then :
6579  $as_echo_n "(cached) " >&6
6580else
6581  if test "x$host_alias" = x; then
6582  ac_cv_host=$ac_cv_build
6583else
6584  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6585    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6586fi
6587
6588fi
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6590$as_echo "$ac_cv_host" >&6; }
6591case $ac_cv_host in
6592*-*-*) ;;
6593*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6594esac
6595host=$ac_cv_host
6596ac_save_IFS=$IFS; IFS='-'
6597set x $ac_cv_host
6598shift
6599host_cpu=$1
6600host_vendor=$2
6601shift; shift
6602# Remember, the first character of IFS is used to create $*,
6603# except with old shells:
6604host_os=$*
6605IFS=$ac_save_IFS
6606case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6607
6608
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6610$as_echo_n "checking target system type... " >&6; }
6611if test "${ac_cv_target+set}" = set; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  if test "x$target_alias" = x; then
6615  ac_cv_target=$ac_cv_host
6616else
6617  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6618    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6619fi
6620
6621fi
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6623$as_echo "$ac_cv_target" >&6; }
6624case $ac_cv_target in
6625*-*-*) ;;
6626*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6627esac
6628target=$ac_cv_target
6629ac_save_IFS=$IFS; IFS='-'
6630set x $ac_cv_target
6631shift
6632target_cpu=$1
6633target_vendor=$2
6634shift; shift
6635# Remember, the first character of IFS is used to create $*,
6636# except with old shells:
6637target_os=$*
6638IFS=$ac_save_IFS
6639case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6640
6641
6642# The aliases save the names the user supplied, while $host etc.
6643# will get canonicalized.
6644test -n "$target_alias" &&
6645  test "$program_prefix$program_suffix$program_transform_name" = \
6646    NONENONEs,x,x, &&
6647  program_prefix=${target_alias}-
6648
6649# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6650# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6651# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6652# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6653# to use the configure naming style.
6654
6655
6656
6657
6658
6659    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6660    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6661    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6662    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6663    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6664    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6665
6666
6667
6668    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6669
6670  case "$build_os" in
6671    *linux*)
6672      VAR_OS=linux
6673      VAR_OS_API=posix
6674      VAR_OS_ENV=linux
6675      ;;
6676    *solaris*)
6677      VAR_OS=solaris
6678      VAR_OS_API=posix
6679      VAR_OS_ENV=solaris
6680      ;;
6681    *darwin*)
6682      VAR_OS=macosx
6683      VAR_OS_API=posix
6684      VAR_OS_ENV=macosx
6685      ;;
6686    *bsd*)
6687      VAR_OS=bsd
6688      VAR_OS_API=posix
6689      VAR_OS_ENV=bsd
6690      ;;
6691    *cygwin*)
6692      VAR_OS=windows
6693      VAR_OS_API=winapi
6694      VAR_OS_ENV=windows.cygwin
6695      ;;
6696    *mingw*)
6697      VAR_OS=windows
6698      VAR_OS_API=winapi
6699      VAR_OS_ENV=windows.msys
6700      ;;
6701    *)
6702      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6703      ;;
6704  esac
6705
6706
6707  # First argument is the cpu name from the trip/quad
6708  case "$build_cpu" in
6709    x86_64)
6710      VAR_CPU=x86_64
6711      VAR_CPU_ARCH=x86
6712      VAR_CPU_BITS=64
6713      VAR_CPU_ENDIAN=little
6714      ;;
6715    i?86)
6716      VAR_CPU=x86
6717      VAR_CPU_ARCH=x86
6718      VAR_CPU_BITS=32
6719      VAR_CPU_ENDIAN=little
6720      ;;
6721    arm*)
6722      VAR_CPU=arm
6723      VAR_CPU_ARCH=arm
6724      VAR_CPU_BITS=32
6725      VAR_CPU_ENDIAN=little
6726      ;;
6727    powerpc)
6728      VAR_CPU=ppc
6729      VAR_CPU_ARCH=ppc
6730      VAR_CPU_BITS=32
6731      VAR_CPU_ENDIAN=big
6732       ;;
6733    powerpc64)
6734      VAR_CPU=ppc64
6735      VAR_CPU_ARCH=ppc
6736      VAR_CPU_BITS=64
6737      VAR_CPU_ENDIAN=big
6738       ;;
6739    sparc)
6740      VAR_CPU=sparc
6741      VAR_CPU_ARCH=sparc
6742      VAR_CPU_BITS=32
6743      VAR_CPU_ENDIAN=big
6744       ;;
6745    sparcv9)
6746      VAR_CPU=sparcv9
6747      VAR_CPU_ARCH=sparc
6748      VAR_CPU_BITS=64
6749      VAR_CPU_ENDIAN=big
6750       ;;
6751    *)
6752      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6753      ;;
6754  esac
6755
6756    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6757    OPENJDK_BUILD_OS="$VAR_OS"
6758    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6759    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6760    OPENJDK_BUILD_CPU="$VAR_CPU"
6761    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6762    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6763    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6764
6765
6766
6767
6768
6769
6770
6771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6772$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6774$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6775
6776    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6777
6778  case "$host_os" in
6779    *linux*)
6780      VAR_OS=linux
6781      VAR_OS_API=posix
6782      VAR_OS_ENV=linux
6783      ;;
6784    *solaris*)
6785      VAR_OS=solaris
6786      VAR_OS_API=posix
6787      VAR_OS_ENV=solaris
6788      ;;
6789    *darwin*)
6790      VAR_OS=macosx
6791      VAR_OS_API=posix
6792      VAR_OS_ENV=macosx
6793      ;;
6794    *bsd*)
6795      VAR_OS=bsd
6796      VAR_OS_API=posix
6797      VAR_OS_ENV=bsd
6798      ;;
6799    *cygwin*)
6800      VAR_OS=windows
6801      VAR_OS_API=winapi
6802      VAR_OS_ENV=windows.cygwin
6803      ;;
6804    *mingw*)
6805      VAR_OS=windows
6806      VAR_OS_API=winapi
6807      VAR_OS_ENV=windows.msys
6808      ;;
6809    *)
6810      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6811      ;;
6812  esac
6813
6814
6815  # First argument is the cpu name from the trip/quad
6816  case "$host_cpu" in
6817    x86_64)
6818      VAR_CPU=x86_64
6819      VAR_CPU_ARCH=x86
6820      VAR_CPU_BITS=64
6821      VAR_CPU_ENDIAN=little
6822      ;;
6823    i?86)
6824      VAR_CPU=x86
6825      VAR_CPU_ARCH=x86
6826      VAR_CPU_BITS=32
6827      VAR_CPU_ENDIAN=little
6828      ;;
6829    arm*)
6830      VAR_CPU=arm
6831      VAR_CPU_ARCH=arm
6832      VAR_CPU_BITS=32
6833      VAR_CPU_ENDIAN=little
6834      ;;
6835    powerpc)
6836      VAR_CPU=ppc
6837      VAR_CPU_ARCH=ppc
6838      VAR_CPU_BITS=32
6839      VAR_CPU_ENDIAN=big
6840       ;;
6841    powerpc64)
6842      VAR_CPU=ppc64
6843      VAR_CPU_ARCH=ppc
6844      VAR_CPU_BITS=64
6845      VAR_CPU_ENDIAN=big
6846       ;;
6847    sparc)
6848      VAR_CPU=sparc
6849      VAR_CPU_ARCH=sparc
6850      VAR_CPU_BITS=32
6851      VAR_CPU_ENDIAN=big
6852       ;;
6853    sparcv9)
6854      VAR_CPU=sparcv9
6855      VAR_CPU_ARCH=sparc
6856      VAR_CPU_BITS=64
6857      VAR_CPU_ENDIAN=big
6858       ;;
6859    *)
6860      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6861      ;;
6862  esac
6863
6864    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6865    OPENJDK_TARGET_OS="$VAR_OS"
6866    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6867    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6868    OPENJDK_TARGET_CPU="$VAR_CPU"
6869    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6870    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6871    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6872
6873
6874
6875
6876
6877
6878
6879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6880$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6882$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6883
6884
6885
6886# Check whether --with-target-bits was given.
6887if test "${with_target_bits+set}" = set; then :
6888  withval=$with_target_bits;
6889fi
6890
6891
6892  # We have three types of compiles:
6893  # native  == normal compilation, target system == build system
6894  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6895  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6896  #
6897  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6898    # We're doing a proper cross-compilation
6899    COMPILE_TYPE="cross"
6900  else
6901    COMPILE_TYPE="native"
6902  fi
6903
6904  if test "x$with_target_bits" != x; then
6905    if test "x$COMPILE_TYPE" = "xcross"; then
6906      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6907    fi
6908
6909    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6910      # A reduced build is requested
6911      COMPILE_TYPE="reduced"
6912      OPENJDK_TARGET_CPU_BITS=32
6913      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6914        OPENJDK_TARGET_CPU=x86
6915      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6916        OPENJDK_TARGET_CPU=sparc
6917      else
6918        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6919      fi
6920    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6921      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
6922    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6923      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6924$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6925    else
6926      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6927    fi
6928  fi
6929
6930
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6932$as_echo_n "checking compilation type... " >&6; }
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6934$as_echo "$COMPILE_TYPE" >&6; }
6935
6936
6937    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6938       REQUIRED_OS_NAME=SunOS
6939       REQUIRED_OS_VERSION=5.10
6940    fi
6941    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6942       REQUIRED_OS_NAME=Linux
6943       REQUIRED_OS_VERSION=2.6
6944    fi
6945    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6946        REQUIRED_OS_NAME=Windows
6947        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6948            REQUIRED_OS_VERSION=5.2
6949        else
6950            REQUIRED_OS_VERSION=5.1
6951        fi
6952    fi
6953    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6954        REQUIRED_OS_NAME=Darwin
6955        REQUIRED_OS_VERSION=11.2
6956    fi
6957
6958
6959
6960
6961
6962    # Also store the legacy naming of the cpu.
6963    # Ie i586 and amd64 instead of x86 and x86_64
6964    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6965    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6966      OPENJDK_TARGET_CPU_LEGACY="i586"
6967    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6968      # On all platforms except MacOSX replace x86_64 with amd64.
6969      OPENJDK_TARGET_CPU_LEGACY="amd64"
6970    fi
6971
6972
6973    # And the second legacy naming of the cpu.
6974    # Ie i386 and amd64 instead of x86 and x86_64.
6975    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6976    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6977      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6978    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6979      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6980    fi
6981
6982
6983    # This is the name of the cpu (but using i386 and amd64 instead of
6984    # x86 and x86_64, respectively), preceeded by a /, to be used when
6985    # locating libraries. On macosx, it's empty, though.
6986    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6987    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6988        OPENJDK_TARGET_CPU_LIBDIR=""
6989    fi
6990
6991
6992    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6993    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6994    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6995    OPENJDK_TARGET_CPU_ISADIR=""
6996    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6997      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6998          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6999      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7000          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7001      fi
7002    fi
7003
7004
7005    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7006    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7007    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7008      # On linux only, we replace x86 with i386.
7009      OPENJDK_TARGET_CPU_OSARCH="i386"
7010    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7011      # On all platforms except macosx, we replace x86_64 with amd64.
7012      OPENJDK_TARGET_CPU_OSARCH="amd64"
7013    fi
7014
7015
7016    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7017    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7018      OPENJDK_TARGET_CPU_JLI="i386"
7019    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7020      # On all platforms except macosx, we replace x86_64 with amd64.
7021      OPENJDK_TARGET_CPU_JLI="amd64"
7022    fi
7023    # Now setup the -D flags for building libjli.
7024    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7025    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7026      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7027        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7028      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7029        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7030      fi
7031    fi
7032
7033
7034    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7035    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7036        OPENJDK_TARGET_OS_API_DIR="solaris"
7037    fi
7038    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7039        OPENJDK_TARGET_OS_API_DIR="windows"
7040    fi
7041
7042
7043    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7044        A_LP64="LP64:="
7045        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7046        # unpack200.exe
7047        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7048            ADD_LP64="-D_LP64=1"
7049        fi
7050    fi
7051    LP64=$A_LP64
7052
7053
7054    if test "x$COMPILE_TYPE" = "xcross"; then
7055      # FIXME: ... or should this include reduced builds..?
7056      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7057    else
7058      DEFINE_CROSS_COMPILE_ARCH=""
7059    fi
7060
7061
7062
7063
7064# Continue setting up basic stuff. Most remaining code require fundamental tools.
7065
7066# Locate the directory of this script.
7067SCRIPT="$0"
7068
7069    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7070        # Follow a chain of symbolic links. Use readlink
7071        # where it exists, else fall back to horribly
7072        # complicated shell code.
7073        if test "x$READLINK_TESTED" != yes; then
7074            # On MacOSX there is a readlink tool with a different
7075            # purpose than the GNU readlink tool. Check the found readlink.
7076            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7077            if test "x$ISGNU" = x; then
7078                 # A readlink that we do not know how to use.
7079                 # Are there other non-GNU readlinks out there?
7080                 READLINK_TESTED=yes
7081                 READLINK=
7082            fi
7083        fi
7084
7085        if test "x$READLINK" != x; then
7086            SCRIPT=`$READLINK -f $SCRIPT`
7087        else
7088            # Save the current directory for restoring afterwards
7089            STARTDIR=$PWD
7090            COUNTER=0
7091            sym_link_dir=`$DIRNAME $SCRIPT`
7092            sym_link_file=`$BASENAME $SCRIPT`
7093            # Use the system pwd and not the shell builtin to resolve directory symlinks
7094            cd $sym_link_dir
7095            cd `$THEPWDCMD`
7096            sym_link_dir=`$THEPWDCMD`
7097            # Resolve file symlinks
7098            while test $COUNTER -lt 20; do
7099                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7100                if test "x$ISLINK" == x; then
7101                    # This is not a symbolic link! We are done!
7102                    break
7103                fi
7104                # Again resolve directory symlinks since the target of the just found
7105                # link could be in a different directory
7106                cd `$DIRNAME $ISLINK`
7107                sym_link_dir=`$THEPWDCMD`
7108                sym_link_file=`$BASENAME $ISLINK`
7109                let COUNTER=COUNTER+1
7110            done
7111            cd $STARTDIR
7112            SCRIPT=$sym_link_dir/$sym_link_file
7113        fi
7114    fi
7115
7116AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7117
7118# Where is the source? It is located two levels above the configure script.
7119CURDIR="$PWD"
7120cd "$AUTOCONF_DIR/../.."
7121SRC_ROOT="`$THEPWDCMD`"
7122
7123if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7124  PATH_SEP=";"
7125
7126  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7127  if test $SRC_ROOT_LENGTH -gt 100; then
7128      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7129  fi
7130
7131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7133$as_echo_n "checking cygwin release... " >&6; }
7134    CYGWIN_VERSION=`$UNAME -r`
7135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7136$as_echo "$CYGWIN_VERSION" >&6; }
7137    WINDOWS_ENV_VENDOR='cygwin'
7138    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7139
7140    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7141    if test "x$CYGWIN_VERSION_OK" = x; then
7142      { $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
7143$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;}
7144      as_fn_error $? "Cannot continue" "$LINENO" 5
7145    fi
7146    if test "x$CYGPATH" = x; then
7147        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7148    fi
7149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7150$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7151    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7152    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7153    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7154    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7156$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7157    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7158    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7159    if test "x$test_cygdrive_prefix" = x; then
7160        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7161    fi
7162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7164$as_echo_n "checking msys release... " >&6; }
7165    MSYS_VERSION=`$UNAME -r`
7166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7167$as_echo "$MSYS_VERSION" >&6; }
7168
7169    WINDOWS_ENV_VENDOR='msys'
7170    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7171
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7173$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7174    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7175    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7176
7177  windows_path="$MSYS_ROOT_PATH"
7178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7179    unix_path=`$CYGPATH -u "$windows_path"`
7180    MSYS_ROOT_PATH="$unix_path"
7181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7183    MSYS_ROOT_PATH="$unix_path"
7184  fi
7185
7186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7187$as_echo "$MSYS_ROOT_PATH" >&6; }
7188    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7189  else
7190    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7191  fi
7192
7193  # Test if windows or unix (cygwin/msys) find is first in path.
7194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7195$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7196  FIND_BINARY_OUTPUT=`find --version 2>&1`
7197  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7199$as_echo "unix style" >&6; }
7200  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7202$as_echo "Windows" >&6; }
7203    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7204$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7205    { $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
7206$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7207    as_fn_error $? "Cannot continue" "$LINENO" 5
7208  else
7209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7210$as_echo "unknown" >&6; }
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7212$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7213  fi
7214
7215else
7216  PATH_SEP=":"
7217fi
7218
7219
7220
7221cd "$CURDIR"
7222
7223
7224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7225
7226  # Input might be given as Windows format, start by converting to
7227  # unix format.
7228  path="$SRC_ROOT"
7229  new_path=`$CYGPATH -u "$path"`
7230
7231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7234  # "foo.exe" is OK but "foo" is an error.
7235  #
7236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7237  # It is also a way to make sure we got the proper file name for the real test later on.
7238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7239  if test "x$test_shortpath" = x; then
7240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7241$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7242    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7243  fi
7244
7245  # Call helper function which possibly converts this using DOS-style short mode.
7246  # If so, the updated path is stored in $new_path.
7247
7248  input_path="$new_path"
7249  # Check if we need to convert this using DOS-style short mode. If the path
7250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7251  # take no chances and rewrite it.
7252  # Note: m4 eats our [], so we need to use [ and ] instead.
7253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7254  if test "x$has_forbidden_chars" != x; then
7255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7259      # Going to short mode and back again did indeed matter. Since short mode is
7260      # case insensitive, let's make it lowercase to improve readability.
7261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7262      # Now convert it back to Unix-stile (cygpath)
7263      input_path=`$CYGPATH -u "$shortmode_path"`
7264      new_path="$input_path"
7265    fi
7266  fi
7267
7268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7269  if test "x$test_cygdrive_prefix" = x; then
7270    # As a simple fix, exclude /usr/bin since it's not a real path.
7271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7273      # a path prefixed by /cygdrive for fixpath to work.
7274      new_path="$CYGWIN_ROOT_PATH$input_path"
7275    fi
7276  fi
7277
7278
7279  if test "x$path" != "x$new_path"; then
7280    SRC_ROOT="$new_path"
7281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7282$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7283  fi
7284
7285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7286
7287  path="$SRC_ROOT"
7288  has_colon=`$ECHO $path | $GREP ^.:`
7289  new_path="$path"
7290  if test "x$has_colon" = x; then
7291    # Not in mixed or Windows style, start by that.
7292    new_path=`cmd //c echo $path`
7293  fi
7294
7295
7296  input_path="$new_path"
7297  # Check if we need to convert this using DOS-style short mode. If the path
7298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7299  # take no chances and rewrite it.
7300  # Note: m4 eats our [], so we need to use [ and ] instead.
7301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7302  if test "x$has_forbidden_chars" != x; then
7303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7305  fi
7306
7307
7308  windows_path="$new_path"
7309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7310    unix_path=`$CYGPATH -u "$windows_path"`
7311    new_path="$unix_path"
7312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7314    new_path="$unix_path"
7315  fi
7316
7317  if test "x$path" != "x$new_path"; then
7318    SRC_ROOT="$new_path"
7319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7320$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7321  fi
7322
7323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7325
7326  else
7327    # We're on a posix platform. Hooray! :)
7328    path="$SRC_ROOT"
7329
7330    if test ! -f "$path" && test ! -d "$path"; then
7331      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7332    fi
7333
7334    has_space=`$ECHO "$path" | $GREP " "`
7335    if test "x$has_space" != x; then
7336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7337$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7338      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7339    fi
7340  fi
7341
7342
7343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7344
7345  # Input might be given as Windows format, start by converting to
7346  # unix format.
7347  path="$CURDIR"
7348  new_path=`$CYGPATH -u "$path"`
7349
7350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7353  # "foo.exe" is OK but "foo" is an error.
7354  #
7355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7356  # It is also a way to make sure we got the proper file name for the real test later on.
7357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7358  if test "x$test_shortpath" = x; then
7359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7360$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7361    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7362  fi
7363
7364  # Call helper function which possibly converts this using DOS-style short mode.
7365  # If so, the updated path is stored in $new_path.
7366
7367  input_path="$new_path"
7368  # Check if we need to convert this using DOS-style short mode. If the path
7369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7370  # take no chances and rewrite it.
7371  # Note: m4 eats our [], so we need to use [ and ] instead.
7372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7373  if test "x$has_forbidden_chars" != x; then
7374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7378      # Going to short mode and back again did indeed matter. Since short mode is
7379      # case insensitive, let's make it lowercase to improve readability.
7380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7381      # Now convert it back to Unix-stile (cygpath)
7382      input_path=`$CYGPATH -u "$shortmode_path"`
7383      new_path="$input_path"
7384    fi
7385  fi
7386
7387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7388  if test "x$test_cygdrive_prefix" = x; then
7389    # As a simple fix, exclude /usr/bin since it's not a real path.
7390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7392      # a path prefixed by /cygdrive for fixpath to work.
7393      new_path="$CYGWIN_ROOT_PATH$input_path"
7394    fi
7395  fi
7396
7397
7398  if test "x$path" != "x$new_path"; then
7399    CURDIR="$new_path"
7400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7401$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7402  fi
7403
7404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7405
7406  path="$CURDIR"
7407  has_colon=`$ECHO $path | $GREP ^.:`
7408  new_path="$path"
7409  if test "x$has_colon" = x; then
7410    # Not in mixed or Windows style, start by that.
7411    new_path=`cmd //c echo $path`
7412  fi
7413
7414
7415  input_path="$new_path"
7416  # Check if we need to convert this using DOS-style short mode. If the path
7417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7418  # take no chances and rewrite it.
7419  # Note: m4 eats our [], so we need to use [ and ] instead.
7420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7421  if test "x$has_forbidden_chars" != x; then
7422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7424  fi
7425
7426
7427  windows_path="$new_path"
7428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7429    unix_path=`$CYGPATH -u "$windows_path"`
7430    new_path="$unix_path"
7431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7433    new_path="$unix_path"
7434  fi
7435
7436  if test "x$path" != "x$new_path"; then
7437    CURDIR="$new_path"
7438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7439$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7440  fi
7441
7442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7444
7445  else
7446    # We're on a posix platform. Hooray! :)
7447    path="$CURDIR"
7448
7449    if test ! -f "$path" && test ! -d "$path"; then
7450      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7451    fi
7452
7453    has_space=`$ECHO "$path" | $GREP " "`
7454    if test "x$has_space" != x; then
7455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7456$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7458    fi
7459  fi
7460
7461
7462if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7463    # Add extra search paths on solaris for utilities like ar and as etc...
7464    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7465fi
7466
7467# You can force the sys-root if the sys-root encoded into the cross compiler tools
7468# is not correct.
7469
7470# Check whether --with-sys-root was given.
7471if test "${with_sys_root+set}" = set; then :
7472  withval=$with_sys_root;
7473fi
7474
7475
7476if test "x$with_sys_root" != x; then
7477  SYS_ROOT=$with_sys_root
7478else
7479  SYS_ROOT=/
7480fi
7481
7482
7483
7484# Check whether --with-tools-dir was given.
7485if test "${with_tools_dir+set}" = set; then :
7486  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7487fi
7488
7489
7490
7491# Check whether --with-devkit was given.
7492if test "${with_devkit+set}" = set; then :
7493  withval=$with_devkit;
7494    if test "x$with_sys_root" != x; then
7495      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7496    fi
7497    if test "x$with_tools_dir" != x; then
7498      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7499    fi
7500    TOOLS_DIR=$with_devkit/bin
7501    SYS_ROOT=$with_devkit/$host_alias/libc
7502
7503fi
7504
7505
7506
7507
7508# Setup default logging of stdout and stderr to build.log in the output root.
7509BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7510BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7511BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7512
7513
7514
7515
7516
7517# Check if it's a pure open build or if custom sources are to be used.
7518
7519  # Check whether --enable-openjdk-only was given.
7520if test "${enable_openjdk_only+set}" = set; then :
7521  enableval=$enable_openjdk_only;
7522else
7523  enable_openjdk_only="no"
7524fi
7525
7526
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7528$as_echo_n "checking for presence of closed sources... " >&6; }
7529  if test -d "$SRC_ROOT/jdk/src/closed"; then
7530    CLOSED_SOURCE_PRESENT=yes
7531  else
7532    CLOSED_SOURCE_PRESENT=no
7533  fi
7534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7535$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7536
7537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7538$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7539  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7541$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7542
7543  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7544    OPENJDK=true
7545    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7546      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7547$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7548    fi
7549  else
7550    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7551      OPENJDK=true
7552    else
7553      OPENJDK=false
7554    fi
7555  fi
7556
7557  if test "x$OPENJDK" = "xtrue"; then
7558    SET_OPENJDK="OPENJDK=true"
7559  fi
7560
7561
7562
7563
7564# These are needed to be able to create a configuration name (and thus the output directory)
7565
7566###############################################################################
7567#
7568# Check which variant of the JDK that we want to build.
7569# Currently we have:
7570#    normal:   standard edition
7571# but the custom make system may add other variants
7572#
7573# Effectively the JDK variant gives a name to a specific set of
7574# modules to compile into the JDK. In the future, these modules
7575# might even be Jigsaw modules.
7576#
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7578$as_echo_n "checking which variant of the JDK to build... " >&6; }
7579
7580# Check whether --with-jdk-variant was given.
7581if test "${with_jdk_variant+set}" = set; then :
7582  withval=$with_jdk_variant;
7583fi
7584
7585
7586if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7587    JDK_VARIANT="normal"
7588else
7589    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7590fi
7591
7592
7593
7594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7595$as_echo "$JDK_VARIANT" >&6; }
7596
7597
7598
7599###############################################################################
7600#
7601# Check which variants of the JVM that we want to build.
7602# Currently we have:
7603#    server: normal interpreter and a tiered C1/C2 compiler
7604#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7605#    minimal1: reduced form of client with optional VM services and features stripped out
7606#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7607#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7608#    zero: no machine code interpreter, no compiler
7609#    zeroshark: zero interpreter and shark/llvm compiler backend
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7611$as_echo_n "checking which variants of the JVM to build... " >&6; }
7612
7613# Check whether --with-jvm-variants was given.
7614if test "${with_jvm_variants+set}" = set; then :
7615  withval=$with_jvm_variants;
7616fi
7617
7618
7619if test "x$with_jvm_variants" = x; then
7620     with_jvm_variants="server"
7621fi
7622
7623JVM_VARIANTS=",$with_jvm_variants,"
7624TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7625
7626if test "x$TEST_VARIANTS" != "x,"; then
7627   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7628fi
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7630$as_echo "$with_jvm_variants" >&6; }
7631
7632JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7633JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7634JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7635JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7636JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7637JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7638
7639if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7640    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7641        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7642    fi
7643fi
7644if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7645    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7646        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7647    fi
7648fi
7649if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7650    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7651        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7652    fi
7653fi
7654
7655# Replace the commas with AND for use in the build directory name.
7656ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7657COUNT_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/'`
7658if test "x$COUNT_VARIANTS" != "x,1"; then
7659    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7660else
7661    BUILDING_MULTIPLE_JVM_VARIANTS=no
7662fi
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7673   MACOSX_UNIVERSAL="true"
7674fi
7675
7676
7677
7678
7679
7680###############################################################################
7681#
7682# Set the debug level
7683#    release: no debug information, all optimizations, no asserts.
7684#    fastdebug: debug information (-g), all optimizations, all asserts
7685#    slowdebug: debug information (-g), no optimizations, all asserts
7686#
7687DEBUG_LEVEL="release"
7688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7689$as_echo_n "checking which debug level to use... " >&6; }
7690# Check whether --enable-debug was given.
7691if test "${enable_debug+set}" = set; then :
7692  enableval=$enable_debug;
7693        ENABLE_DEBUG="${enableval}"
7694        DEBUG_LEVEL="fastdebug"
7695
7696else
7697  ENABLE_DEBUG="no"
7698fi
7699
7700
7701
7702# Check whether --with-debug-level was given.
7703if test "${with_debug_level+set}" = set; then :
7704  withval=$with_debug_level;
7705        DEBUG_LEVEL="${withval}"
7706        if test "x$ENABLE_DEBUG" = xyes; then
7707			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7708        fi
7709
7710fi
7711
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7713$as_echo "$DEBUG_LEVEL" >&6; }
7714
7715if test "x$DEBUG_LEVEL" != xrelease && \
7716   test "x$DEBUG_LEVEL" != xfastdebug && \
7717   test "x$DEBUG_LEVEL" != xslowdebug; then
7718   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7719fi
7720
7721
7722###############################################################################
7723#
7724# Setup legacy vars/targets and new vars to deal with different debug levels.
7725#
7726
7727case $DEBUG_LEVEL in
7728      release )
7729          VARIANT="OPT"
7730          FASTDEBUG="false"
7731          DEBUG_CLASSFILES="false"
7732          BUILD_VARIANT_RELEASE=""
7733          HOTSPOT_DEBUG_LEVEL="product"
7734          HOTSPOT_EXPORT="product"
7735           ;;
7736      fastdebug )
7737          VARIANT="DBG"
7738          FASTDEBUG="true"
7739          DEBUG_CLASSFILES="true"
7740          BUILD_VARIANT_RELEASE="-fastdebug"
7741          HOTSPOT_DEBUG_LEVEL="fastdebug"
7742          HOTSPOT_EXPORT="fastdebug"
7743           ;;
7744      slowdebug )
7745          VARIANT="DBG"
7746          FASTDEBUG="false"
7747          DEBUG_CLASSFILES="true"
7748          BUILD_VARIANT_RELEASE="-debug"
7749          HOTSPOT_DEBUG_LEVEL="jvmg"
7750          HOTSPOT_EXPORT="debug"
7751           ;;
7752esac
7753
7754#####
7755# Generate the legacy makefile targets for hotspot.
7756# The hotspot api for selecting the build artifacts, really, needs to be improved.
7757# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7758# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7759# But until then ...
7760HOTSPOT_TARGET=""
7761
7762if test "x$JVM_VARIANT_SERVER" = xtrue; then
7763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7764fi
7765
7766if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7767    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7768fi
7769
7770if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7771    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7772fi
7773
7774if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7775    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7776fi
7777
7778if test "x$JVM_VARIANT_ZERO" = xtrue; then
7779    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7780fi
7781
7782if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7783    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7784fi
7785
7786HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7787
7788# On Macosx universal binaries are produced, but they only contain
7789# 64 bit intel. This invalidates control of which jvms are built
7790# from configure, but only server is valid anyway. Fix this
7791# when hotspot makefiles are rewritten.
7792if test "x$MACOSX_UNIVERSAL" = xtrue; then
7793    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7794fi
7795
7796#####
7797
7798
7799
7800
7801
7802
7803
7804
7805# With basic setup done, call the custom early hook.
7806
7807
7808# To properly create a configuration name, we need to have the OpenJDK target
7809# and options (variants and debug level) parsed.
7810
7811
7812
7813# Check whether --with-conf-name was given.
7814if test "${with_conf_name+set}" = set; then :
7815  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7816fi
7817
7818
7819# Test from where we are running configure, in or outside of src root.
7820# To enable comparison of directories, CURDIR needs to be symlink free
7821# just like SRC_ROOT already is
7822NOSYM_CURDIR="$CURDIR"
7823
7824    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7825        # Follow a chain of symbolic links. Use readlink
7826        # where it exists, else fall back to horribly
7827        # complicated shell code.
7828        if test "x$READLINK_TESTED" != yes; then
7829            # On MacOSX there is a readlink tool with a different
7830            # purpose than the GNU readlink tool. Check the found readlink.
7831            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7832            if test "x$ISGNU" = x; then
7833                 # A readlink that we do not know how to use.
7834                 # Are there other non-GNU readlinks out there?
7835                 READLINK_TESTED=yes
7836                 READLINK=
7837            fi
7838        fi
7839
7840        if test "x$READLINK" != x; then
7841            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7842        else
7843            # Save the current directory for restoring afterwards
7844            STARTDIR=$PWD
7845            COUNTER=0
7846            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7847            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7848            # Use the system pwd and not the shell builtin to resolve directory symlinks
7849            cd $sym_link_dir
7850            cd `$THEPWDCMD`
7851            sym_link_dir=`$THEPWDCMD`
7852            # Resolve file symlinks
7853            while test $COUNTER -lt 20; do
7854                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7855                if test "x$ISLINK" == x; then
7856                    # This is not a symbolic link! We are done!
7857                    break
7858                fi
7859                # Again resolve directory symlinks since the target of the just found
7860                # link could be in a different directory
7861                cd `$DIRNAME $ISLINK`
7862                sym_link_dir=`$THEPWDCMD`
7863                sym_link_file=`$BASENAME $ISLINK`
7864                let COUNTER=COUNTER+1
7865            done
7866            cd $STARTDIR
7867            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7868        fi
7869    fi
7870
7871if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7872        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7873        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7874    # We are running configure from the src root.
7875    # Create a default ./build/target-variant-debuglevel output root.
7876    if test "x${CONF_NAME}" = x; then
7877        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7878    fi
7879    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7880    $MKDIR -p "$OUTPUT_ROOT"
7881    if test ! -d "$OUTPUT_ROOT"; then
7882        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7883    fi
7884else
7885    # We are running configure from outside of the src dir.
7886    # Then use the current directory as output dir!
7887    # If configuration is situated in normal build directory, just use the build
7888    # directory name as configuration name, otherwise use the complete path.
7889    if test "x${CONF_NAME}" = x; then
7890        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7891    fi
7892    OUTPUT_ROOT="$CURDIR"
7893
7894    # WARNING: This might be a bad thing to do. You need to be sure you want to
7895    # have a configuration in this directory. Do some sanity checks!
7896
7897    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7898      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7899      # other files
7900      files_present=`$LS $OUTPUT_ROOT`
7901      # Configure has already touched config.log and confdefs.h in the current dir when this check
7902      # is performed.
7903      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7904                                             | $TR -d '\n'`
7905      if test "x$filtered_files" != x; then
7906        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7907$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7909$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7910        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7911$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7913$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7915$as_echo "$as_me: seriously mess up just about everything." >&6;}
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7917$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7919$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7920        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7921      fi
7922    fi
7923fi
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7925$as_echo_n "checking what configuration name to use... " >&6; }
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7927$as_echo "$CONF_NAME" >&6; }
7928
7929
7930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7931
7932  # Input might be given as Windows format, start by converting to
7933  # unix format.
7934  path="$OUTPUT_ROOT"
7935  new_path=`$CYGPATH -u "$path"`
7936
7937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7940  # "foo.exe" is OK but "foo" is an error.
7941  #
7942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7943  # It is also a way to make sure we got the proper file name for the real test later on.
7944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7945  if test "x$test_shortpath" = x; then
7946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7947$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7948    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7949  fi
7950
7951  # Call helper function which possibly converts this using DOS-style short mode.
7952  # If so, the updated path is stored in $new_path.
7953
7954  input_path="$new_path"
7955  # Check if we need to convert this using DOS-style short mode. If the path
7956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7957  # take no chances and rewrite it.
7958  # Note: m4 eats our [], so we need to use [ and ] instead.
7959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7960  if test "x$has_forbidden_chars" != x; then
7961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7965      # Going to short mode and back again did indeed matter. Since short mode is
7966      # case insensitive, let's make it lowercase to improve readability.
7967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7968      # Now convert it back to Unix-stile (cygpath)
7969      input_path=`$CYGPATH -u "$shortmode_path"`
7970      new_path="$input_path"
7971    fi
7972  fi
7973
7974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7975  if test "x$test_cygdrive_prefix" = x; then
7976    # As a simple fix, exclude /usr/bin since it's not a real path.
7977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7979      # a path prefixed by /cygdrive for fixpath to work.
7980      new_path="$CYGWIN_ROOT_PATH$input_path"
7981    fi
7982  fi
7983
7984
7985  if test "x$path" != "x$new_path"; then
7986    OUTPUT_ROOT="$new_path"
7987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7988$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7989  fi
7990
7991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7992
7993  path="$OUTPUT_ROOT"
7994  has_colon=`$ECHO $path | $GREP ^.:`
7995  new_path="$path"
7996  if test "x$has_colon" = x; then
7997    # Not in mixed or Windows style, start by that.
7998    new_path=`cmd //c echo $path`
7999  fi
8000
8001
8002  input_path="$new_path"
8003  # Check if we need to convert this using DOS-style short mode. If the path
8004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8005  # take no chances and rewrite it.
8006  # Note: m4 eats our [], so we need to use [ and ] instead.
8007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8008  if test "x$has_forbidden_chars" != x; then
8009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8011  fi
8012
8013
8014  windows_path="$new_path"
8015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8016    unix_path=`$CYGPATH -u "$windows_path"`
8017    new_path="$unix_path"
8018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8020    new_path="$unix_path"
8021  fi
8022
8023  if test "x$path" != "x$new_path"; then
8024    OUTPUT_ROOT="$new_path"
8025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8026$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8027  fi
8028
8029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8031
8032  else
8033    # We're on a posix platform. Hooray! :)
8034    path="$OUTPUT_ROOT"
8035
8036    if test ! -f "$path" && test ! -d "$path"; then
8037      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8038    fi
8039
8040    has_space=`$ECHO "$path" | $GREP " "`
8041    if test "x$has_space" != x; then
8042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8043$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8044      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8045    fi
8046  fi
8047
8048
8049SPEC=$OUTPUT_ROOT/spec.gmk
8050
8051CONF_NAME=$CONF_NAME
8052
8053OUTPUT_ROOT=$OUTPUT_ROOT
8054
8055
8056# Most of the probed defines are put into config.h
8057ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8058
8059# The spec.gmk file contains all variables for the make system.
8060ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8061
8062# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8063ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8064
8065# The bootcycle-spec.gmk file contains support for boot cycle builds.
8066ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8067
8068# The compare.sh is used to compare the build output to other builds.
8069ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8070
8071# Spec.sh is currently used by compare-objects.sh
8072ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8073
8074# The generated Makefile knows where the spec.gmk is and where the source is.
8075# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8076# which will look for generated configurations
8077ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8078
8079
8080# Save the arguments given to us
8081echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8082
8083
8084# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8085
8086    for ac_prog in apt-get yum port pkgutil pkgadd
8087do
8088  # Extract the first word of "$ac_prog", so it can be a program name with args.
8089set dummy $ac_prog; ac_word=$2
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091$as_echo_n "checking for $ac_word... " >&6; }
8092if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  if test -n "$PKGHANDLER"; then
8096  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8097else
8098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8099for as_dir in $PATH
8100do
8101  IFS=$as_save_IFS
8102  test -z "$as_dir" && as_dir=.
8103    for ac_exec_ext in '' $ac_executable_extensions; do
8104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8105    ac_cv_prog_PKGHANDLER="$ac_prog"
8106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8107    break 2
8108  fi
8109done
8110  done
8111IFS=$as_save_IFS
8112
8113fi
8114fi
8115PKGHANDLER=$ac_cv_prog_PKGHANDLER
8116if test -n "$PKGHANDLER"; then
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8118$as_echo "$PKGHANDLER" >&6; }
8119else
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8121$as_echo "no" >&6; }
8122fi
8123
8124
8125  test -n "$PKGHANDLER" && break
8126done
8127
8128
8129
8130# Setup tools that requires more complex handling, or that is not needed by the configure script.
8131
8132
8133  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8134  if test "x$MAKE" != x; then
8135    # User has supplied a make, test it.
8136    if test ! -f "$MAKE"; then
8137      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8138    fi
8139
8140  MAKE_CANDIDATE=""$MAKE""
8141  DESCRIPTION="user supplied MAKE=$MAKE"
8142  if test "x$MAKE_CANDIDATE" != x; then
8143    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8144$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8145    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8146    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8147    if test "x$IS_GNU_MAKE" = x; then
8148      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8149$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8150    else
8151      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8152      if test "x$IS_MODERN_MAKE" = x; then
8153        { $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
8154$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;}
8155      else
8156        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8157          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8158            MAKE_EXPECTED_ENV='cygwin'
8159          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8160            MAKE_EXPECTED_ENV='msys'
8161          else
8162            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8163          fi
8164          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8165          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8166        else
8167          # Not relevant for non-Windows
8168          IS_MAKE_CORRECT_ENV=true
8169        fi
8170        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8171          { $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
8172$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;}
8173        else
8174          FOUND_MAKE=$MAKE_CANDIDATE
8175
8176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8177
8178  # First separate the path from the arguments. This will split at the first
8179  # space.
8180  complete="$FOUND_MAKE"
8181  path="${complete%% *}"
8182  tmp="$complete EOL"
8183  arguments="${tmp#* }"
8184
8185  # Input might be given as Windows format, start by converting to
8186  # unix format.
8187  new_path=`$CYGPATH -u "$path"`
8188
8189  # Now try to locate executable using which
8190  new_path=`$WHICH "$new_path" 2> /dev/null`
8191  # bat and cmd files are not always considered executable in cygwin causing which
8192  # to not find them
8193  if test "x$new_path" = x \
8194           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8195           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8196    new_path=`$CYGPATH -u "$path"`
8197  fi
8198  if test "x$new_path" = x; then
8199    # Oops. Which didn't find the executable.
8200    # The splitting of arguments from the executable at a space might have been incorrect,
8201    # since paths with space are more likely in Windows. Give it another try with the whole
8202    # argument.
8203    path="$complete"
8204    arguments="EOL"
8205    new_path=`$CYGPATH -u "$path"`
8206    new_path=`$WHICH "$new_path" 2> /dev/null`
8207    # bat and cmd files are not always considered executable in cygwin causing which
8208    # to not find them
8209    if test "x$new_path" = x \
8210             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8211             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8212      new_path=`$CYGPATH -u "$path"`
8213    fi
8214    if test "x$new_path" = x; then
8215      # It's still not found. Now this is an unrecoverable error.
8216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8218      has_space=`$ECHO "$complete" | $GREP " "`
8219      if test "x$has_space" != x; then
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8222      fi
8223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8224    fi
8225  fi
8226
8227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8230  # "foo.exe" is OK but "foo" is an error.
8231  #
8232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8233  # It is also a way to make sure we got the proper file name for the real test later on.
8234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8235  if test "x$test_shortpath" = x; then
8236    # Short path failed, file does not exist as specified.
8237    # Try adding .exe or .cmd
8238    if test -f "${new_path}.exe"; then
8239       input_to_shortpath="${new_path}.exe"
8240    elif test -f "${new_path}.cmd"; then
8241       input_to_shortpath="${new_path}.cmd"
8242    else
8243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8244$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8245      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8246$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8247      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8248    fi
8249  else
8250    input_to_shortpath="$new_path"
8251  fi
8252
8253  # Call helper function which possibly converts this using DOS-style short mode.
8254  # If so, the updated path is stored in $new_path.
8255  new_path="$input_to_shortpath"
8256
8257  input_path="$input_to_shortpath"
8258  # Check if we need to convert this using DOS-style short mode. If the path
8259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8260  # take no chances and rewrite it.
8261  # Note: m4 eats our [], so we need to use [ and ] instead.
8262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8263  if test "x$has_forbidden_chars" != x; then
8264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8268      # Going to short mode and back again did indeed matter. Since short mode is
8269      # case insensitive, let's make it lowercase to improve readability.
8270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8271      # Now convert it back to Unix-stile (cygpath)
8272      input_path=`$CYGPATH -u "$shortmode_path"`
8273      new_path="$input_path"
8274    fi
8275  fi
8276
8277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8278  if test "x$test_cygdrive_prefix" = x; then
8279    # As a simple fix, exclude /usr/bin since it's not a real path.
8280    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8282      # a path prefixed by /cygdrive for fixpath to work.
8283      new_path="$CYGWIN_ROOT_PATH$input_path"
8284    fi
8285  fi
8286
8287  # remove trailing .exe if any
8288  new_path="${new_path/%.exe/}"
8289
8290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8291
8292  # First separate the path from the arguments. This will split at the first
8293  # space.
8294  complete="$FOUND_MAKE"
8295  path="${complete%% *}"
8296  tmp="$complete EOL"
8297  arguments="${tmp#* }"
8298
8299  # Input might be given as Windows format, start by converting to
8300  # unix format.
8301  new_path="$path"
8302
8303  windows_path="$new_path"
8304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8305    unix_path=`$CYGPATH -u "$windows_path"`
8306    new_path="$unix_path"
8307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8309    new_path="$unix_path"
8310  fi
8311
8312
8313  # Now try to locate executable using which
8314  new_path=`$WHICH "$new_path" 2> /dev/null`
8315
8316  if test "x$new_path" = x; then
8317    # Oops. Which didn't find the executable.
8318    # The splitting of arguments from the executable at a space might have been incorrect,
8319    # since paths with space are more likely in Windows. Give it another try with the whole
8320    # argument.
8321    path="$complete"
8322    arguments="EOL"
8323    new_path="$path"
8324
8325  windows_path="$new_path"
8326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8327    unix_path=`$CYGPATH -u "$windows_path"`
8328    new_path="$unix_path"
8329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8331    new_path="$unix_path"
8332  fi
8333
8334
8335    new_path=`$WHICH "$new_path" 2> /dev/null`
8336
8337    if test "x$new_path" = x; then
8338      # It's still not found. Now this is an unrecoverable error.
8339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8341      has_space=`$ECHO "$complete" | $GREP " "`
8342      if test "x$has_space" != x; then
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8345      fi
8346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8347    fi
8348  fi
8349
8350  # Now new_path has a complete unix path to the binary
8351  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8352    # Keep paths in /bin as-is, but remove trailing .exe if any
8353    new_path="${new_path/%.exe/}"
8354    # Do not save /bin paths to all_fixpath_prefixes!
8355  else
8356    # Not in mixed or Windows style, start by that.
8357    new_path=`cmd //c echo $new_path`
8358
8359  input_path="$new_path"
8360  # Check if we need to convert this using DOS-style short mode. If the path
8361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8362  # take no chances and rewrite it.
8363  # Note: m4 eats our [], so we need to use [ and ] instead.
8364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8365  if test "x$has_forbidden_chars" != x; then
8366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8368  fi
8369
8370    # Output is in $new_path
8371
8372  windows_path="$new_path"
8373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8374    unix_path=`$CYGPATH -u "$windows_path"`
8375    new_path="$unix_path"
8376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8378    new_path="$unix_path"
8379  fi
8380
8381    # remove trailing .exe if any
8382    new_path="${new_path/%.exe/}"
8383
8384    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8385    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8386  fi
8387
8388  else
8389    # We're on a posix platform. Hooray! :)
8390    # First separate the path from the arguments. This will split at the first
8391    # space.
8392    complete="$FOUND_MAKE"
8393    path="${complete%% *}"
8394    tmp="$complete EOL"
8395    arguments="${tmp#* }"
8396
8397    # Cannot rely on the command "which" here since it doesn't always work.
8398    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8399    if test -z "$is_absolute_path"; then
8400      # Path to executable is not absolute. Find it.
8401      IFS_save="$IFS"
8402      IFS=:
8403      for p in $PATH; do
8404        if test -f "$p/$path" && test -x "$p/$path"; then
8405          new_path="$p/$path"
8406          break
8407        fi
8408      done
8409      IFS="$IFS_save"
8410    else
8411      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8412$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8413      new_path="$path"
8414    fi
8415
8416    if test "x$new_path" = x; then
8417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8419        has_space=`$ECHO "$complete" | $GREP " "`
8420        if test "x$has_space" != x; then
8421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8423        fi
8424        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8425      fi
8426  fi
8427
8428      # Now join together the path and the arguments once again
8429      if test "x$arguments" != xEOL; then
8430        new_complete="$new_path ${arguments% *}"
8431      else
8432        new_complete="$new_path"
8433      fi
8434
8435  if test "x$complete" != "x$new_complete"; then
8436      FOUND_MAKE="$new_complete"
8437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8438$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8439    fi
8440
8441        fi
8442      fi
8443    fi
8444  fi
8445
8446    if test "x$FOUND_MAKE" = x; then
8447      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8448    fi
8449  else
8450    # Try our hardest to locate a correct version of GNU make
8451    for ac_prog in gmake
8452do
8453  # Extract the first word of "$ac_prog", so it can be a program name with args.
8454set dummy $ac_prog; ac_word=$2
8455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8456$as_echo_n "checking for $ac_word... " >&6; }
8457if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8458  $as_echo_n "(cached) " >&6
8459else
8460  case $CHECK_GMAKE in
8461  [\\/]* | ?:[\\/]*)
8462  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8463  ;;
8464  *)
8465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466for as_dir in $PATH
8467do
8468  IFS=$as_save_IFS
8469  test -z "$as_dir" && as_dir=.
8470    for ac_exec_ext in '' $ac_executable_extensions; do
8471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8472    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8474    break 2
8475  fi
8476done
8477  done
8478IFS=$as_save_IFS
8479
8480  ;;
8481esac
8482fi
8483CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8484if test -n "$CHECK_GMAKE"; then
8485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8486$as_echo "$CHECK_GMAKE" >&6; }
8487else
8488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8489$as_echo "no" >&6; }
8490fi
8491
8492
8493  test -n "$CHECK_GMAKE" && break
8494done
8495
8496
8497  MAKE_CANDIDATE=""$CHECK_GMAKE""
8498  DESCRIPTION="gmake in PATH"
8499  if test "x$MAKE_CANDIDATE" != x; then
8500    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8501$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8502    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8503    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8504    if test "x$IS_GNU_MAKE" = x; then
8505      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8506$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8507    else
8508      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8509      if test "x$IS_MODERN_MAKE" = x; then
8510        { $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
8511$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;}
8512      else
8513        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8514          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8515            MAKE_EXPECTED_ENV='cygwin'
8516          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8517            MAKE_EXPECTED_ENV='msys'
8518          else
8519            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8520          fi
8521          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8522          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8523        else
8524          # Not relevant for non-Windows
8525          IS_MAKE_CORRECT_ENV=true
8526        fi
8527        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8528          { $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
8529$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;}
8530        else
8531          FOUND_MAKE=$MAKE_CANDIDATE
8532
8533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8534
8535  # First separate the path from the arguments. This will split at the first
8536  # space.
8537  complete="$FOUND_MAKE"
8538  path="${complete%% *}"
8539  tmp="$complete EOL"
8540  arguments="${tmp#* }"
8541
8542  # Input might be given as Windows format, start by converting to
8543  # unix format.
8544  new_path=`$CYGPATH -u "$path"`
8545
8546  # Now try to locate executable using which
8547  new_path=`$WHICH "$new_path" 2> /dev/null`
8548  # bat and cmd files are not always considered executable in cygwin causing which
8549  # to not find them
8550  if test "x$new_path" = x \
8551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8553    new_path=`$CYGPATH -u "$path"`
8554  fi
8555  if test "x$new_path" = x; then
8556    # Oops. Which didn't find the executable.
8557    # The splitting of arguments from the executable at a space might have been incorrect,
8558    # since paths with space are more likely in Windows. Give it another try with the whole
8559    # argument.
8560    path="$complete"
8561    arguments="EOL"
8562    new_path=`$CYGPATH -u "$path"`
8563    new_path=`$WHICH "$new_path" 2> /dev/null`
8564    # bat and cmd files are not always considered executable in cygwin causing which
8565    # to not find them
8566    if test "x$new_path" = x \
8567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8569      new_path=`$CYGPATH -u "$path"`
8570    fi
8571    if test "x$new_path" = x; then
8572      # It's still not found. Now this is an unrecoverable error.
8573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8575      has_space=`$ECHO "$complete" | $GREP " "`
8576      if test "x$has_space" != x; then
8577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8579      fi
8580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8581    fi
8582  fi
8583
8584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8587  # "foo.exe" is OK but "foo" is an error.
8588  #
8589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8590  # It is also a way to make sure we got the proper file name for the real test later on.
8591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8592  if test "x$test_shortpath" = x; then
8593    # Short path failed, file does not exist as specified.
8594    # Try adding .exe or .cmd
8595    if test -f "${new_path}.exe"; then
8596       input_to_shortpath="${new_path}.exe"
8597    elif test -f "${new_path}.cmd"; then
8598       input_to_shortpath="${new_path}.cmd"
8599    else
8600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8605    fi
8606  else
8607    input_to_shortpath="$new_path"
8608  fi
8609
8610  # Call helper function which possibly converts this using DOS-style short mode.
8611  # If so, the updated path is stored in $new_path.
8612  new_path="$input_to_shortpath"
8613
8614  input_path="$input_to_shortpath"
8615  # Check if we need to convert this using DOS-style short mode. If the path
8616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8617  # take no chances and rewrite it.
8618  # Note: m4 eats our [], so we need to use [ and ] instead.
8619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8620  if test "x$has_forbidden_chars" != x; then
8621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8625      # Going to short mode and back again did indeed matter. Since short mode is
8626      # case insensitive, let's make it lowercase to improve readability.
8627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8628      # Now convert it back to Unix-stile (cygpath)
8629      input_path=`$CYGPATH -u "$shortmode_path"`
8630      new_path="$input_path"
8631    fi
8632  fi
8633
8634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8635  if test "x$test_cygdrive_prefix" = x; then
8636    # As a simple fix, exclude /usr/bin since it's not a real path.
8637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8639      # a path prefixed by /cygdrive for fixpath to work.
8640      new_path="$CYGWIN_ROOT_PATH$input_path"
8641    fi
8642  fi
8643
8644  # remove trailing .exe if any
8645  new_path="${new_path/%.exe/}"
8646
8647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8648
8649  # First separate the path from the arguments. This will split at the first
8650  # space.
8651  complete="$FOUND_MAKE"
8652  path="${complete%% *}"
8653  tmp="$complete EOL"
8654  arguments="${tmp#* }"
8655
8656  # Input might be given as Windows format, start by converting to
8657  # unix format.
8658  new_path="$path"
8659
8660  windows_path="$new_path"
8661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8662    unix_path=`$CYGPATH -u "$windows_path"`
8663    new_path="$unix_path"
8664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8666    new_path="$unix_path"
8667  fi
8668
8669
8670  # Now try to locate executable using which
8671  new_path=`$WHICH "$new_path" 2> /dev/null`
8672
8673  if test "x$new_path" = x; then
8674    # Oops. Which didn't find the executable.
8675    # The splitting of arguments from the executable at a space might have been incorrect,
8676    # since paths with space are more likely in Windows. Give it another try with the whole
8677    # argument.
8678    path="$complete"
8679    arguments="EOL"
8680    new_path="$path"
8681
8682  windows_path="$new_path"
8683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8684    unix_path=`$CYGPATH -u "$windows_path"`
8685    new_path="$unix_path"
8686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8688    new_path="$unix_path"
8689  fi
8690
8691
8692    new_path=`$WHICH "$new_path" 2> /dev/null`
8693
8694    if test "x$new_path" = x; then
8695      # It's still not found. Now this is an unrecoverable error.
8696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8698      has_space=`$ECHO "$complete" | $GREP " "`
8699      if test "x$has_space" != x; then
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8702      fi
8703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8704    fi
8705  fi
8706
8707  # Now new_path has a complete unix path to the binary
8708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8709    # Keep paths in /bin as-is, but remove trailing .exe if any
8710    new_path="${new_path/%.exe/}"
8711    # Do not save /bin paths to all_fixpath_prefixes!
8712  else
8713    # Not in mixed or Windows style, start by that.
8714    new_path=`cmd //c echo $new_path`
8715
8716  input_path="$new_path"
8717  # Check if we need to convert this using DOS-style short mode. If the path
8718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8719  # take no chances and rewrite it.
8720  # Note: m4 eats our [], so we need to use [ and ] instead.
8721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8722  if test "x$has_forbidden_chars" != x; then
8723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8725  fi
8726
8727    # Output is in $new_path
8728
8729  windows_path="$new_path"
8730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8731    unix_path=`$CYGPATH -u "$windows_path"`
8732    new_path="$unix_path"
8733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8735    new_path="$unix_path"
8736  fi
8737
8738    # remove trailing .exe if any
8739    new_path="${new_path/%.exe/}"
8740
8741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8743  fi
8744
8745  else
8746    # We're on a posix platform. Hooray! :)
8747    # First separate the path from the arguments. This will split at the first
8748    # space.
8749    complete="$FOUND_MAKE"
8750    path="${complete%% *}"
8751    tmp="$complete EOL"
8752    arguments="${tmp#* }"
8753
8754    # Cannot rely on the command "which" here since it doesn't always work.
8755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8756    if test -z "$is_absolute_path"; then
8757      # Path to executable is not absolute. Find it.
8758      IFS_save="$IFS"
8759      IFS=:
8760      for p in $PATH; do
8761        if test -f "$p/$path" && test -x "$p/$path"; then
8762          new_path="$p/$path"
8763          break
8764        fi
8765      done
8766      IFS="$IFS_save"
8767    else
8768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8769$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8770      new_path="$path"
8771    fi
8772
8773    if test "x$new_path" = x; then
8774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8776        has_space=`$ECHO "$complete" | $GREP " "`
8777        if test "x$has_space" != x; then
8778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8780        fi
8781        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8782      fi
8783  fi
8784
8785      # Now join together the path and the arguments once again
8786      if test "x$arguments" != xEOL; then
8787        new_complete="$new_path ${arguments% *}"
8788      else
8789        new_complete="$new_path"
8790      fi
8791
8792  if test "x$complete" != "x$new_complete"; then
8793      FOUND_MAKE="$new_complete"
8794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8795$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8796    fi
8797
8798        fi
8799      fi
8800    fi
8801  fi
8802
8803
8804    if test "x$FOUND_MAKE" = x; then
8805      for ac_prog in make
8806do
8807  # Extract the first word of "$ac_prog", so it can be a program name with args.
8808set dummy $ac_prog; ac_word=$2
8809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8810$as_echo_n "checking for $ac_word... " >&6; }
8811if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8812  $as_echo_n "(cached) " >&6
8813else
8814  case $CHECK_MAKE in
8815  [\\/]* | ?:[\\/]*)
8816  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8817  ;;
8818  *)
8819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8820for as_dir in $PATH
8821do
8822  IFS=$as_save_IFS
8823  test -z "$as_dir" && as_dir=.
8824    for ac_exec_ext in '' $ac_executable_extensions; do
8825  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8826    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8828    break 2
8829  fi
8830done
8831  done
8832IFS=$as_save_IFS
8833
8834  ;;
8835esac
8836fi
8837CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8838if test -n "$CHECK_MAKE"; then
8839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8840$as_echo "$CHECK_MAKE" >&6; }
8841else
8842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8843$as_echo "no" >&6; }
8844fi
8845
8846
8847  test -n "$CHECK_MAKE" && break
8848done
8849
8850
8851  MAKE_CANDIDATE=""$CHECK_MAKE""
8852  DESCRIPTION="make in PATH"
8853  if test "x$MAKE_CANDIDATE" != x; then
8854    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8855$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8856    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8857    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8858    if test "x$IS_GNU_MAKE" = x; then
8859      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8860$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8861    else
8862      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8863      if test "x$IS_MODERN_MAKE" = x; then
8864        { $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
8865$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;}
8866      else
8867        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8868          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8869            MAKE_EXPECTED_ENV='cygwin'
8870          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8871            MAKE_EXPECTED_ENV='msys'
8872          else
8873            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8874          fi
8875          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8876          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8877        else
8878          # Not relevant for non-Windows
8879          IS_MAKE_CORRECT_ENV=true
8880        fi
8881        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8882          { $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
8883$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;}
8884        else
8885          FOUND_MAKE=$MAKE_CANDIDATE
8886
8887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8888
8889  # First separate the path from the arguments. This will split at the first
8890  # space.
8891  complete="$FOUND_MAKE"
8892  path="${complete%% *}"
8893  tmp="$complete EOL"
8894  arguments="${tmp#* }"
8895
8896  # Input might be given as Windows format, start by converting to
8897  # unix format.
8898  new_path=`$CYGPATH -u "$path"`
8899
8900  # Now try to locate executable using which
8901  new_path=`$WHICH "$new_path" 2> /dev/null`
8902  # bat and cmd files are not always considered executable in cygwin causing which
8903  # to not find them
8904  if test "x$new_path" = x \
8905           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8906           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8907    new_path=`$CYGPATH -u "$path"`
8908  fi
8909  if test "x$new_path" = x; then
8910    # Oops. Which didn't find the executable.
8911    # The splitting of arguments from the executable at a space might have been incorrect,
8912    # since paths with space are more likely in Windows. Give it another try with the whole
8913    # argument.
8914    path="$complete"
8915    arguments="EOL"
8916    new_path=`$CYGPATH -u "$path"`
8917    new_path=`$WHICH "$new_path" 2> /dev/null`
8918    # bat and cmd files are not always considered executable in cygwin causing which
8919    # to not find them
8920    if test "x$new_path" = x \
8921             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8922             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8923      new_path=`$CYGPATH -u "$path"`
8924    fi
8925    if test "x$new_path" = x; then
8926      # It's still not found. Now this is an unrecoverable error.
8927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8928$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8929      has_space=`$ECHO "$complete" | $GREP " "`
8930      if test "x$has_space" != x; then
8931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8933      fi
8934      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8935    fi
8936  fi
8937
8938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8941  # "foo.exe" is OK but "foo" is an error.
8942  #
8943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8944  # It is also a way to make sure we got the proper file name for the real test later on.
8945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8946  if test "x$test_shortpath" = x; then
8947    # Short path failed, file does not exist as specified.
8948    # Try adding .exe or .cmd
8949    if test -f "${new_path}.exe"; then
8950       input_to_shortpath="${new_path}.exe"
8951    elif test -f "${new_path}.cmd"; then
8952       input_to_shortpath="${new_path}.cmd"
8953    else
8954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8955$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8958      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8959    fi
8960  else
8961    input_to_shortpath="$new_path"
8962  fi
8963
8964  # Call helper function which possibly converts this using DOS-style short mode.
8965  # If so, the updated path is stored in $new_path.
8966  new_path="$input_to_shortpath"
8967
8968  input_path="$input_to_shortpath"
8969  # Check if we need to convert this using DOS-style short mode. If the path
8970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8971  # take no chances and rewrite it.
8972  # Note: m4 eats our [], so we need to use [ and ] instead.
8973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8974  if test "x$has_forbidden_chars" != x; then
8975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8979      # Going to short mode and back again did indeed matter. Since short mode is
8980      # case insensitive, let's make it lowercase to improve readability.
8981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8982      # Now convert it back to Unix-stile (cygpath)
8983      input_path=`$CYGPATH -u "$shortmode_path"`
8984      new_path="$input_path"
8985    fi
8986  fi
8987
8988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8989  if test "x$test_cygdrive_prefix" = x; then
8990    # As a simple fix, exclude /usr/bin since it's not a real path.
8991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8993      # a path prefixed by /cygdrive for fixpath to work.
8994      new_path="$CYGWIN_ROOT_PATH$input_path"
8995    fi
8996  fi
8997
8998  # remove trailing .exe if any
8999  new_path="${new_path/%.exe/}"
9000
9001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9002
9003  # First separate the path from the arguments. This will split at the first
9004  # space.
9005  complete="$FOUND_MAKE"
9006  path="${complete%% *}"
9007  tmp="$complete EOL"
9008  arguments="${tmp#* }"
9009
9010  # Input might be given as Windows format, start by converting to
9011  # unix format.
9012  new_path="$path"
9013
9014  windows_path="$new_path"
9015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9016    unix_path=`$CYGPATH -u "$windows_path"`
9017    new_path="$unix_path"
9018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9020    new_path="$unix_path"
9021  fi
9022
9023
9024  # Now try to locate executable using which
9025  new_path=`$WHICH "$new_path" 2> /dev/null`
9026
9027  if test "x$new_path" = x; then
9028    # Oops. Which didn't find the executable.
9029    # The splitting of arguments from the executable at a space might have been incorrect,
9030    # since paths with space are more likely in Windows. Give it another try with the whole
9031    # argument.
9032    path="$complete"
9033    arguments="EOL"
9034    new_path="$path"
9035
9036  windows_path="$new_path"
9037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9038    unix_path=`$CYGPATH -u "$windows_path"`
9039    new_path="$unix_path"
9040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9042    new_path="$unix_path"
9043  fi
9044
9045
9046    new_path=`$WHICH "$new_path" 2> /dev/null`
9047
9048    if test "x$new_path" = x; then
9049      # It's still not found. Now this is an unrecoverable error.
9050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9052      has_space=`$ECHO "$complete" | $GREP " "`
9053      if test "x$has_space" != x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9056      fi
9057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9058    fi
9059  fi
9060
9061  # Now new_path has a complete unix path to the binary
9062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9063    # Keep paths in /bin as-is, but remove trailing .exe if any
9064    new_path="${new_path/%.exe/}"
9065    # Do not save /bin paths to all_fixpath_prefixes!
9066  else
9067    # Not in mixed or Windows style, start by that.
9068    new_path=`cmd //c echo $new_path`
9069
9070  input_path="$new_path"
9071  # Check if we need to convert this using DOS-style short mode. If the path
9072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9073  # take no chances and rewrite it.
9074  # Note: m4 eats our [], so we need to use [ and ] instead.
9075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9076  if test "x$has_forbidden_chars" != x; then
9077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9079  fi
9080
9081    # Output is in $new_path
9082
9083  windows_path="$new_path"
9084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9085    unix_path=`$CYGPATH -u "$windows_path"`
9086    new_path="$unix_path"
9087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9089    new_path="$unix_path"
9090  fi
9091
9092    # remove trailing .exe if any
9093    new_path="${new_path/%.exe/}"
9094
9095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9097  fi
9098
9099  else
9100    # We're on a posix platform. Hooray! :)
9101    # First separate the path from the arguments. This will split at the first
9102    # space.
9103    complete="$FOUND_MAKE"
9104    path="${complete%% *}"
9105    tmp="$complete EOL"
9106    arguments="${tmp#* }"
9107
9108    # Cannot rely on the command "which" here since it doesn't always work.
9109    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9110    if test -z "$is_absolute_path"; then
9111      # Path to executable is not absolute. Find it.
9112      IFS_save="$IFS"
9113      IFS=:
9114      for p in $PATH; do
9115        if test -f "$p/$path" && test -x "$p/$path"; then
9116          new_path="$p/$path"
9117          break
9118        fi
9119      done
9120      IFS="$IFS_save"
9121    else
9122      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9123$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9124      new_path="$path"
9125    fi
9126
9127    if test "x$new_path" = x; then
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9129$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9130        has_space=`$ECHO "$complete" | $GREP " "`
9131        if test "x$has_space" != x; then
9132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9134        fi
9135        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9136      fi
9137  fi
9138
9139      # Now join together the path and the arguments once again
9140      if test "x$arguments" != xEOL; then
9141        new_complete="$new_path ${arguments% *}"
9142      else
9143        new_complete="$new_path"
9144      fi
9145
9146  if test "x$complete" != "x$new_complete"; then
9147      FOUND_MAKE="$new_complete"
9148      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9149$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9150    fi
9151
9152        fi
9153      fi
9154    fi
9155  fi
9156
9157    fi
9158
9159    if test "x$FOUND_MAKE" = x; then
9160      if test "x$TOOLS_DIR" != x; then
9161        # We have a tools-dir, check that as well before giving up.
9162        OLD_PATH=$PATH
9163        PATH=$TOOLS_DIR:$PATH
9164        for ac_prog in gmake
9165do
9166  # Extract the first word of "$ac_prog", so it can be a program name with args.
9167set dummy $ac_prog; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $CHECK_TOOLSDIR_GMAKE in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9185    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9197if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9199$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9207done
9208
9209
9210  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9211  DESCRIPTION="gmake in tools-dir"
9212  if test "x$MAKE_CANDIDATE" != x; then
9213    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9214$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9215    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9216    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9217    if test "x$IS_GNU_MAKE" = x; then
9218      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9219$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9220    else
9221      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9222      if test "x$IS_MODERN_MAKE" = x; then
9223        { $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
9224$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;}
9225      else
9226        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9227          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9228            MAKE_EXPECTED_ENV='cygwin'
9229          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9230            MAKE_EXPECTED_ENV='msys'
9231          else
9232            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9233          fi
9234          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9235          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9236        else
9237          # Not relevant for non-Windows
9238          IS_MAKE_CORRECT_ENV=true
9239        fi
9240        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9241          { $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
9242$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;}
9243        else
9244          FOUND_MAKE=$MAKE_CANDIDATE
9245
9246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9247
9248  # First separate the path from the arguments. This will split at the first
9249  # space.
9250  complete="$FOUND_MAKE"
9251  path="${complete%% *}"
9252  tmp="$complete EOL"
9253  arguments="${tmp#* }"
9254
9255  # Input might be given as Windows format, start by converting to
9256  # unix format.
9257  new_path=`$CYGPATH -u "$path"`
9258
9259  # Now try to locate executable using which
9260  new_path=`$WHICH "$new_path" 2> /dev/null`
9261  # bat and cmd files are not always considered executable in cygwin causing which
9262  # to not find them
9263  if test "x$new_path" = x \
9264           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9265           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9266    new_path=`$CYGPATH -u "$path"`
9267  fi
9268  if test "x$new_path" = x; then
9269    # Oops. Which didn't find the executable.
9270    # The splitting of arguments from the executable at a space might have been incorrect,
9271    # since paths with space are more likely in Windows. Give it another try with the whole
9272    # argument.
9273    path="$complete"
9274    arguments="EOL"
9275    new_path=`$CYGPATH -u "$path"`
9276    new_path=`$WHICH "$new_path" 2> /dev/null`
9277    # bat and cmd files are not always considered executable in cygwin causing which
9278    # to not find them
9279    if test "x$new_path" = x \
9280             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9281             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9282      new_path=`$CYGPATH -u "$path"`
9283    fi
9284    if test "x$new_path" = x; then
9285      # It's still not found. Now this is an unrecoverable error.
9286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9288      has_space=`$ECHO "$complete" | $GREP " "`
9289      if test "x$has_space" != x; then
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9292      fi
9293      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9294    fi
9295  fi
9296
9297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9300  # "foo.exe" is OK but "foo" is an error.
9301  #
9302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9303  # It is also a way to make sure we got the proper file name for the real test later on.
9304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9305  if test "x$test_shortpath" = x; then
9306    # Short path failed, file does not exist as specified.
9307    # Try adding .exe or .cmd
9308    if test -f "${new_path}.exe"; then
9309       input_to_shortpath="${new_path}.exe"
9310    elif test -f "${new_path}.cmd"; then
9311       input_to_shortpath="${new_path}.cmd"
9312    else
9313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9318    fi
9319  else
9320    input_to_shortpath="$new_path"
9321  fi
9322
9323  # Call helper function which possibly converts this using DOS-style short mode.
9324  # If so, the updated path is stored in $new_path.
9325  new_path="$input_to_shortpath"
9326
9327  input_path="$input_to_shortpath"
9328  # Check if we need to convert this using DOS-style short mode. If the path
9329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9330  # take no chances and rewrite it.
9331  # Note: m4 eats our [], so we need to use [ and ] instead.
9332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9333  if test "x$has_forbidden_chars" != x; then
9334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9338      # Going to short mode and back again did indeed matter. Since short mode is
9339      # case insensitive, let's make it lowercase to improve readability.
9340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9341      # Now convert it back to Unix-stile (cygpath)
9342      input_path=`$CYGPATH -u "$shortmode_path"`
9343      new_path="$input_path"
9344    fi
9345  fi
9346
9347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9348  if test "x$test_cygdrive_prefix" = x; then
9349    # As a simple fix, exclude /usr/bin since it's not a real path.
9350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9352      # a path prefixed by /cygdrive for fixpath to work.
9353      new_path="$CYGWIN_ROOT_PATH$input_path"
9354    fi
9355  fi
9356
9357  # remove trailing .exe if any
9358  new_path="${new_path/%.exe/}"
9359
9360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9361
9362  # First separate the path from the arguments. This will split at the first
9363  # space.
9364  complete="$FOUND_MAKE"
9365  path="${complete%% *}"
9366  tmp="$complete EOL"
9367  arguments="${tmp#* }"
9368
9369  # Input might be given as Windows format, start by converting to
9370  # unix format.
9371  new_path="$path"
9372
9373  windows_path="$new_path"
9374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9375    unix_path=`$CYGPATH -u "$windows_path"`
9376    new_path="$unix_path"
9377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9379    new_path="$unix_path"
9380  fi
9381
9382
9383  # Now try to locate executable using which
9384  new_path=`$WHICH "$new_path" 2> /dev/null`
9385
9386  if test "x$new_path" = x; then
9387    # Oops. Which didn't find the executable.
9388    # The splitting of arguments from the executable at a space might have been incorrect,
9389    # since paths with space are more likely in Windows. Give it another try with the whole
9390    # argument.
9391    path="$complete"
9392    arguments="EOL"
9393    new_path="$path"
9394
9395  windows_path="$new_path"
9396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9397    unix_path=`$CYGPATH -u "$windows_path"`
9398    new_path="$unix_path"
9399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9401    new_path="$unix_path"
9402  fi
9403
9404
9405    new_path=`$WHICH "$new_path" 2> /dev/null`
9406
9407    if test "x$new_path" = x; then
9408      # It's still not found. Now this is an unrecoverable error.
9409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9411      has_space=`$ECHO "$complete" | $GREP " "`
9412      if test "x$has_space" != x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9415      fi
9416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9417    fi
9418  fi
9419
9420  # Now new_path has a complete unix path to the binary
9421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9422    # Keep paths in /bin as-is, but remove trailing .exe if any
9423    new_path="${new_path/%.exe/}"
9424    # Do not save /bin paths to all_fixpath_prefixes!
9425  else
9426    # Not in mixed or Windows style, start by that.
9427    new_path=`cmd //c echo $new_path`
9428
9429  input_path="$new_path"
9430  # Check if we need to convert this using DOS-style short mode. If the path
9431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9432  # take no chances and rewrite it.
9433  # Note: m4 eats our [], so we need to use [ and ] instead.
9434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9435  if test "x$has_forbidden_chars" != x; then
9436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9438  fi
9439
9440    # Output is in $new_path
9441
9442  windows_path="$new_path"
9443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9444    unix_path=`$CYGPATH -u "$windows_path"`
9445    new_path="$unix_path"
9446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9448    new_path="$unix_path"
9449  fi
9450
9451    # remove trailing .exe if any
9452    new_path="${new_path/%.exe/}"
9453
9454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9456  fi
9457
9458  else
9459    # We're on a posix platform. Hooray! :)
9460    # First separate the path from the arguments. This will split at the first
9461    # space.
9462    complete="$FOUND_MAKE"
9463    path="${complete%% *}"
9464    tmp="$complete EOL"
9465    arguments="${tmp#* }"
9466
9467    # Cannot rely on the command "which" here since it doesn't always work.
9468    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9469    if test -z "$is_absolute_path"; then
9470      # Path to executable is not absolute. Find it.
9471      IFS_save="$IFS"
9472      IFS=:
9473      for p in $PATH; do
9474        if test -f "$p/$path" && test -x "$p/$path"; then
9475          new_path="$p/$path"
9476          break
9477        fi
9478      done
9479      IFS="$IFS_save"
9480    else
9481      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9482$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9483      new_path="$path"
9484    fi
9485
9486    if test "x$new_path" = x; then
9487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9489        has_space=`$ECHO "$complete" | $GREP " "`
9490        if test "x$has_space" != x; then
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9493        fi
9494        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9495      fi
9496  fi
9497
9498      # Now join together the path and the arguments once again
9499      if test "x$arguments" != xEOL; then
9500        new_complete="$new_path ${arguments% *}"
9501      else
9502        new_complete="$new_path"
9503      fi
9504
9505  if test "x$complete" != "x$new_complete"; then
9506      FOUND_MAKE="$new_complete"
9507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9508$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9509    fi
9510
9511        fi
9512      fi
9513    fi
9514  fi
9515
9516        if test "x$FOUND_MAKE" = x; then
9517          for ac_prog in make
9518do
9519  # Extract the first word of "$ac_prog", so it can be a program name with args.
9520set dummy $ac_prog; ac_word=$2
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9522$as_echo_n "checking for $ac_word... " >&6; }
9523if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9524  $as_echo_n "(cached) " >&6
9525else
9526  case $CHECK_TOOLSDIR_MAKE in
9527  [\\/]* | ?:[\\/]*)
9528  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9529  ;;
9530  *)
9531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9532for as_dir in $PATH
9533do
9534  IFS=$as_save_IFS
9535  test -z "$as_dir" && as_dir=.
9536    for ac_exec_ext in '' $ac_executable_extensions; do
9537  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9538    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9540    break 2
9541  fi
9542done
9543  done
9544IFS=$as_save_IFS
9545
9546  ;;
9547esac
9548fi
9549CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9550if test -n "$CHECK_TOOLSDIR_MAKE"; then
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9552$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9553else
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
9556fi
9557
9558
9559  test -n "$CHECK_TOOLSDIR_MAKE" && break
9560done
9561
9562
9563  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9564  DESCRIPTION="make in tools-dir"
9565  if test "x$MAKE_CANDIDATE" != x; then
9566    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9567$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9568    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9569    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9570    if test "x$IS_GNU_MAKE" = x; then
9571      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9572$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9573    else
9574      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9575      if test "x$IS_MODERN_MAKE" = x; then
9576        { $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
9577$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;}
9578      else
9579        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9580          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9581            MAKE_EXPECTED_ENV='cygwin'
9582          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9583            MAKE_EXPECTED_ENV='msys'
9584          else
9585            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9586          fi
9587          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9588          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9589        else
9590          # Not relevant for non-Windows
9591          IS_MAKE_CORRECT_ENV=true
9592        fi
9593        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9594          { $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
9595$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;}
9596        else
9597          FOUND_MAKE=$MAKE_CANDIDATE
9598
9599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9600
9601  # First separate the path from the arguments. This will split at the first
9602  # space.
9603  complete="$FOUND_MAKE"
9604  path="${complete%% *}"
9605  tmp="$complete EOL"
9606  arguments="${tmp#* }"
9607
9608  # Input might be given as Windows format, start by converting to
9609  # unix format.
9610  new_path=`$CYGPATH -u "$path"`
9611
9612  # Now try to locate executable using which
9613  new_path=`$WHICH "$new_path" 2> /dev/null`
9614  # bat and cmd files are not always considered executable in cygwin causing which
9615  # to not find them
9616  if test "x$new_path" = x \
9617           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9618           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9619    new_path=`$CYGPATH -u "$path"`
9620  fi
9621  if test "x$new_path" = x; then
9622    # Oops. Which didn't find the executable.
9623    # The splitting of arguments from the executable at a space might have been incorrect,
9624    # since paths with space are more likely in Windows. Give it another try with the whole
9625    # argument.
9626    path="$complete"
9627    arguments="EOL"
9628    new_path=`$CYGPATH -u "$path"`
9629    new_path=`$WHICH "$new_path" 2> /dev/null`
9630    # bat and cmd files are not always considered executable in cygwin causing which
9631    # to not find them
9632    if test "x$new_path" = x \
9633             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9634             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9635      new_path=`$CYGPATH -u "$path"`
9636    fi
9637    if test "x$new_path" = x; then
9638      # It's still not found. Now this is an unrecoverable error.
9639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9641      has_space=`$ECHO "$complete" | $GREP " "`
9642      if test "x$has_space" != x; then
9643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9645      fi
9646      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9647    fi
9648  fi
9649
9650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9653  # "foo.exe" is OK but "foo" is an error.
9654  #
9655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9656  # It is also a way to make sure we got the proper file name for the real test later on.
9657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9658  if test "x$test_shortpath" = x; then
9659    # Short path failed, file does not exist as specified.
9660    # Try adding .exe or .cmd
9661    if test -f "${new_path}.exe"; then
9662       input_to_shortpath="${new_path}.exe"
9663    elif test -f "${new_path}.cmd"; then
9664       input_to_shortpath="${new_path}.cmd"
9665    else
9666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9668      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9669$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9671    fi
9672  else
9673    input_to_shortpath="$new_path"
9674  fi
9675
9676  # Call helper function which possibly converts this using DOS-style short mode.
9677  # If so, the updated path is stored in $new_path.
9678  new_path="$input_to_shortpath"
9679
9680  input_path="$input_to_shortpath"
9681  # Check if we need to convert this using DOS-style short mode. If the path
9682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9683  # take no chances and rewrite it.
9684  # Note: m4 eats our [], so we need to use [ and ] instead.
9685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9686  if test "x$has_forbidden_chars" != x; then
9687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9691      # Going to short mode and back again did indeed matter. Since short mode is
9692      # case insensitive, let's make it lowercase to improve readability.
9693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9694      # Now convert it back to Unix-stile (cygpath)
9695      input_path=`$CYGPATH -u "$shortmode_path"`
9696      new_path="$input_path"
9697    fi
9698  fi
9699
9700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9701  if test "x$test_cygdrive_prefix" = x; then
9702    # As a simple fix, exclude /usr/bin since it's not a real path.
9703    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9705      # a path prefixed by /cygdrive for fixpath to work.
9706      new_path="$CYGWIN_ROOT_PATH$input_path"
9707    fi
9708  fi
9709
9710  # remove trailing .exe if any
9711  new_path="${new_path/%.exe/}"
9712
9713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9714
9715  # First separate the path from the arguments. This will split at the first
9716  # space.
9717  complete="$FOUND_MAKE"
9718  path="${complete%% *}"
9719  tmp="$complete EOL"
9720  arguments="${tmp#* }"
9721
9722  # Input might be given as Windows format, start by converting to
9723  # unix format.
9724  new_path="$path"
9725
9726  windows_path="$new_path"
9727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9728    unix_path=`$CYGPATH -u "$windows_path"`
9729    new_path="$unix_path"
9730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9732    new_path="$unix_path"
9733  fi
9734
9735
9736  # Now try to locate executable using which
9737  new_path=`$WHICH "$new_path" 2> /dev/null`
9738
9739  if test "x$new_path" = x; then
9740    # Oops. Which didn't find the executable.
9741    # The splitting of arguments from the executable at a space might have been incorrect,
9742    # since paths with space are more likely in Windows. Give it another try with the whole
9743    # argument.
9744    path="$complete"
9745    arguments="EOL"
9746    new_path="$path"
9747
9748  windows_path="$new_path"
9749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9750    unix_path=`$CYGPATH -u "$windows_path"`
9751    new_path="$unix_path"
9752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9754    new_path="$unix_path"
9755  fi
9756
9757
9758    new_path=`$WHICH "$new_path" 2> /dev/null`
9759
9760    if test "x$new_path" = x; then
9761      # It's still not found. Now this is an unrecoverable error.
9762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9764      has_space=`$ECHO "$complete" | $GREP " "`
9765      if test "x$has_space" != x; then
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9768      fi
9769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9770    fi
9771  fi
9772
9773  # Now new_path has a complete unix path to the binary
9774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9775    # Keep paths in /bin as-is, but remove trailing .exe if any
9776    new_path="${new_path/%.exe/}"
9777    # Do not save /bin paths to all_fixpath_prefixes!
9778  else
9779    # Not in mixed or Windows style, start by that.
9780    new_path=`cmd //c echo $new_path`
9781
9782  input_path="$new_path"
9783  # Check if we need to convert this using DOS-style short mode. If the path
9784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9785  # take no chances and rewrite it.
9786  # Note: m4 eats our [], so we need to use [ and ] instead.
9787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9788  if test "x$has_forbidden_chars" != x; then
9789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9791  fi
9792
9793    # Output is in $new_path
9794
9795  windows_path="$new_path"
9796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9797    unix_path=`$CYGPATH -u "$windows_path"`
9798    new_path="$unix_path"
9799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9801    new_path="$unix_path"
9802  fi
9803
9804    # remove trailing .exe if any
9805    new_path="${new_path/%.exe/}"
9806
9807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9809  fi
9810
9811  else
9812    # We're on a posix platform. Hooray! :)
9813    # First separate the path from the arguments. This will split at the first
9814    # space.
9815    complete="$FOUND_MAKE"
9816    path="${complete%% *}"
9817    tmp="$complete EOL"
9818    arguments="${tmp#* }"
9819
9820    # Cannot rely on the command "which" here since it doesn't always work.
9821    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9822    if test -z "$is_absolute_path"; then
9823      # Path to executable is not absolute. Find it.
9824      IFS_save="$IFS"
9825      IFS=:
9826      for p in $PATH; do
9827        if test -f "$p/$path" && test -x "$p/$path"; then
9828          new_path="$p/$path"
9829          break
9830        fi
9831      done
9832      IFS="$IFS_save"
9833    else
9834      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9835$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9836      new_path="$path"
9837    fi
9838
9839    if test "x$new_path" = x; then
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9842        has_space=`$ECHO "$complete" | $GREP " "`
9843        if test "x$has_space" != x; then
9844          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9845$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9846        fi
9847        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9848      fi
9849  fi
9850
9851      # Now join together the path and the arguments once again
9852      if test "x$arguments" != xEOL; then
9853        new_complete="$new_path ${arguments% *}"
9854      else
9855        new_complete="$new_path"
9856      fi
9857
9858  if test "x$complete" != "x$new_complete"; then
9859      FOUND_MAKE="$new_complete"
9860      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9861$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9862    fi
9863
9864        fi
9865      fi
9866    fi
9867  fi
9868
9869        fi
9870        PATH=$OLD_PATH
9871      fi
9872    fi
9873
9874    if test "x$FOUND_MAKE" = x; then
9875      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
9876    fi
9877  fi
9878
9879  MAKE=$FOUND_MAKE
9880
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9882$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9883
9884
9885
9886    # Test if find supports -delete
9887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9888$as_echo_n "checking if find supports -delete... " >&6; }
9889    FIND_DELETE="-delete"
9890
9891    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9892
9893    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9894
9895    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9896    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9897        # No, it does not.
9898        rm $DELETEDIR/TestIfFindSupportsDelete
9899        FIND_DELETE="-exec rm \{\} \+"
9900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
9902    else
9903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9904$as_echo "yes" >&6; }
9905    fi
9906    rmdir $DELETEDIR
9907
9908
9909
9910# These tools might not be installed by default,
9911# need hint on how to install them.
9912
9913    for ac_prog in unzip
9914do
9915  # Extract the first word of "$ac_prog", so it can be a program name with args.
9916set dummy $ac_prog; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if test "${ac_cv_path_UNZIP+set}" = set; then :
9920  $as_echo_n "(cached) " >&6
9921else
9922  case $UNZIP in
9923  [\\/]* | ?:[\\/]*)
9924  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9925  ;;
9926  *)
9927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  test -z "$as_dir" && as_dir=.
9932    for ac_exec_ext in '' $ac_executable_extensions; do
9933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9934    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936    break 2
9937  fi
9938done
9939  done
9940IFS=$as_save_IFS
9941
9942  ;;
9943esac
9944fi
9945UNZIP=$ac_cv_path_UNZIP
9946if test -n "$UNZIP"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9948$as_echo "$UNZIP" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954
9955  test -n "$UNZIP" && break
9956done
9957
9958
9959    if test "x$UNZIP" = x; then
9960        if test "xunzip" = x; then
9961          PROG_NAME=unzip
9962        else
9963          PROG_NAME=unzip
9964        fi
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9967        as_fn_error $? "Cannot continue" "$LINENO" 5
9968    fi
9969
9970
9971
9972    for ac_prog in zip
9973do
9974  # Extract the first word of "$ac_prog", so it can be a program name with args.
9975set dummy $ac_prog; ac_word=$2
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9977$as_echo_n "checking for $ac_word... " >&6; }
9978if test "${ac_cv_path_ZIP+set}" = set; then :
9979  $as_echo_n "(cached) " >&6
9980else
9981  case $ZIP in
9982  [\\/]* | ?:[\\/]*)
9983  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9984  ;;
9985  *)
9986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987for as_dir in $PATH
9988do
9989  IFS=$as_save_IFS
9990  test -z "$as_dir" && as_dir=.
9991    for ac_exec_ext in '' $ac_executable_extensions; do
9992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9993    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995    break 2
9996  fi
9997done
9998  done
9999IFS=$as_save_IFS
10000
10001  ;;
10002esac
10003fi
10004ZIP=$ac_cv_path_ZIP
10005if test -n "$ZIP"; then
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10007$as_echo "$ZIP" >&6; }
10008else
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
10011fi
10012
10013
10014  test -n "$ZIP" && break
10015done
10016
10017
10018    if test "x$ZIP" = x; then
10019        if test "xzip" = x; then
10020          PROG_NAME=zip
10021        else
10022          PROG_NAME=zip
10023        fi
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10026        as_fn_error $? "Cannot continue" "$LINENO" 5
10027    fi
10028
10029
10030
10031# Non-required basic tools
10032
10033# Extract the first word of "ldd", so it can be a program name with args.
10034set dummy ldd; ac_word=$2
10035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10036$as_echo_n "checking for $ac_word... " >&6; }
10037if test "${ac_cv_path_LDD+set}" = set; then :
10038  $as_echo_n "(cached) " >&6
10039else
10040  case $LDD in
10041  [\\/]* | ?:[\\/]*)
10042  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10043  ;;
10044  *)
10045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10046for as_dir in $PATH
10047do
10048  IFS=$as_save_IFS
10049  test -z "$as_dir" && as_dir=.
10050    for ac_exec_ext in '' $ac_executable_extensions; do
10051  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10052    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10054    break 2
10055  fi
10056done
10057  done
10058IFS=$as_save_IFS
10059
10060  ;;
10061esac
10062fi
10063LDD=$ac_cv_path_LDD
10064if test -n "$LDD"; then
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10066$as_echo "$LDD" >&6; }
10067else
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070fi
10071
10072
10073if test "x$LDD" = "x"; then
10074    # List shared lib dependencies is used for
10075    # debug output and checking for forbidden dependencies.
10076    # We can build without it.
10077    LDD="true"
10078fi
10079# Extract the first word of "otool", so it can be a program name with args.
10080set dummy otool; ac_word=$2
10081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10082$as_echo_n "checking for $ac_word... " >&6; }
10083if test "${ac_cv_path_OTOOL+set}" = set; then :
10084  $as_echo_n "(cached) " >&6
10085else
10086  case $OTOOL in
10087  [\\/]* | ?:[\\/]*)
10088  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10089  ;;
10090  *)
10091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10092for as_dir in $PATH
10093do
10094  IFS=$as_save_IFS
10095  test -z "$as_dir" && as_dir=.
10096    for ac_exec_ext in '' $ac_executable_extensions; do
10097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10098    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10100    break 2
10101  fi
10102done
10103  done
10104IFS=$as_save_IFS
10105
10106  ;;
10107esac
10108fi
10109OTOOL=$ac_cv_path_OTOOL
10110if test -n "$OTOOL"; then
10111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10112$as_echo "$OTOOL" >&6; }
10113else
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
10116fi
10117
10118
10119if test "x$OTOOL" = "x"; then
10120   OTOOL="true"
10121fi
10122for ac_prog in readelf greadelf
10123do
10124  # Extract the first word of "$ac_prog", so it can be a program name with args.
10125set dummy $ac_prog; ac_word=$2
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10127$as_echo_n "checking for $ac_word... " >&6; }
10128if test "${ac_cv_path_READELF+set}" = set; then :
10129  $as_echo_n "(cached) " >&6
10130else
10131  case $READELF in
10132  [\\/]* | ?:[\\/]*)
10133  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10134  ;;
10135  *)
10136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10137for as_dir in $PATH
10138do
10139  IFS=$as_save_IFS
10140  test -z "$as_dir" && as_dir=.
10141    for ac_exec_ext in '' $ac_executable_extensions; do
10142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10143    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10145    break 2
10146  fi
10147done
10148  done
10149IFS=$as_save_IFS
10150
10151  ;;
10152esac
10153fi
10154READELF=$ac_cv_path_READELF
10155if test -n "$READELF"; then
10156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10157$as_echo "$READELF" >&6; }
10158else
10159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160$as_echo "no" >&6; }
10161fi
10162
10163
10164  test -n "$READELF" && break
10165done
10166
10167# Extract the first word of "hg", so it can be a program name with args.
10168set dummy hg; ac_word=$2
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10170$as_echo_n "checking for $ac_word... " >&6; }
10171if test "${ac_cv_path_HG+set}" = set; then :
10172  $as_echo_n "(cached) " >&6
10173else
10174  case $HG in
10175  [\\/]* | ?:[\\/]*)
10176  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10177  ;;
10178  *)
10179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10180for as_dir in $PATH
10181do
10182  IFS=$as_save_IFS
10183  test -z "$as_dir" && as_dir=.
10184    for ac_exec_ext in '' $ac_executable_extensions; do
10185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10186    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10188    break 2
10189  fi
10190done
10191  done
10192IFS=$as_save_IFS
10193
10194  ;;
10195esac
10196fi
10197HG=$ac_cv_path_HG
10198if test -n "$HG"; then
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10200$as_echo "$HG" >&6; }
10201else
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203$as_echo "no" >&6; }
10204fi
10205
10206
10207# Extract the first word of "stat", so it can be a program name with args.
10208set dummy stat; ac_word=$2
10209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10210$as_echo_n "checking for $ac_word... " >&6; }
10211if test "${ac_cv_path_STAT+set}" = set; then :
10212  $as_echo_n "(cached) " >&6
10213else
10214  case $STAT in
10215  [\\/]* | ?:[\\/]*)
10216  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10217  ;;
10218  *)
10219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10220for as_dir in $PATH
10221do
10222  IFS=$as_save_IFS
10223  test -z "$as_dir" && as_dir=.
10224    for ac_exec_ext in '' $ac_executable_extensions; do
10225  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10226    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10228    break 2
10229  fi
10230done
10231  done
10232IFS=$as_save_IFS
10233
10234  ;;
10235esac
10236fi
10237STAT=$ac_cv_path_STAT
10238if test -n "$STAT"; then
10239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10240$as_echo "$STAT" >&6; }
10241else
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
10244fi
10245
10246
10247# Extract the first word of "time", so it can be a program name with args.
10248set dummy time; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if test "${ac_cv_path_TIME+set}" = set; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $TIME in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10266    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277TIME=$ac_cv_path_TIME
10278if test -n "$TIME"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10280$as_echo "$TIME" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287
10288if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10289
10290    for ac_prog in comm
10291do
10292  # Extract the first word of "$ac_prog", so it can be a program name with args.
10293set dummy $ac_prog; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if test "${ac_cv_path_COMM+set}" = set; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $COMM in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10311    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322COMM=$ac_cv_path_COMM
10323if test -n "$COMM"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10325$as_echo "$COMM" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  test -n "$COMM" && break
10333done
10334
10335
10336    if test "x$COMM" = x; then
10337        if test "xcomm" = x; then
10338          PROG_NAME=comm
10339        else
10340          PROG_NAME=comm
10341        fi
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10344        as_fn_error $? "Cannot continue" "$LINENO" 5
10345    fi
10346
10347
10348fi
10349
10350
10351# Check if pkg-config is available.
10352
10353
10354if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10355	if test -n "$ac_tool_prefix"; then
10356  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10357set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10359$as_echo_n "checking for $ac_word... " >&6; }
10360if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10361  $as_echo_n "(cached) " >&6
10362else
10363  case $PKG_CONFIG in
10364  [\\/]* | ?:[\\/]*)
10365  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10366  ;;
10367  *)
10368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10369for as_dir in $PATH
10370do
10371  IFS=$as_save_IFS
10372  test -z "$as_dir" && as_dir=.
10373    for ac_exec_ext in '' $ac_executable_extensions; do
10374  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10375    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10377    break 2
10378  fi
10379done
10380  done
10381IFS=$as_save_IFS
10382
10383  ;;
10384esac
10385fi
10386PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10387if test -n "$PKG_CONFIG"; then
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10389$as_echo "$PKG_CONFIG" >&6; }
10390else
10391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
10393fi
10394
10395
10396fi
10397if test -z "$ac_cv_path_PKG_CONFIG"; then
10398  ac_pt_PKG_CONFIG=$PKG_CONFIG
10399  # Extract the first word of "pkg-config", so it can be a program name with args.
10400set dummy pkg-config; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $ac_pt_PKG_CONFIG in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10418    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10430if test -n "$ac_pt_PKG_CONFIG"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10432$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438  if test "x$ac_pt_PKG_CONFIG" = x; then
10439    PKG_CONFIG=""
10440  else
10441    case $cross_compiling:$ac_tool_warned in
10442yes:)
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10445ac_tool_warned=yes ;;
10446esac
10447    PKG_CONFIG=$ac_pt_PKG_CONFIG
10448  fi
10449else
10450  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10451fi
10452
10453fi
10454if test -n "$PKG_CONFIG"; then
10455	_pkg_min_version=0.9.0
10456	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10457$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10458	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10459		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10460$as_echo "yes" >&6; }
10461	else
10462		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10463$as_echo "no" >&6; }
10464		PKG_CONFIG=""
10465	fi
10466
10467fi
10468
10469# After basic tools have been setup, we can check build os specific details.
10470
10471###############################################################################
10472
10473# Note that this is the build platform OS version!
10474
10475OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10476OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10477OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10478OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10479
10480
10481
10482
10483
10484# Setup builddeps, for automatic downloading of tools we need.
10485# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10486# boot-jdk setup, but we need to have basic tools setup first.
10487
10488
10489# Check whether --with-builddeps-conf was given.
10490if test "${with_builddeps_conf+set}" = set; then :
10491  withval=$with_builddeps_conf;
10492fi
10493
10494
10495
10496# Check whether --with-builddeps-server was given.
10497if test "${with_builddeps_server+set}" = set; then :
10498  withval=$with_builddeps_server;
10499fi
10500
10501
10502
10503# Check whether --with-builddeps-dir was given.
10504if test "${with_builddeps_dir+set}" = set; then :
10505  withval=$with_builddeps_dir;
10506else
10507  with_builddeps_dir=/localhome/builddeps
10508fi
10509
10510
10511
10512# Check whether --with-builddeps-group was given.
10513if test "${with_builddeps_group+set}" = set; then :
10514  withval=$with_builddeps_group;
10515fi
10516
10517
10518
10519
10520    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10521        if test "x$with_builddeps_conf" != x; then
10522            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10523$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10524            builddepsfile=$with_builddeps_conf
10525            if test -s $builddepsfile; then
10526                . $builddepsfile
10527                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10528$as_echo "loaded!" >&6; }
10529            else
10530               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10531           fi
10532        else
10533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10534$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10535            builddepsfile=`mktemp`
10536            touch $builddepsfile
10537            # Put all found confs into a single file.
10538            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10539            # Source the file to acquire the variables
10540            if test -s $builddepsfile; then
10541                . $builddepsfile
10542                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10543$as_echo "found at least one!" >&6; }
10544            else
10545               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10546           fi
10547        fi
10548        # Create build and target names that use _ instead of "-" and ".".
10549        # This is necessary to use them in variable names.
10550        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10551        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10552        # Extract rewrite information for build and target
10553        eval rewritten_build=\${REWRITE_${build_var}}
10554        if test "x$rewritten_build" = x; then
10555            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10556            echo Build stays the same $rewritten_build
10557        else
10558            echo Rewriting build for builddeps into $rewritten_build
10559        fi
10560        eval rewritten_target=\${REWRITE_${target_var}}
10561        if test "x$rewritten_target" = x; then
10562            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10563            echo Target stays the same $rewritten_target
10564        else
10565            echo Rewriting target for builddeps into $rewritten_target
10566        fi
10567        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10568        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10569    fi
10570    for ac_prog in 7z unzip
10571do
10572  # Extract the first word of "$ac_prog", so it can be a program name with args.
10573set dummy $ac_prog; ac_word=$2
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10575$as_echo_n "checking for $ac_word... " >&6; }
10576if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10577  $as_echo_n "(cached) " >&6
10578else
10579  if test -n "$BDEPS_UNZIP"; then
10580  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10581else
10582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10583for as_dir in $PATH
10584do
10585  IFS=$as_save_IFS
10586  test -z "$as_dir" && as_dir=.
10587    for ac_exec_ext in '' $ac_executable_extensions; do
10588  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10589    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10591    break 2
10592  fi
10593done
10594  done
10595IFS=$as_save_IFS
10596
10597fi
10598fi
10599BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10600if test -n "$BDEPS_UNZIP"; then
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10602$as_echo "$BDEPS_UNZIP" >&6; }
10603else
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10605$as_echo "no" >&6; }
10606fi
10607
10608
10609  test -n "$BDEPS_UNZIP" && break
10610done
10611
10612    if test "x$BDEPS_UNZIP" = x7z; then
10613        BDEPS_UNZIP="7z x"
10614    fi
10615
10616    for ac_prog in wget lftp ftp
10617do
10618  # Extract the first word of "$ac_prog", so it can be a program name with args.
10619set dummy $ac_prog; ac_word=$2
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10621$as_echo_n "checking for $ac_word... " >&6; }
10622if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10623  $as_echo_n "(cached) " >&6
10624else
10625  if test -n "$BDEPS_FTP"; then
10626  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10627else
10628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10635    ac_cv_prog_BDEPS_FTP="$ac_prog"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643fi
10644fi
10645BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10646if test -n "$BDEPS_FTP"; then
10647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10648$as_echo "$BDEPS_FTP" >&6; }
10649else
10650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10651$as_echo "no" >&6; }
10652fi
10653
10654
10655  test -n "$BDEPS_FTP" && break
10656done
10657
10658
10659
10660###############################################################################
10661#
10662# Determine OpenJDK variants, options and version numbers.
10663#
10664###############################################################################
10665
10666# We need build & target for this.
10667
10668
10669###############################################################################
10670#
10671# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10672# We always build headless support.
10673#
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10675$as_echo_n "checking headful support... " >&6; }
10676# Check whether --enable-headful was given.
10677if test "${enable_headful+set}" = set; then :
10678  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10679else
10680  SUPPORT_HEADFUL=yes
10681fi
10682
10683
10684SUPPORT_HEADLESS=yes
10685BUILD_HEADLESS="BUILD_HEADLESS:=true"
10686
10687if test "x$SUPPORT_HEADFUL" = xyes; then
10688    # We are building both headful and headless.
10689    headful_msg="inlude support for both headful and headless"
10690fi
10691
10692if test "x$SUPPORT_HEADFUL" = xno; then
10693    # Thus we are building headless only.
10694    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10695    headful_msg="headless only"
10696fi
10697
10698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10699$as_echo "$headful_msg" >&6; }
10700
10701
10702
10703
10704
10705# Control wether Hotspot runs Queens test after build.
10706# Check whether --enable-hotspot-test-in-build was given.
10707if test "${enable_hotspot_test_in_build+set}" = set; then :
10708  enableval=$enable_hotspot_test_in_build;
10709else
10710  enable_hotspot_test_in_build=no
10711fi
10712
10713if test "x$enable_hotspot_test_in_build" = "xyes"; then
10714    TEST_IN_BUILD=true
10715else
10716    TEST_IN_BUILD=false
10717fi
10718
10719
10720###############################################################################
10721#
10722# Choose cacerts source file
10723#
10724
10725# Check whether --with-cacerts-file was given.
10726if test "${with_cacerts_file+set}" = set; then :
10727  withval=$with_cacerts_file;
10728fi
10729
10730if test "x$with_cacerts_file" != x; then
10731    CACERTS_FILE=$with_cacerts_file
10732else
10733    if test "x$OPENJDK" = "xtrue"; then
10734        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10735    else
10736        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10737    fi
10738fi
10739
10740
10741###############################################################################
10742#
10743# Enable or disable unlimited crypto
10744#
10745# Check whether --enable-unlimited-crypto was given.
10746if test "${enable_unlimited_crypto+set}" = set; then :
10747  enableval=$enable_unlimited_crypto;
10748else
10749  enable_unlimited_crypto=no
10750fi
10751
10752if test "x$enable_unlimited_crypto" = "xyes"; then
10753    UNLIMITED_CRYPTO=true
10754else
10755    UNLIMITED_CRYPTO=false
10756fi
10757
10758
10759###############################################################################
10760#
10761# Compress jars
10762#
10763COMPRESS_JARS=false
10764
10765
10766
10767
10768# Source the version numbers
10769. $AUTOCONF_DIR/version-numbers
10770
10771# Get the settings from parameters
10772
10773# Check whether --with-milestone was given.
10774if test "${with_milestone+set}" = set; then :
10775  withval=$with_milestone;
10776fi
10777
10778if test "x$with_milestone" = xyes; then
10779  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10780elif test "x$with_milestone" != x; then
10781    MILESTONE="$with_milestone"
10782else
10783  MILESTONE=internal
10784fi
10785
10786
10787# Check whether --with-build-number was given.
10788if test "${with_build_number+set}" = set; then :
10789  withval=$with_build_number;
10790fi
10791
10792if test "x$with_build_number" = xyes; then
10793  as_fn_error $? "Build number must have a value" "$LINENO" 5
10794elif test "x$with_build_number" != x; then
10795  JDK_BUILD_NUMBER="$with_build_number"
10796fi
10797if test "x$JDK_BUILD_NUMBER" = x; then
10798  JDK_BUILD_NUMBER=b00
10799fi
10800
10801
10802# Check whether --with-user-release-suffix was given.
10803if test "${with_user_release_suffix+set}" = set; then :
10804  withval=$with_user_release_suffix;
10805fi
10806
10807if test "x$with_user_release_suffix" = xyes; then
10808  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10809elif test "x$with_user_release_suffix" != x; then
10810  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10811else
10812  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10813  # Avoid [:alnum:] since it depends on the locale.
10814  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10815  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10816fi
10817
10818
10819# Now set the JDK version, milestone, build number etc.
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834COPYRIGHT_YEAR=`date +'%Y'`
10835
10836
10837if test "x$JDK_UPDATE_VERSION" != x; then
10838  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10839else
10840  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10841fi
10842
10843
10844COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10845
10846
10847
10848###############################################################################
10849#
10850# Setup BootJDK, used to bootstrap the build.
10851#
10852###############################################################################
10853
10854
10855BOOT_JDK_FOUND=no
10856
10857# Check whether --with-boot-jdk was given.
10858if test "${with_boot_jdk+set}" = set; then :
10859  withval=$with_boot_jdk;
10860fi
10861
10862
10863# We look for the Boot JDK through various means, going from more certain to
10864# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10865# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10866# must check if this is indeed valid; otherwise we'll continue looking.
10867
10868# Test: Is bootjdk explicitely set by command line arguments?
10869
10870  if test "x$BOOT_JDK_FOUND" = xno; then
10871    # Now execute the test
10872
10873if test "x$with_boot_jdk" != x; then
10874    BOOT_JDK=$with_boot_jdk
10875    BOOT_JDK_FOUND=maybe
10876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10877$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10878fi
10879
10880
10881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10883      # Do we have a bin/java?
10884      if test ! -x "$BOOT_JDK/bin/java"; then
10885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10887        BOOT_JDK_FOUND=no
10888      else
10889        # Do we have a bin/javac?
10890        if test ! -x "$BOOT_JDK/bin/javac"; then
10891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10895          BOOT_JDK_FOUND=no
10896        else
10897          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10898          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10901            BOOT_JDK_FOUND=no
10902          else
10903            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10905
10906            # Extra M4 quote needed to protect [] in grep expression.
10907            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10908            if test "x$FOUND_VERSION_78" = x; then
10909              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10911              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10912$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10913              BOOT_JDK_FOUND=no
10914            else
10915              # We're done! :-)
10916              BOOT_JDK_FOUND=yes
10917
10918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10919
10920  # Input might be given as Windows format, start by converting to
10921  # unix format.
10922  path="$BOOT_JDK"
10923  new_path=`$CYGPATH -u "$path"`
10924
10925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10928  # "foo.exe" is OK but "foo" is an error.
10929  #
10930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10931  # It is also a way to make sure we got the proper file name for the real test later on.
10932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10933  if test "x$test_shortpath" = x; then
10934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10936    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10937  fi
10938
10939  # Call helper function which possibly converts this using DOS-style short mode.
10940  # If so, the updated path is stored in $new_path.
10941
10942  input_path="$new_path"
10943  # Check if we need to convert this using DOS-style short mode. If the path
10944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10945  # take no chances and rewrite it.
10946  # Note: m4 eats our [], so we need to use [ and ] instead.
10947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10948  if test "x$has_forbidden_chars" != x; then
10949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10953      # Going to short mode and back again did indeed matter. Since short mode is
10954      # case insensitive, let's make it lowercase to improve readability.
10955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10956      # Now convert it back to Unix-stile (cygpath)
10957      input_path=`$CYGPATH -u "$shortmode_path"`
10958      new_path="$input_path"
10959    fi
10960  fi
10961
10962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10963  if test "x$test_cygdrive_prefix" = x; then
10964    # As a simple fix, exclude /usr/bin since it's not a real path.
10965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10967      # a path prefixed by /cygdrive for fixpath to work.
10968      new_path="$CYGWIN_ROOT_PATH$input_path"
10969    fi
10970  fi
10971
10972
10973  if test "x$path" != "x$new_path"; then
10974    BOOT_JDK="$new_path"
10975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10976$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10977  fi
10978
10979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10980
10981  path="$BOOT_JDK"
10982  has_colon=`$ECHO $path | $GREP ^.:`
10983  new_path="$path"
10984  if test "x$has_colon" = x; then
10985    # Not in mixed or Windows style, start by that.
10986    new_path=`cmd //c echo $path`
10987  fi
10988
10989
10990  input_path="$new_path"
10991  # Check if we need to convert this using DOS-style short mode. If the path
10992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10993  # take no chances and rewrite it.
10994  # Note: m4 eats our [], so we need to use [ and ] instead.
10995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10996  if test "x$has_forbidden_chars" != x; then
10997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10999  fi
11000
11001
11002  windows_path="$new_path"
11003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11004    unix_path=`$CYGPATH -u "$windows_path"`
11005    new_path="$unix_path"
11006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11008    new_path="$unix_path"
11009  fi
11010
11011  if test "x$path" != "x$new_path"; then
11012    BOOT_JDK="$new_path"
11013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11015  fi
11016
11017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11019
11020  else
11021    # We're on a posix platform. Hooray! :)
11022    path="$BOOT_JDK"
11023
11024    if test ! -f "$path" && test ! -d "$path"; then
11025      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11026    fi
11027
11028    has_space=`$ECHO "$path" | $GREP " "`
11029    if test "x$has_space" != x; then
11030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11032      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11033    fi
11034  fi
11035
11036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11037$as_echo_n "checking for Boot JDK... " >&6; }
11038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11039$as_echo "$BOOT_JDK" >&6; }
11040              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11041$as_echo_n "checking Boot JDK version... " >&6; }
11042              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11043              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11044$as_echo "$BOOT_JDK_VERSION" >&6; }
11045            fi # end check jdk version
11046          fi # end check rt.jar
11047        fi # end check javac
11048      fi # end check java
11049    fi # end check boot jdk found
11050  fi
11051
11052if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11053  # Having specified an argument which is incorrect will produce an instant failure;
11054  # we should not go on looking
11055  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11056fi
11057
11058# Test: Is bootjdk available from builddeps?
11059
11060  if test "x$BOOT_JDK_FOUND" = xno; then
11061    # Now execute the test
11062
11063
11064
11065    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11066        # Source the builddeps file again, to make sure it uses the latest variables!
11067        . $builddepsfile
11068        # Look for a target and build machine specific resource!
11069        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11070        if test "x$resource" = x; then
11071            # Ok, lets instead look for a target specific resource
11072            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11073        fi
11074        if test "x$resource" = x; then
11075            # Ok, lets instead look for a build specific resource
11076            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11077        fi
11078        if test "x$resource" = x; then
11079            # Ok, lets instead look for a generic resource
11080            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11081            resource=${builddep_bootjdk}
11082        fi
11083        if test "x$resource" != x; then
11084            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11085$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11086	    # If the resource in the builddeps.conf file is an existing directory,
11087	    # for example /java/linux/cups
11088	    if test -d ${resource}; then
11089	       depdir=${resource}
11090	    else
11091
11092# bootjdk is for example mymodule
11093# $resource is for example libs/general/libmymod_1_2_3.zip
11094# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11095# $with_builddeps_dir is for example /localhome/builddeps
11096# depdir is the name of the variable into which we store the depdir, eg MYMOD
11097# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11098# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11099    filename=`basename $resource`
11100    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11101    filebase=${filename%%.*}
11102    extension=${filename#*.}
11103    installdir=$with_builddeps_dir/$filebase
11104    if test ! -f $installdir/$filename.unpacked; then
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11106$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11107        if test ! -d $installdir; then
11108            mkdir -p $installdir
11109        fi
11110        if test ! -d $installdir; then
11111            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11112        fi
11113        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11114        touch $tmpfile
11115        if test ! -f $tmpfile; then
11116            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11117        fi
11118
11119    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11120    # $tmpfile is the local file name for the downloaded file.
11121    VALID_TOOL=no
11122    if test "x$BDEPS_FTP" = xwget; then
11123       VALID_TOOL=yes
11124       wget -O $tmpfile $with_builddeps_server/$resource
11125    fi
11126    if test "x$BDEPS_FTP" = xlftp; then
11127       VALID_TOOL=yes
11128       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11129    fi
11130    if test "x$BDEPS_FTP" = xftp; then
11131        VALID_TOOL=yes
11132        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11133        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11134        FTPUSERPWD=${FTPSERVER%%@*}
11135        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11136            FTPUSER=${userpwd%%:*}
11137            FTPPWD=${userpwd#*@}
11138            FTPSERVER=${FTPSERVER#*@}
11139        else
11140            FTPUSER=ftp
11141            FTPPWD=ftp
11142        fi
11143        # the "pass" command does not work on some
11144        # ftp clients (read ftp.exe) but if it works,
11145        # passive mode is better!
11146        (\
11147            echo "user $FTPUSER $FTPPWD"        ;\
11148            echo "pass"                         ;\
11149            echo "bin"                          ;\
11150            echo "get $FTPPATH $tmpfile"              ;\
11151        ) | ftp -in $FTPSERVER
11152    fi
11153    if test "x$VALID_TOOL" != xyes; then
11154       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11155    fi
11156
11157        mv $tmpfile $installdir/$filename
11158        if test ! -s $installdir/$filename; then
11159            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11160        fi
11161        case "$extension" in
11162            zip)  echo "Unzipping $installdir/$filename..."
11163               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11164            ;;
11165            tar.gz) echo "Untaring $installdir/$filename..."
11166               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11167            ;;
11168            tgz) echo "Untaring $installdir/$filename..."
11169               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11170            ;;
11171            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11172            ;;
11173        esac
11174    fi
11175    if test -f $installdir/$filename.unpacked; then
11176        depdir=$installdir
11177    fi
11178
11179	    fi
11180            # Source the builddeps file again, because in the previous command, the depdir
11181            # was updated to point at the current build dependency install directory.
11182            . $builddepsfile
11183            # Now extract variables from the builddeps.conf files.
11184            theroot=${builddep_bootjdk_ROOT}
11185            thecflags=${builddep_bootjdk_CFLAGS}
11186            thelibs=${builddep_bootjdk_LIBS}
11187            if test "x$depdir" = x; then
11188                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11189            fi
11190            BOOT_JDK=$depdir
11191            if test "x$theroot" != x; then
11192               BOOT_JDK="$theroot"
11193            fi
11194            if test "x$thecflags" != x; then
11195               BOOT_JDK_CFLAGS="$thecflags"
11196            fi
11197            if test "x$thelibs" != x; then
11198               BOOT_JDK_LIBS="$thelibs"
11199            fi
11200            BOOT_JDK_FOUND=maybe
11201            else BOOT_JDK_FOUND=no
11202
11203        fi
11204        else BOOT_JDK_FOUND=no
11205
11206    fi
11207
11208
11209
11210    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11211    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11212      # Do we have a bin/java?
11213      if test ! -x "$BOOT_JDK/bin/java"; then
11214        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11216        BOOT_JDK_FOUND=no
11217      else
11218        # Do we have a bin/javac?
11219        if test ! -x "$BOOT_JDK/bin/javac"; then
11220          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11223$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11224          BOOT_JDK_FOUND=no
11225        else
11226          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11227          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11228            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11230            BOOT_JDK_FOUND=no
11231          else
11232            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11233            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11234
11235            # Extra M4 quote needed to protect [] in grep expression.
11236            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11237            if test "x$FOUND_VERSION_78" = x; then
11238              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11240              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11241$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11242              BOOT_JDK_FOUND=no
11243            else
11244              # We're done! :-)
11245              BOOT_JDK_FOUND=yes
11246
11247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11248
11249  # Input might be given as Windows format, start by converting to
11250  # unix format.
11251  path="$BOOT_JDK"
11252  new_path=`$CYGPATH -u "$path"`
11253
11254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11257  # "foo.exe" is OK but "foo" is an error.
11258  #
11259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11260  # It is also a way to make sure we got the proper file name for the real test later on.
11261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11262  if test "x$test_shortpath" = x; then
11263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11265    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11266  fi
11267
11268  # Call helper function which possibly converts this using DOS-style short mode.
11269  # If so, the updated path is stored in $new_path.
11270
11271  input_path="$new_path"
11272  # Check if we need to convert this using DOS-style short mode. If the path
11273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11274  # take no chances and rewrite it.
11275  # Note: m4 eats our [], so we need to use [ and ] instead.
11276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11277  if test "x$has_forbidden_chars" != x; then
11278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11282      # Going to short mode and back again did indeed matter. Since short mode is
11283      # case insensitive, let's make it lowercase to improve readability.
11284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11285      # Now convert it back to Unix-stile (cygpath)
11286      input_path=`$CYGPATH -u "$shortmode_path"`
11287      new_path="$input_path"
11288    fi
11289  fi
11290
11291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11292  if test "x$test_cygdrive_prefix" = x; then
11293    # As a simple fix, exclude /usr/bin since it's not a real path.
11294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11296      # a path prefixed by /cygdrive for fixpath to work.
11297      new_path="$CYGWIN_ROOT_PATH$input_path"
11298    fi
11299  fi
11300
11301
11302  if test "x$path" != "x$new_path"; then
11303    BOOT_JDK="$new_path"
11304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11306  fi
11307
11308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11309
11310  path="$BOOT_JDK"
11311  has_colon=`$ECHO $path | $GREP ^.:`
11312  new_path="$path"
11313  if test "x$has_colon" = x; then
11314    # Not in mixed or Windows style, start by that.
11315    new_path=`cmd //c echo $path`
11316  fi
11317
11318
11319  input_path="$new_path"
11320  # Check if we need to convert this using DOS-style short mode. If the path
11321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11322  # take no chances and rewrite it.
11323  # Note: m4 eats our [], so we need to use [ and ] instead.
11324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11325  if test "x$has_forbidden_chars" != x; then
11326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11328  fi
11329
11330
11331  windows_path="$new_path"
11332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11333    unix_path=`$CYGPATH -u "$windows_path"`
11334    new_path="$unix_path"
11335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11337    new_path="$unix_path"
11338  fi
11339
11340  if test "x$path" != "x$new_path"; then
11341    BOOT_JDK="$new_path"
11342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11344  fi
11345
11346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11348
11349  else
11350    # We're on a posix platform. Hooray! :)
11351    path="$BOOT_JDK"
11352
11353    if test ! -f "$path" && test ! -d "$path"; then
11354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11355    fi
11356
11357    has_space=`$ECHO "$path" | $GREP " "`
11358    if test "x$has_space" != x; then
11359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11362    fi
11363  fi
11364
11365              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11366$as_echo_n "checking for Boot JDK... " >&6; }
11367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11368$as_echo "$BOOT_JDK" >&6; }
11369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11370$as_echo_n "checking Boot JDK version... " >&6; }
11371              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11373$as_echo "$BOOT_JDK_VERSION" >&6; }
11374            fi # end check jdk version
11375          fi # end check rt.jar
11376        fi # end check javac
11377      fi # end check java
11378    fi # end check boot jdk found
11379  fi
11380
11381
11382# Test: Is $JAVA_HOME set?
11383
11384  if test "x$BOOT_JDK_FOUND" = xno; then
11385    # Now execute the test
11386
11387    if test "x$JAVA_HOME" != x; then
11388        JAVA_HOME_PROCESSED="$JAVA_HOME"
11389
11390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11391
11392  # Input might be given as Windows format, start by converting to
11393  # unix format.
11394  path="$JAVA_HOME_PROCESSED"
11395  new_path=`$CYGPATH -u "$path"`
11396
11397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11400  # "foo.exe" is OK but "foo" is an error.
11401  #
11402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11403  # It is also a way to make sure we got the proper file name for the real test later on.
11404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11405  if test "x$test_shortpath" = x; then
11406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11407$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11408    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11409  fi
11410
11411  # Call helper function which possibly converts this using DOS-style short mode.
11412  # If so, the updated path is stored in $new_path.
11413
11414  input_path="$new_path"
11415  # Check if we need to convert this using DOS-style short mode. If the path
11416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11417  # take no chances and rewrite it.
11418  # Note: m4 eats our [], so we need to use [ and ] instead.
11419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11420  if test "x$has_forbidden_chars" != x; then
11421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11425      # Going to short mode and back again did indeed matter. Since short mode is
11426      # case insensitive, let's make it lowercase to improve readability.
11427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11428      # Now convert it back to Unix-stile (cygpath)
11429      input_path=`$CYGPATH -u "$shortmode_path"`
11430      new_path="$input_path"
11431    fi
11432  fi
11433
11434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11435  if test "x$test_cygdrive_prefix" = x; then
11436    # As a simple fix, exclude /usr/bin since it's not a real path.
11437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11439      # a path prefixed by /cygdrive for fixpath to work.
11440      new_path="$CYGWIN_ROOT_PATH$input_path"
11441    fi
11442  fi
11443
11444
11445  if test "x$path" != "x$new_path"; then
11446    JAVA_HOME_PROCESSED="$new_path"
11447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11448$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11449  fi
11450
11451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11452
11453  path="$JAVA_HOME_PROCESSED"
11454  has_colon=`$ECHO $path | $GREP ^.:`
11455  new_path="$path"
11456  if test "x$has_colon" = x; then
11457    # Not in mixed or Windows style, start by that.
11458    new_path=`cmd //c echo $path`
11459  fi
11460
11461
11462  input_path="$new_path"
11463  # Check if we need to convert this using DOS-style short mode. If the path
11464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11465  # take no chances and rewrite it.
11466  # Note: m4 eats our [], so we need to use [ and ] instead.
11467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11468  if test "x$has_forbidden_chars" != x; then
11469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11471  fi
11472
11473
11474  windows_path="$new_path"
11475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11476    unix_path=`$CYGPATH -u "$windows_path"`
11477    new_path="$unix_path"
11478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11480    new_path="$unix_path"
11481  fi
11482
11483  if test "x$path" != "x$new_path"; then
11484    JAVA_HOME_PROCESSED="$new_path"
11485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11486$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11487  fi
11488
11489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11491
11492  else
11493    # We're on a posix platform. Hooray! :)
11494    path="$JAVA_HOME_PROCESSED"
11495
11496    if test ! -f "$path" && test ! -d "$path"; then
11497      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11498    fi
11499
11500    has_space=`$ECHO "$path" | $GREP " "`
11501    if test "x$has_space" != x; then
11502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11503$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11504      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11505    fi
11506  fi
11507
11508        if test ! -d "$JAVA_HOME_PROCESSED"; then
11509            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11510$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11511        else
11512          # Aha, the user has set a JAVA_HOME
11513          # let us use that as the Boot JDK.
11514          BOOT_JDK="$JAVA_HOME_PROCESSED"
11515          BOOT_JDK_FOUND=maybe
11516          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11517$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11518        fi
11519    fi
11520
11521
11522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11524      # Do we have a bin/java?
11525      if test ! -x "$BOOT_JDK/bin/java"; then
11526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11528        BOOT_JDK_FOUND=no
11529      else
11530        # Do we have a bin/javac?
11531        if test ! -x "$BOOT_JDK/bin/javac"; then
11532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11536          BOOT_JDK_FOUND=no
11537        else
11538          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11539          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11542            BOOT_JDK_FOUND=no
11543          else
11544            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11546
11547            # Extra M4 quote needed to protect [] in grep expression.
11548            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11549            if test "x$FOUND_VERSION_78" = x; then
11550              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11552              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11553$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11554              BOOT_JDK_FOUND=no
11555            else
11556              # We're done! :-)
11557              BOOT_JDK_FOUND=yes
11558
11559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11560
11561  # Input might be given as Windows format, start by converting to
11562  # unix format.
11563  path="$BOOT_JDK"
11564  new_path=`$CYGPATH -u "$path"`
11565
11566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11569  # "foo.exe" is OK but "foo" is an error.
11570  #
11571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11572  # It is also a way to make sure we got the proper file name for the real test later on.
11573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11574  if test "x$test_shortpath" = x; then
11575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11578  fi
11579
11580  # Call helper function which possibly converts this using DOS-style short mode.
11581  # If so, the updated path is stored in $new_path.
11582
11583  input_path="$new_path"
11584  # Check if we need to convert this using DOS-style short mode. If the path
11585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11586  # take no chances and rewrite it.
11587  # Note: m4 eats our [], so we need to use [ and ] instead.
11588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11589  if test "x$has_forbidden_chars" != x; then
11590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11594      # Going to short mode and back again did indeed matter. Since short mode is
11595      # case insensitive, let's make it lowercase to improve readability.
11596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11597      # Now convert it back to Unix-stile (cygpath)
11598      input_path=`$CYGPATH -u "$shortmode_path"`
11599      new_path="$input_path"
11600    fi
11601  fi
11602
11603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11604  if test "x$test_cygdrive_prefix" = x; then
11605    # As a simple fix, exclude /usr/bin since it's not a real path.
11606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11608      # a path prefixed by /cygdrive for fixpath to work.
11609      new_path="$CYGWIN_ROOT_PATH$input_path"
11610    fi
11611  fi
11612
11613
11614  if test "x$path" != "x$new_path"; then
11615    BOOT_JDK="$new_path"
11616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11618  fi
11619
11620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11621
11622  path="$BOOT_JDK"
11623  has_colon=`$ECHO $path | $GREP ^.:`
11624  new_path="$path"
11625  if test "x$has_colon" = x; then
11626    # Not in mixed or Windows style, start by that.
11627    new_path=`cmd //c echo $path`
11628  fi
11629
11630
11631  input_path="$new_path"
11632  # Check if we need to convert this using DOS-style short mode. If the path
11633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11634  # take no chances and rewrite it.
11635  # Note: m4 eats our [], so we need to use [ and ] instead.
11636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11637  if test "x$has_forbidden_chars" != x; then
11638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11640  fi
11641
11642
11643  windows_path="$new_path"
11644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11645    unix_path=`$CYGPATH -u "$windows_path"`
11646    new_path="$unix_path"
11647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11649    new_path="$unix_path"
11650  fi
11651
11652  if test "x$path" != "x$new_path"; then
11653    BOOT_JDK="$new_path"
11654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11656  fi
11657
11658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11660
11661  else
11662    # We're on a posix platform. Hooray! :)
11663    path="$BOOT_JDK"
11664
11665    if test ! -f "$path" && test ! -d "$path"; then
11666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11667    fi
11668
11669    has_space=`$ECHO "$path" | $GREP " "`
11670    if test "x$has_space" != x; then
11671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11673      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11674    fi
11675  fi
11676
11677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11678$as_echo_n "checking for Boot JDK... " >&6; }
11679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11680$as_echo "$BOOT_JDK" >&6; }
11681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11682$as_echo_n "checking Boot JDK version... " >&6; }
11683              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11685$as_echo "$BOOT_JDK_VERSION" >&6; }
11686            fi # end check jdk version
11687          fi # end check rt.jar
11688        fi # end check javac
11689      fi # end check java
11690    fi # end check boot jdk found
11691  fi
11692
11693
11694# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11695
11696  if test "x$BOOT_JDK_FOUND" = xno; then
11697    # Now execute the test
11698
11699    if test -x /usr/libexec/java_home; then
11700        BOOT_JDK=`/usr/libexec/java_home`
11701        BOOT_JDK_FOUND=maybe
11702        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11703$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11704    fi
11705
11706
11707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11709      # Do we have a bin/java?
11710      if test ! -x "$BOOT_JDK/bin/java"; then
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11713        BOOT_JDK_FOUND=no
11714      else
11715        # Do we have a bin/javac?
11716        if test ! -x "$BOOT_JDK/bin/javac"; then
11717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11721          BOOT_JDK_FOUND=no
11722        else
11723          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11724          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11727            BOOT_JDK_FOUND=no
11728          else
11729            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11731
11732            # Extra M4 quote needed to protect [] in grep expression.
11733            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11734            if test "x$FOUND_VERSION_78" = x; then
11735              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11737              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11738$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11739              BOOT_JDK_FOUND=no
11740            else
11741              # We're done! :-)
11742              BOOT_JDK_FOUND=yes
11743
11744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11745
11746  # Input might be given as Windows format, start by converting to
11747  # unix format.
11748  path="$BOOT_JDK"
11749  new_path=`$CYGPATH -u "$path"`
11750
11751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11754  # "foo.exe" is OK but "foo" is an error.
11755  #
11756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11757  # It is also a way to make sure we got the proper file name for the real test later on.
11758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11759  if test "x$test_shortpath" = x; then
11760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11762    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11763  fi
11764
11765  # Call helper function which possibly converts this using DOS-style short mode.
11766  # If so, the updated path is stored in $new_path.
11767
11768  input_path="$new_path"
11769  # Check if we need to convert this using DOS-style short mode. If the path
11770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11771  # take no chances and rewrite it.
11772  # Note: m4 eats our [], so we need to use [ and ] instead.
11773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11774  if test "x$has_forbidden_chars" != x; then
11775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11779      # Going to short mode and back again did indeed matter. Since short mode is
11780      # case insensitive, let's make it lowercase to improve readability.
11781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11782      # Now convert it back to Unix-stile (cygpath)
11783      input_path=`$CYGPATH -u "$shortmode_path"`
11784      new_path="$input_path"
11785    fi
11786  fi
11787
11788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11789  if test "x$test_cygdrive_prefix" = x; then
11790    # As a simple fix, exclude /usr/bin since it's not a real path.
11791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11793      # a path prefixed by /cygdrive for fixpath to work.
11794      new_path="$CYGWIN_ROOT_PATH$input_path"
11795    fi
11796  fi
11797
11798
11799  if test "x$path" != "x$new_path"; then
11800    BOOT_JDK="$new_path"
11801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11803  fi
11804
11805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11806
11807  path="$BOOT_JDK"
11808  has_colon=`$ECHO $path | $GREP ^.:`
11809  new_path="$path"
11810  if test "x$has_colon" = x; then
11811    # Not in mixed or Windows style, start by that.
11812    new_path=`cmd //c echo $path`
11813  fi
11814
11815
11816  input_path="$new_path"
11817  # Check if we need to convert this using DOS-style short mode. If the path
11818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11819  # take no chances and rewrite it.
11820  # Note: m4 eats our [], so we need to use [ and ] instead.
11821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11822  if test "x$has_forbidden_chars" != x; then
11823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11825  fi
11826
11827
11828  windows_path="$new_path"
11829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11830    unix_path=`$CYGPATH -u "$windows_path"`
11831    new_path="$unix_path"
11832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11834    new_path="$unix_path"
11835  fi
11836
11837  if test "x$path" != "x$new_path"; then
11838    BOOT_JDK="$new_path"
11839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11841  fi
11842
11843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11845
11846  else
11847    # We're on a posix platform. Hooray! :)
11848    path="$BOOT_JDK"
11849
11850    if test ! -f "$path" && test ! -d "$path"; then
11851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11852    fi
11853
11854    has_space=`$ECHO "$path" | $GREP " "`
11855    if test "x$has_space" != x; then
11856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11859    fi
11860  fi
11861
11862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11863$as_echo_n "checking for Boot JDK... " >&6; }
11864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11865$as_echo "$BOOT_JDK" >&6; }
11866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11867$as_echo_n "checking Boot JDK version... " >&6; }
11868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11870$as_echo "$BOOT_JDK_VERSION" >&6; }
11871            fi # end check jdk version
11872          fi # end check rt.jar
11873        fi # end check javac
11874      fi # end check java
11875    fi # end check boot jdk found
11876  fi
11877
11878
11879# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11880
11881  if test "x$BOOT_JDK_FOUND" = xno; then
11882    # Now execute the test
11883
11884    # Extract the first word of "javac", so it can be a program name with args.
11885set dummy javac; ac_word=$2
11886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11887$as_echo_n "checking for $ac_word... " >&6; }
11888if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11889  $as_echo_n "(cached) " >&6
11890else
11891  case $JAVAC_CHECK in
11892  [\\/]* | ?:[\\/]*)
11893  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11894  ;;
11895  *)
11896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11897for as_dir in $PATH
11898do
11899  IFS=$as_save_IFS
11900  test -z "$as_dir" && as_dir=.
11901    for ac_exec_ext in '' $ac_executable_extensions; do
11902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11903    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11905    break 2
11906  fi
11907done
11908  done
11909IFS=$as_save_IFS
11910
11911  ;;
11912esac
11913fi
11914JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11915if test -n "$JAVAC_CHECK"; then
11916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11917$as_echo "$JAVAC_CHECK" >&6; }
11918else
11919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
11921fi
11922
11923
11924    # Extract the first word of "java", so it can be a program name with args.
11925set dummy java; ac_word=$2
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11927$as_echo_n "checking for $ac_word... " >&6; }
11928if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  case $JAVA_CHECK in
11932  [\\/]* | ?:[\\/]*)
11933  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11934  ;;
11935  *)
11936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11937for as_dir in $PATH
11938do
11939  IFS=$as_save_IFS
11940  test -z "$as_dir" && as_dir=.
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11943    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11945    break 2
11946  fi
11947done
11948  done
11949IFS=$as_save_IFS
11950
11951  ;;
11952esac
11953fi
11954JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11955if test -n "$JAVA_CHECK"; then
11956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11957$as_echo "$JAVA_CHECK" >&6; }
11958else
11959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11960$as_echo "no" >&6; }
11961fi
11962
11963
11964    BINARY="$JAVAC_CHECK"
11965    if test "x$JAVAC_CHECK" = x; then
11966        BINARY="$JAVA_CHECK"
11967    fi
11968    if test "x$BINARY" != x; then
11969        # So there is a java(c) binary, it might be part of a JDK.
11970        # Lets find the JDK/JRE directory by following symbolic links.
11971        # Linux/GNU systems often have links from /usr/bin/java to
11972        # /etc/alternatives/java to the real JDK binary.
11973
11974    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11975        # Follow a chain of symbolic links. Use readlink
11976        # where it exists, else fall back to horribly
11977        # complicated shell code.
11978        if test "x$READLINK_TESTED" != yes; then
11979            # On MacOSX there is a readlink tool with a different
11980            # purpose than the GNU readlink tool. Check the found readlink.
11981            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11982            if test "x$ISGNU" = x; then
11983                 # A readlink that we do not know how to use.
11984                 # Are there other non-GNU readlinks out there?
11985                 READLINK_TESTED=yes
11986                 READLINK=
11987            fi
11988        fi
11989
11990        if test "x$READLINK" != x; then
11991            BINARY=`$READLINK -f $BINARY`
11992        else
11993            # Save the current directory for restoring afterwards
11994            STARTDIR=$PWD
11995            COUNTER=0
11996            sym_link_dir=`$DIRNAME $BINARY`
11997            sym_link_file=`$BASENAME $BINARY`
11998            # Use the system pwd and not the shell builtin to resolve directory symlinks
11999            cd $sym_link_dir
12000            cd `$THEPWDCMD`
12001            sym_link_dir=`$THEPWDCMD`
12002            # Resolve file symlinks
12003            while test $COUNTER -lt 20; do
12004                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12005                if test "x$ISLINK" == x; then
12006                    # This is not a symbolic link! We are done!
12007                    break
12008                fi
12009                # Again resolve directory symlinks since the target of the just found
12010                # link could be in a different directory
12011                cd `$DIRNAME $ISLINK`
12012                sym_link_dir=`$THEPWDCMD`
12013                sym_link_file=`$BASENAME $ISLINK`
12014                let COUNTER=COUNTER+1
12015            done
12016            cd $STARTDIR
12017            BINARY=$sym_link_dir/$sym_link_file
12018        fi
12019    fi
12020
12021        BOOT_JDK=`dirname "$BINARY"`
12022        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12023        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12024            # Looks like we found ourselves an JDK
12025            BOOT_JDK_FOUND=maybe
12026            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12027$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12028        fi
12029    fi
12030
12031
12032    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12033    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12034      # Do we have a bin/java?
12035      if test ! -x "$BOOT_JDK/bin/java"; then
12036        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12038        BOOT_JDK_FOUND=no
12039      else
12040        # Do we have a bin/javac?
12041        if test ! -x "$BOOT_JDK/bin/javac"; then
12042          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12044          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12045$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12046          BOOT_JDK_FOUND=no
12047        else
12048          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12049          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12050            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12052            BOOT_JDK_FOUND=no
12053          else
12054            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12055            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12056
12057            # Extra M4 quote needed to protect [] in grep expression.
12058            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12059            if test "x$FOUND_VERSION_78" = x; then
12060              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12062              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12063$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12064              BOOT_JDK_FOUND=no
12065            else
12066              # We're done! :-)
12067              BOOT_JDK_FOUND=yes
12068
12069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12070
12071  # Input might be given as Windows format, start by converting to
12072  # unix format.
12073  path="$BOOT_JDK"
12074  new_path=`$CYGPATH -u "$path"`
12075
12076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12079  # "foo.exe" is OK but "foo" is an error.
12080  #
12081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12082  # It is also a way to make sure we got the proper file name for the real test later on.
12083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12084  if test "x$test_shortpath" = x; then
12085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12088  fi
12089
12090  # Call helper function which possibly converts this using DOS-style short mode.
12091  # If so, the updated path is stored in $new_path.
12092
12093  input_path="$new_path"
12094  # Check if we need to convert this using DOS-style short mode. If the path
12095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12096  # take no chances and rewrite it.
12097  # Note: m4 eats our [], so we need to use [ and ] instead.
12098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12099  if test "x$has_forbidden_chars" != x; then
12100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12104      # Going to short mode and back again did indeed matter. Since short mode is
12105      # case insensitive, let's make it lowercase to improve readability.
12106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12107      # Now convert it back to Unix-stile (cygpath)
12108      input_path=`$CYGPATH -u "$shortmode_path"`
12109      new_path="$input_path"
12110    fi
12111  fi
12112
12113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12114  if test "x$test_cygdrive_prefix" = x; then
12115    # As a simple fix, exclude /usr/bin since it's not a real path.
12116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12118      # a path prefixed by /cygdrive for fixpath to work.
12119      new_path="$CYGWIN_ROOT_PATH$input_path"
12120    fi
12121  fi
12122
12123
12124  if test "x$path" != "x$new_path"; then
12125    BOOT_JDK="$new_path"
12126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12128  fi
12129
12130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12131
12132  path="$BOOT_JDK"
12133  has_colon=`$ECHO $path | $GREP ^.:`
12134  new_path="$path"
12135  if test "x$has_colon" = x; then
12136    # Not in mixed or Windows style, start by that.
12137    new_path=`cmd //c echo $path`
12138  fi
12139
12140
12141  input_path="$new_path"
12142  # Check if we need to convert this using DOS-style short mode. If the path
12143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12144  # take no chances and rewrite it.
12145  # Note: m4 eats our [], so we need to use [ and ] instead.
12146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12147  if test "x$has_forbidden_chars" != x; then
12148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12150  fi
12151
12152
12153  windows_path="$new_path"
12154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12155    unix_path=`$CYGPATH -u "$windows_path"`
12156    new_path="$unix_path"
12157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12159    new_path="$unix_path"
12160  fi
12161
12162  if test "x$path" != "x$new_path"; then
12163    BOOT_JDK="$new_path"
12164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12166  fi
12167
12168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12170
12171  else
12172    # We're on a posix platform. Hooray! :)
12173    path="$BOOT_JDK"
12174
12175    if test ! -f "$path" && test ! -d "$path"; then
12176      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12177    fi
12178
12179    has_space=`$ECHO "$path" | $GREP " "`
12180    if test "x$has_space" != x; then
12181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12182$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12183      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12184    fi
12185  fi
12186
12187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12188$as_echo_n "checking for Boot JDK... " >&6; }
12189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12190$as_echo "$BOOT_JDK" >&6; }
12191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12192$as_echo_n "checking Boot JDK version... " >&6; }
12193              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12195$as_echo "$BOOT_JDK_VERSION" >&6; }
12196            fi # end check jdk version
12197          fi # end check rt.jar
12198        fi # end check javac
12199      fi # end check java
12200    fi # end check boot jdk found
12201  fi
12202
12203
12204# Test: Is there a JDK installed in default, well-known locations?
12205
12206  if test "x$BOOT_JDK_FOUND" = xno; then
12207    # Now execute the test
12208
12209  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12210
12211  if test "x$BOOT_JDK_FOUND" = xno; then
12212    # Now execute the test
12213
12214  if test "x$ProgramW6432" != x; then
12215    VIRTUAL_DIR="$ProgramW6432/Java"
12216
12217  windows_path="$VIRTUAL_DIR"
12218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12219    unix_path=`$CYGPATH -u "$windows_path"`
12220    VIRTUAL_DIR="$unix_path"
12221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12223    VIRTUAL_DIR="$unix_path"
12224  fi
12225
12226
12227  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12228  BOOT_JDK_SUFFIX=""
12229  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12230  if test "x$ALL_JDKS_FOUND" != x; then
12231    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12232
12233  if test "x$BOOT_JDK_FOUND" = xno; then
12234    # Now execute the test
12235
12236        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12237        if test -d "$BOOT_JDK"; then
12238          BOOT_JDK_FOUND=maybe
12239          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12240$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12241        fi
12242
12243
12244    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12245    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12246      # Do we have a bin/java?
12247      if test ! -x "$BOOT_JDK/bin/java"; then
12248        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12250        BOOT_JDK_FOUND=no
12251      else
12252        # Do we have a bin/javac?
12253        if test ! -x "$BOOT_JDK/bin/javac"; then
12254          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12256          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12257$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12258          BOOT_JDK_FOUND=no
12259        else
12260          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12261          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12262            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12264            BOOT_JDK_FOUND=no
12265          else
12266            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12267            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12268
12269            # Extra M4 quote needed to protect [] in grep expression.
12270            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12271            if test "x$FOUND_VERSION_78" = x; then
12272              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12274              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12275$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12276              BOOT_JDK_FOUND=no
12277            else
12278              # We're done! :-)
12279              BOOT_JDK_FOUND=yes
12280
12281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12282
12283  # Input might be given as Windows format, start by converting to
12284  # unix format.
12285  path="$BOOT_JDK"
12286  new_path=`$CYGPATH -u "$path"`
12287
12288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12291  # "foo.exe" is OK but "foo" is an error.
12292  #
12293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12294  # It is also a way to make sure we got the proper file name for the real test later on.
12295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12296  if test "x$test_shortpath" = x; then
12297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12299    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12300  fi
12301
12302  # Call helper function which possibly converts this using DOS-style short mode.
12303  # If so, the updated path is stored in $new_path.
12304
12305  input_path="$new_path"
12306  # Check if we need to convert this using DOS-style short mode. If the path
12307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12308  # take no chances and rewrite it.
12309  # Note: m4 eats our [], so we need to use [ and ] instead.
12310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12311  if test "x$has_forbidden_chars" != x; then
12312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12316      # Going to short mode and back again did indeed matter. Since short mode is
12317      # case insensitive, let's make it lowercase to improve readability.
12318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12319      # Now convert it back to Unix-stile (cygpath)
12320      input_path=`$CYGPATH -u "$shortmode_path"`
12321      new_path="$input_path"
12322    fi
12323  fi
12324
12325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12326  if test "x$test_cygdrive_prefix" = x; then
12327    # As a simple fix, exclude /usr/bin since it's not a real path.
12328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12330      # a path prefixed by /cygdrive for fixpath to work.
12331      new_path="$CYGWIN_ROOT_PATH$input_path"
12332    fi
12333  fi
12334
12335
12336  if test "x$path" != "x$new_path"; then
12337    BOOT_JDK="$new_path"
12338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12340  fi
12341
12342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12343
12344  path="$BOOT_JDK"
12345  has_colon=`$ECHO $path | $GREP ^.:`
12346  new_path="$path"
12347  if test "x$has_colon" = x; then
12348    # Not in mixed or Windows style, start by that.
12349    new_path=`cmd //c echo $path`
12350  fi
12351
12352
12353  input_path="$new_path"
12354  # Check if we need to convert this using DOS-style short mode. If the path
12355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12356  # take no chances and rewrite it.
12357  # Note: m4 eats our [], so we need to use [ and ] instead.
12358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12359  if test "x$has_forbidden_chars" != x; then
12360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12362  fi
12363
12364
12365  windows_path="$new_path"
12366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12367    unix_path=`$CYGPATH -u "$windows_path"`
12368    new_path="$unix_path"
12369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12371    new_path="$unix_path"
12372  fi
12373
12374  if test "x$path" != "x$new_path"; then
12375    BOOT_JDK="$new_path"
12376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12378  fi
12379
12380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12382
12383  else
12384    # We're on a posix platform. Hooray! :)
12385    path="$BOOT_JDK"
12386
12387    if test ! -f "$path" && test ! -d "$path"; then
12388      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12389    fi
12390
12391    has_space=`$ECHO "$path" | $GREP " "`
12392    if test "x$has_space" != x; then
12393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12395      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12396    fi
12397  fi
12398
12399              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12400$as_echo_n "checking for Boot JDK... " >&6; }
12401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12402$as_echo "$BOOT_JDK" >&6; }
12403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12404$as_echo_n "checking Boot JDK version... " >&6; }
12405              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12407$as_echo "$BOOT_JDK_VERSION" >&6; }
12408            fi # end check jdk version
12409          fi # end check rt.jar
12410        fi # end check javac
12411      fi # end check java
12412    fi # end check boot jdk found
12413  fi
12414
12415    done
12416  fi
12417
12418  fi
12419
12420
12421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12423      # Do we have a bin/java?
12424      if test ! -x "$BOOT_JDK/bin/java"; then
12425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12427        BOOT_JDK_FOUND=no
12428      else
12429        # Do we have a bin/javac?
12430        if test ! -x "$BOOT_JDK/bin/javac"; then
12431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12435          BOOT_JDK_FOUND=no
12436        else
12437          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12438          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12441            BOOT_JDK_FOUND=no
12442          else
12443            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12445
12446            # Extra M4 quote needed to protect [] in grep expression.
12447            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12448            if test "x$FOUND_VERSION_78" = x; then
12449              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12451              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12452$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12453              BOOT_JDK_FOUND=no
12454            else
12455              # We're done! :-)
12456              BOOT_JDK_FOUND=yes
12457
12458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12459
12460  # Input might be given as Windows format, start by converting to
12461  # unix format.
12462  path="$BOOT_JDK"
12463  new_path=`$CYGPATH -u "$path"`
12464
12465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12468  # "foo.exe" is OK but "foo" is an error.
12469  #
12470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12471  # It is also a way to make sure we got the proper file name for the real test later on.
12472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12473  if test "x$test_shortpath" = x; then
12474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12477  fi
12478
12479  # Call helper function which possibly converts this using DOS-style short mode.
12480  # If so, the updated path is stored in $new_path.
12481
12482  input_path="$new_path"
12483  # Check if we need to convert this using DOS-style short mode. If the path
12484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12485  # take no chances and rewrite it.
12486  # Note: m4 eats our [], so we need to use [ and ] instead.
12487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12488  if test "x$has_forbidden_chars" != x; then
12489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12493      # Going to short mode and back again did indeed matter. Since short mode is
12494      # case insensitive, let's make it lowercase to improve readability.
12495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12496      # Now convert it back to Unix-stile (cygpath)
12497      input_path=`$CYGPATH -u "$shortmode_path"`
12498      new_path="$input_path"
12499    fi
12500  fi
12501
12502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12503  if test "x$test_cygdrive_prefix" = x; then
12504    # As a simple fix, exclude /usr/bin since it's not a real path.
12505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12507      # a path prefixed by /cygdrive for fixpath to work.
12508      new_path="$CYGWIN_ROOT_PATH$input_path"
12509    fi
12510  fi
12511
12512
12513  if test "x$path" != "x$new_path"; then
12514    BOOT_JDK="$new_path"
12515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12517  fi
12518
12519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12520
12521  path="$BOOT_JDK"
12522  has_colon=`$ECHO $path | $GREP ^.:`
12523  new_path="$path"
12524  if test "x$has_colon" = x; then
12525    # Not in mixed or Windows style, start by that.
12526    new_path=`cmd //c echo $path`
12527  fi
12528
12529
12530  input_path="$new_path"
12531  # Check if we need to convert this using DOS-style short mode. If the path
12532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12533  # take no chances and rewrite it.
12534  # Note: m4 eats our [], so we need to use [ and ] instead.
12535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12536  if test "x$has_forbidden_chars" != x; then
12537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12539  fi
12540
12541
12542  windows_path="$new_path"
12543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12544    unix_path=`$CYGPATH -u "$windows_path"`
12545    new_path="$unix_path"
12546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12548    new_path="$unix_path"
12549  fi
12550
12551  if test "x$path" != "x$new_path"; then
12552    BOOT_JDK="$new_path"
12553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12555  fi
12556
12557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12559
12560  else
12561    # We're on a posix platform. Hooray! :)
12562    path="$BOOT_JDK"
12563
12564    if test ! -f "$path" && test ! -d "$path"; then
12565      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12566    fi
12567
12568    has_space=`$ECHO "$path" | $GREP " "`
12569    if test "x$has_space" != x; then
12570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12573    fi
12574  fi
12575
12576              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12577$as_echo_n "checking for Boot JDK... " >&6; }
12578              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12579$as_echo "$BOOT_JDK" >&6; }
12580              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12581$as_echo_n "checking Boot JDK version... " >&6; }
12582              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12583              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12584$as_echo "$BOOT_JDK_VERSION" >&6; }
12585            fi # end check jdk version
12586          fi # end check rt.jar
12587        fi # end check javac
12588      fi # end check java
12589    fi # end check boot jdk found
12590  fi
12591
12592
12593  if test "x$BOOT_JDK_FOUND" = xno; then
12594    # Now execute the test
12595
12596  if test "x$PROGRAMW6432" != x; then
12597    VIRTUAL_DIR="$PROGRAMW6432/Java"
12598
12599  windows_path="$VIRTUAL_DIR"
12600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12601    unix_path=`$CYGPATH -u "$windows_path"`
12602    VIRTUAL_DIR="$unix_path"
12603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12605    VIRTUAL_DIR="$unix_path"
12606  fi
12607
12608
12609  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12610  BOOT_JDK_SUFFIX=""
12611  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12612  if test "x$ALL_JDKS_FOUND" != x; then
12613    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12614
12615  if test "x$BOOT_JDK_FOUND" = xno; then
12616    # Now execute the test
12617
12618        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12619        if test -d "$BOOT_JDK"; then
12620          BOOT_JDK_FOUND=maybe
12621          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12622$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12623        fi
12624
12625
12626    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12627    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12628      # Do we have a bin/java?
12629      if test ! -x "$BOOT_JDK/bin/java"; then
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12632        BOOT_JDK_FOUND=no
12633      else
12634        # Do we have a bin/javac?
12635        if test ! -x "$BOOT_JDK/bin/javac"; then
12636          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12638          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12639$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12640          BOOT_JDK_FOUND=no
12641        else
12642          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12643          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12646            BOOT_JDK_FOUND=no
12647          else
12648            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12649            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12650
12651            # Extra M4 quote needed to protect [] in grep expression.
12652            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12653            if test "x$FOUND_VERSION_78" = x; then
12654              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12656              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12657$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12658              BOOT_JDK_FOUND=no
12659            else
12660              # We're done! :-)
12661              BOOT_JDK_FOUND=yes
12662
12663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12664
12665  # Input might be given as Windows format, start by converting to
12666  # unix format.
12667  path="$BOOT_JDK"
12668  new_path=`$CYGPATH -u "$path"`
12669
12670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12673  # "foo.exe" is OK but "foo" is an error.
12674  #
12675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12676  # It is also a way to make sure we got the proper file name for the real test later on.
12677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12678  if test "x$test_shortpath" = x; then
12679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12681    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12682  fi
12683
12684  # Call helper function which possibly converts this using DOS-style short mode.
12685  # If so, the updated path is stored in $new_path.
12686
12687  input_path="$new_path"
12688  # Check if we need to convert this using DOS-style short mode. If the path
12689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12690  # take no chances and rewrite it.
12691  # Note: m4 eats our [], so we need to use [ and ] instead.
12692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12693  if test "x$has_forbidden_chars" != x; then
12694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12698      # Going to short mode and back again did indeed matter. Since short mode is
12699      # case insensitive, let's make it lowercase to improve readability.
12700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12701      # Now convert it back to Unix-stile (cygpath)
12702      input_path=`$CYGPATH -u "$shortmode_path"`
12703      new_path="$input_path"
12704    fi
12705  fi
12706
12707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12708  if test "x$test_cygdrive_prefix" = x; then
12709    # As a simple fix, exclude /usr/bin since it's not a real path.
12710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12712      # a path prefixed by /cygdrive for fixpath to work.
12713      new_path="$CYGWIN_ROOT_PATH$input_path"
12714    fi
12715  fi
12716
12717
12718  if test "x$path" != "x$new_path"; then
12719    BOOT_JDK="$new_path"
12720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12722  fi
12723
12724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12725
12726  path="$BOOT_JDK"
12727  has_colon=`$ECHO $path | $GREP ^.:`
12728  new_path="$path"
12729  if test "x$has_colon" = x; then
12730    # Not in mixed or Windows style, start by that.
12731    new_path=`cmd //c echo $path`
12732  fi
12733
12734
12735  input_path="$new_path"
12736  # Check if we need to convert this using DOS-style short mode. If the path
12737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12738  # take no chances and rewrite it.
12739  # Note: m4 eats our [], so we need to use [ and ] instead.
12740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12741  if test "x$has_forbidden_chars" != x; then
12742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12744  fi
12745
12746
12747  windows_path="$new_path"
12748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12749    unix_path=`$CYGPATH -u "$windows_path"`
12750    new_path="$unix_path"
12751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12753    new_path="$unix_path"
12754  fi
12755
12756  if test "x$path" != "x$new_path"; then
12757    BOOT_JDK="$new_path"
12758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12760  fi
12761
12762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12764
12765  else
12766    # We're on a posix platform. Hooray! :)
12767    path="$BOOT_JDK"
12768
12769    if test ! -f "$path" && test ! -d "$path"; then
12770      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12771    fi
12772
12773    has_space=`$ECHO "$path" | $GREP " "`
12774    if test "x$has_space" != x; then
12775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12777      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12778    fi
12779  fi
12780
12781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12782$as_echo_n "checking for Boot JDK... " >&6; }
12783              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12784$as_echo "$BOOT_JDK" >&6; }
12785              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12786$as_echo_n "checking Boot JDK version... " >&6; }
12787              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12788              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12789$as_echo "$BOOT_JDK_VERSION" >&6; }
12790            fi # end check jdk version
12791          fi # end check rt.jar
12792        fi # end check javac
12793      fi # end check java
12794    fi # end check boot jdk found
12795  fi
12796
12797    done
12798  fi
12799
12800  fi
12801
12802
12803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12805      # Do we have a bin/java?
12806      if test ! -x "$BOOT_JDK/bin/java"; then
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12809        BOOT_JDK_FOUND=no
12810      else
12811        # Do we have a bin/javac?
12812        if test ! -x "$BOOT_JDK/bin/javac"; then
12813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12817          BOOT_JDK_FOUND=no
12818        else
12819          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12820          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12823            BOOT_JDK_FOUND=no
12824          else
12825            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12826            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12827
12828            # Extra M4 quote needed to protect [] in grep expression.
12829            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12830            if test "x$FOUND_VERSION_78" = x; then
12831              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12833              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12834$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12835              BOOT_JDK_FOUND=no
12836            else
12837              # We're done! :-)
12838              BOOT_JDK_FOUND=yes
12839
12840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12841
12842  # Input might be given as Windows format, start by converting to
12843  # unix format.
12844  path="$BOOT_JDK"
12845  new_path=`$CYGPATH -u "$path"`
12846
12847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12850  # "foo.exe" is OK but "foo" is an error.
12851  #
12852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12853  # It is also a way to make sure we got the proper file name for the real test later on.
12854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12855  if test "x$test_shortpath" = x; then
12856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12859  fi
12860
12861  # Call helper function which possibly converts this using DOS-style short mode.
12862  # If so, the updated path is stored in $new_path.
12863
12864  input_path="$new_path"
12865  # Check if we need to convert this using DOS-style short mode. If the path
12866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12867  # take no chances and rewrite it.
12868  # Note: m4 eats our [], so we need to use [ and ] instead.
12869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12870  if test "x$has_forbidden_chars" != x; then
12871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12875      # Going to short mode and back again did indeed matter. Since short mode is
12876      # case insensitive, let's make it lowercase to improve readability.
12877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12878      # Now convert it back to Unix-stile (cygpath)
12879      input_path=`$CYGPATH -u "$shortmode_path"`
12880      new_path="$input_path"
12881    fi
12882  fi
12883
12884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12885  if test "x$test_cygdrive_prefix" = x; then
12886    # As a simple fix, exclude /usr/bin since it's not a real path.
12887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12889      # a path prefixed by /cygdrive for fixpath to work.
12890      new_path="$CYGWIN_ROOT_PATH$input_path"
12891    fi
12892  fi
12893
12894
12895  if test "x$path" != "x$new_path"; then
12896    BOOT_JDK="$new_path"
12897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12899  fi
12900
12901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12902
12903  path="$BOOT_JDK"
12904  has_colon=`$ECHO $path | $GREP ^.:`
12905  new_path="$path"
12906  if test "x$has_colon" = x; then
12907    # Not in mixed or Windows style, start by that.
12908    new_path=`cmd //c echo $path`
12909  fi
12910
12911
12912  input_path="$new_path"
12913  # Check if we need to convert this using DOS-style short mode. If the path
12914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12915  # take no chances and rewrite it.
12916  # Note: m4 eats our [], so we need to use [ and ] instead.
12917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12918  if test "x$has_forbidden_chars" != x; then
12919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12921  fi
12922
12923
12924  windows_path="$new_path"
12925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12926    unix_path=`$CYGPATH -u "$windows_path"`
12927    new_path="$unix_path"
12928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12930    new_path="$unix_path"
12931  fi
12932
12933  if test "x$path" != "x$new_path"; then
12934    BOOT_JDK="$new_path"
12935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12937  fi
12938
12939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12941
12942  else
12943    # We're on a posix platform. Hooray! :)
12944    path="$BOOT_JDK"
12945
12946    if test ! -f "$path" && test ! -d "$path"; then
12947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12948    fi
12949
12950    has_space=`$ECHO "$path" | $GREP " "`
12951    if test "x$has_space" != x; then
12952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12954      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12955    fi
12956  fi
12957
12958              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12959$as_echo_n "checking for Boot JDK... " >&6; }
12960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12961$as_echo "$BOOT_JDK" >&6; }
12962              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12963$as_echo_n "checking Boot JDK version... " >&6; }
12964              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12966$as_echo "$BOOT_JDK_VERSION" >&6; }
12967            fi # end check jdk version
12968          fi # end check rt.jar
12969        fi # end check javac
12970      fi # end check java
12971    fi # end check boot jdk found
12972  fi
12973
12974
12975  if test "x$BOOT_JDK_FOUND" = xno; then
12976    # Now execute the test
12977
12978  if test "x$PROGRAMFILES" != x; then
12979    VIRTUAL_DIR="$PROGRAMFILES/Java"
12980
12981  windows_path="$VIRTUAL_DIR"
12982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12983    unix_path=`$CYGPATH -u "$windows_path"`
12984    VIRTUAL_DIR="$unix_path"
12985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12987    VIRTUAL_DIR="$unix_path"
12988  fi
12989
12990
12991  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12992  BOOT_JDK_SUFFIX=""
12993  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12994  if test "x$ALL_JDKS_FOUND" != x; then
12995    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12996
12997  if test "x$BOOT_JDK_FOUND" = xno; then
12998    # Now execute the test
12999
13000        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13001        if test -d "$BOOT_JDK"; then
13002          BOOT_JDK_FOUND=maybe
13003          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13004$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13005        fi
13006
13007
13008    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13009    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13010      # Do we have a bin/java?
13011      if test ! -x "$BOOT_JDK/bin/java"; then
13012        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13014        BOOT_JDK_FOUND=no
13015      else
13016        # Do we have a bin/javac?
13017        if test ! -x "$BOOT_JDK/bin/javac"; then
13018          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13020          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13021$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13022          BOOT_JDK_FOUND=no
13023        else
13024          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13025          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13026            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13028            BOOT_JDK_FOUND=no
13029          else
13030            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13031            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13032
13033            # Extra M4 quote needed to protect [] in grep expression.
13034            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13035            if test "x$FOUND_VERSION_78" = x; then
13036              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13038              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13039$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13040              BOOT_JDK_FOUND=no
13041            else
13042              # We're done! :-)
13043              BOOT_JDK_FOUND=yes
13044
13045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13046
13047  # Input might be given as Windows format, start by converting to
13048  # unix format.
13049  path="$BOOT_JDK"
13050  new_path=`$CYGPATH -u "$path"`
13051
13052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13055  # "foo.exe" is OK but "foo" is an error.
13056  #
13057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13058  # It is also a way to make sure we got the proper file name for the real test later on.
13059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13060  if test "x$test_shortpath" = x; then
13061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13064  fi
13065
13066  # Call helper function which possibly converts this using DOS-style short mode.
13067  # If so, the updated path is stored in $new_path.
13068
13069  input_path="$new_path"
13070  # Check if we need to convert this using DOS-style short mode. If the path
13071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13072  # take no chances and rewrite it.
13073  # Note: m4 eats our [], so we need to use [ and ] instead.
13074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13075  if test "x$has_forbidden_chars" != x; then
13076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13080      # Going to short mode and back again did indeed matter. Since short mode is
13081      # case insensitive, let's make it lowercase to improve readability.
13082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13083      # Now convert it back to Unix-stile (cygpath)
13084      input_path=`$CYGPATH -u "$shortmode_path"`
13085      new_path="$input_path"
13086    fi
13087  fi
13088
13089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13090  if test "x$test_cygdrive_prefix" = x; then
13091    # As a simple fix, exclude /usr/bin since it's not a real path.
13092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13094      # a path prefixed by /cygdrive for fixpath to work.
13095      new_path="$CYGWIN_ROOT_PATH$input_path"
13096    fi
13097  fi
13098
13099
13100  if test "x$path" != "x$new_path"; then
13101    BOOT_JDK="$new_path"
13102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13104  fi
13105
13106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13107
13108  path="$BOOT_JDK"
13109  has_colon=`$ECHO $path | $GREP ^.:`
13110  new_path="$path"
13111  if test "x$has_colon" = x; then
13112    # Not in mixed or Windows style, start by that.
13113    new_path=`cmd //c echo $path`
13114  fi
13115
13116
13117  input_path="$new_path"
13118  # Check if we need to convert this using DOS-style short mode. If the path
13119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13120  # take no chances and rewrite it.
13121  # Note: m4 eats our [], so we need to use [ and ] instead.
13122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13123  if test "x$has_forbidden_chars" != x; then
13124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13126  fi
13127
13128
13129  windows_path="$new_path"
13130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13131    unix_path=`$CYGPATH -u "$windows_path"`
13132    new_path="$unix_path"
13133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13135    new_path="$unix_path"
13136  fi
13137
13138  if test "x$path" != "x$new_path"; then
13139    BOOT_JDK="$new_path"
13140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13142  fi
13143
13144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13146
13147  else
13148    # We're on a posix platform. Hooray! :)
13149    path="$BOOT_JDK"
13150
13151    if test ! -f "$path" && test ! -d "$path"; then
13152      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13153    fi
13154
13155    has_space=`$ECHO "$path" | $GREP " "`
13156    if test "x$has_space" != x; then
13157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13160    fi
13161  fi
13162
13163              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13164$as_echo_n "checking for Boot JDK... " >&6; }
13165              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13166$as_echo "$BOOT_JDK" >&6; }
13167              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13168$as_echo_n "checking Boot JDK version... " >&6; }
13169              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13170              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13171$as_echo "$BOOT_JDK_VERSION" >&6; }
13172            fi # end check jdk version
13173          fi # end check rt.jar
13174        fi # end check javac
13175      fi # end check java
13176    fi # end check boot jdk found
13177  fi
13178
13179    done
13180  fi
13181
13182  fi
13183
13184
13185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13187      # Do we have a bin/java?
13188      if test ! -x "$BOOT_JDK/bin/java"; then
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13191        BOOT_JDK_FOUND=no
13192      else
13193        # Do we have a bin/javac?
13194        if test ! -x "$BOOT_JDK/bin/javac"; then
13195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13199          BOOT_JDK_FOUND=no
13200        else
13201          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13202          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13205            BOOT_JDK_FOUND=no
13206          else
13207            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13209
13210            # Extra M4 quote needed to protect [] in grep expression.
13211            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13212            if test "x$FOUND_VERSION_78" = x; then
13213              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13215              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13216$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13217              BOOT_JDK_FOUND=no
13218            else
13219              # We're done! :-)
13220              BOOT_JDK_FOUND=yes
13221
13222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13223
13224  # Input might be given as Windows format, start by converting to
13225  # unix format.
13226  path="$BOOT_JDK"
13227  new_path=`$CYGPATH -u "$path"`
13228
13229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13232  # "foo.exe" is OK but "foo" is an error.
13233  #
13234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13235  # It is also a way to make sure we got the proper file name for the real test later on.
13236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13237  if test "x$test_shortpath" = x; then
13238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13240    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13241  fi
13242
13243  # Call helper function which possibly converts this using DOS-style short mode.
13244  # If so, the updated path is stored in $new_path.
13245
13246  input_path="$new_path"
13247  # Check if we need to convert this using DOS-style short mode. If the path
13248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13249  # take no chances and rewrite it.
13250  # Note: m4 eats our [], so we need to use [ and ] instead.
13251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13252  if test "x$has_forbidden_chars" != x; then
13253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13257      # Going to short mode and back again did indeed matter. Since short mode is
13258      # case insensitive, let's make it lowercase to improve readability.
13259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13260      # Now convert it back to Unix-stile (cygpath)
13261      input_path=`$CYGPATH -u "$shortmode_path"`
13262      new_path="$input_path"
13263    fi
13264  fi
13265
13266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13267  if test "x$test_cygdrive_prefix" = x; then
13268    # As a simple fix, exclude /usr/bin since it's not a real path.
13269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13271      # a path prefixed by /cygdrive for fixpath to work.
13272      new_path="$CYGWIN_ROOT_PATH$input_path"
13273    fi
13274  fi
13275
13276
13277  if test "x$path" != "x$new_path"; then
13278    BOOT_JDK="$new_path"
13279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13281  fi
13282
13283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13284
13285  path="$BOOT_JDK"
13286  has_colon=`$ECHO $path | $GREP ^.:`
13287  new_path="$path"
13288  if test "x$has_colon" = x; then
13289    # Not in mixed or Windows style, start by that.
13290    new_path=`cmd //c echo $path`
13291  fi
13292
13293
13294  input_path="$new_path"
13295  # Check if we need to convert this using DOS-style short mode. If the path
13296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13297  # take no chances and rewrite it.
13298  # Note: m4 eats our [], so we need to use [ and ] instead.
13299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13300  if test "x$has_forbidden_chars" != x; then
13301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13303  fi
13304
13305
13306  windows_path="$new_path"
13307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13308    unix_path=`$CYGPATH -u "$windows_path"`
13309    new_path="$unix_path"
13310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13312    new_path="$unix_path"
13313  fi
13314
13315  if test "x$path" != "x$new_path"; then
13316    BOOT_JDK="$new_path"
13317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13319  fi
13320
13321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13323
13324  else
13325    # We're on a posix platform. Hooray! :)
13326    path="$BOOT_JDK"
13327
13328    if test ! -f "$path" && test ! -d "$path"; then
13329      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13330    fi
13331
13332    has_space=`$ECHO "$path" | $GREP " "`
13333    if test "x$has_space" != x; then
13334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13337    fi
13338  fi
13339
13340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13341$as_echo_n "checking for Boot JDK... " >&6; }
13342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13343$as_echo "$BOOT_JDK" >&6; }
13344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13345$as_echo_n "checking Boot JDK version... " >&6; }
13346              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13348$as_echo "$BOOT_JDK_VERSION" >&6; }
13349            fi # end check jdk version
13350          fi # end check rt.jar
13351        fi # end check javac
13352      fi # end check java
13353    fi # end check boot jdk found
13354  fi
13355
13356
13357  if test "x$BOOT_JDK_FOUND" = xno; then
13358    # Now execute the test
13359
13360  if test "x$ProgramFiles" != x; then
13361    VIRTUAL_DIR="$ProgramFiles/Java"
13362
13363  windows_path="$VIRTUAL_DIR"
13364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13365    unix_path=`$CYGPATH -u "$windows_path"`
13366    VIRTUAL_DIR="$unix_path"
13367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13369    VIRTUAL_DIR="$unix_path"
13370  fi
13371
13372
13373  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13374  BOOT_JDK_SUFFIX=""
13375  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13376  if test "x$ALL_JDKS_FOUND" != x; then
13377    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13378
13379  if test "x$BOOT_JDK_FOUND" = xno; then
13380    # Now execute the test
13381
13382        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13383        if test -d "$BOOT_JDK"; then
13384          BOOT_JDK_FOUND=maybe
13385          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13386$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13387        fi
13388
13389
13390    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13391    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13392      # Do we have a bin/java?
13393      if test ! -x "$BOOT_JDK/bin/java"; then
13394        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13396        BOOT_JDK_FOUND=no
13397      else
13398        # Do we have a bin/javac?
13399        if test ! -x "$BOOT_JDK/bin/javac"; then
13400          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13402          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13403$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13404          BOOT_JDK_FOUND=no
13405        else
13406          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13407          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13408            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13410            BOOT_JDK_FOUND=no
13411          else
13412            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13413            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13414
13415            # Extra M4 quote needed to protect [] in grep expression.
13416            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13417            if test "x$FOUND_VERSION_78" = x; then
13418              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13420              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13421$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13422              BOOT_JDK_FOUND=no
13423            else
13424              # We're done! :-)
13425              BOOT_JDK_FOUND=yes
13426
13427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13428
13429  # Input might be given as Windows format, start by converting to
13430  # unix format.
13431  path="$BOOT_JDK"
13432  new_path=`$CYGPATH -u "$path"`
13433
13434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13437  # "foo.exe" is OK but "foo" is an error.
13438  #
13439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13440  # It is also a way to make sure we got the proper file name for the real test later on.
13441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13442  if test "x$test_shortpath" = x; then
13443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13445    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13446  fi
13447
13448  # Call helper function which possibly converts this using DOS-style short mode.
13449  # If so, the updated path is stored in $new_path.
13450
13451  input_path="$new_path"
13452  # Check if we need to convert this using DOS-style short mode. If the path
13453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13454  # take no chances and rewrite it.
13455  # Note: m4 eats our [], so we need to use [ and ] instead.
13456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13457  if test "x$has_forbidden_chars" != x; then
13458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13462      # Going to short mode and back again did indeed matter. Since short mode is
13463      # case insensitive, let's make it lowercase to improve readability.
13464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13465      # Now convert it back to Unix-stile (cygpath)
13466      input_path=`$CYGPATH -u "$shortmode_path"`
13467      new_path="$input_path"
13468    fi
13469  fi
13470
13471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13472  if test "x$test_cygdrive_prefix" = x; then
13473    # As a simple fix, exclude /usr/bin since it's not a real path.
13474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13476      # a path prefixed by /cygdrive for fixpath to work.
13477      new_path="$CYGWIN_ROOT_PATH$input_path"
13478    fi
13479  fi
13480
13481
13482  if test "x$path" != "x$new_path"; then
13483    BOOT_JDK="$new_path"
13484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13486  fi
13487
13488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13489
13490  path="$BOOT_JDK"
13491  has_colon=`$ECHO $path | $GREP ^.:`
13492  new_path="$path"
13493  if test "x$has_colon" = x; then
13494    # Not in mixed or Windows style, start by that.
13495    new_path=`cmd //c echo $path`
13496  fi
13497
13498
13499  input_path="$new_path"
13500  # Check if we need to convert this using DOS-style short mode. If the path
13501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13502  # take no chances and rewrite it.
13503  # Note: m4 eats our [], so we need to use [ and ] instead.
13504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13505  if test "x$has_forbidden_chars" != x; then
13506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13508  fi
13509
13510
13511  windows_path="$new_path"
13512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13513    unix_path=`$CYGPATH -u "$windows_path"`
13514    new_path="$unix_path"
13515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13517    new_path="$unix_path"
13518  fi
13519
13520  if test "x$path" != "x$new_path"; then
13521    BOOT_JDK="$new_path"
13522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13524  fi
13525
13526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13528
13529  else
13530    # We're on a posix platform. Hooray! :)
13531    path="$BOOT_JDK"
13532
13533    if test ! -f "$path" && test ! -d "$path"; then
13534      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13535    fi
13536
13537    has_space=`$ECHO "$path" | $GREP " "`
13538    if test "x$has_space" != x; then
13539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13541      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13542    fi
13543  fi
13544
13545              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13546$as_echo_n "checking for Boot JDK... " >&6; }
13547              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13548$as_echo "$BOOT_JDK" >&6; }
13549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13550$as_echo_n "checking Boot JDK version... " >&6; }
13551              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13552              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13553$as_echo "$BOOT_JDK_VERSION" >&6; }
13554            fi # end check jdk version
13555          fi # end check rt.jar
13556        fi # end check javac
13557      fi # end check java
13558    fi # end check boot jdk found
13559  fi
13560
13561    done
13562  fi
13563
13564  fi
13565
13566
13567    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13568    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13569      # Do we have a bin/java?
13570      if test ! -x "$BOOT_JDK/bin/java"; then
13571        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13573        BOOT_JDK_FOUND=no
13574      else
13575        # Do we have a bin/javac?
13576        if test ! -x "$BOOT_JDK/bin/javac"; then
13577          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13579          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13580$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13581          BOOT_JDK_FOUND=no
13582        else
13583          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13584          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13585            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13587            BOOT_JDK_FOUND=no
13588          else
13589            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13590            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13591
13592            # Extra M4 quote needed to protect [] in grep expression.
13593            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13594            if test "x$FOUND_VERSION_78" = x; then
13595              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13597              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13598$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13599              BOOT_JDK_FOUND=no
13600            else
13601              # We're done! :-)
13602              BOOT_JDK_FOUND=yes
13603
13604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13605
13606  # Input might be given as Windows format, start by converting to
13607  # unix format.
13608  path="$BOOT_JDK"
13609  new_path=`$CYGPATH -u "$path"`
13610
13611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13614  # "foo.exe" is OK but "foo" is an error.
13615  #
13616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13617  # It is also a way to make sure we got the proper file name for the real test later on.
13618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13619  if test "x$test_shortpath" = x; then
13620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13622    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13623  fi
13624
13625  # Call helper function which possibly converts this using DOS-style short mode.
13626  # If so, the updated path is stored in $new_path.
13627
13628  input_path="$new_path"
13629  # Check if we need to convert this using DOS-style short mode. If the path
13630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13631  # take no chances and rewrite it.
13632  # Note: m4 eats our [], so we need to use [ and ] instead.
13633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13634  if test "x$has_forbidden_chars" != x; then
13635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13639      # Going to short mode and back again did indeed matter. Since short mode is
13640      # case insensitive, let's make it lowercase to improve readability.
13641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13642      # Now convert it back to Unix-stile (cygpath)
13643      input_path=`$CYGPATH -u "$shortmode_path"`
13644      new_path="$input_path"
13645    fi
13646  fi
13647
13648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13649  if test "x$test_cygdrive_prefix" = x; then
13650    # As a simple fix, exclude /usr/bin since it's not a real path.
13651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13653      # a path prefixed by /cygdrive for fixpath to work.
13654      new_path="$CYGWIN_ROOT_PATH$input_path"
13655    fi
13656  fi
13657
13658
13659  if test "x$path" != "x$new_path"; then
13660    BOOT_JDK="$new_path"
13661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13663  fi
13664
13665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13666
13667  path="$BOOT_JDK"
13668  has_colon=`$ECHO $path | $GREP ^.:`
13669  new_path="$path"
13670  if test "x$has_colon" = x; then
13671    # Not in mixed or Windows style, start by that.
13672    new_path=`cmd //c echo $path`
13673  fi
13674
13675
13676  input_path="$new_path"
13677  # Check if we need to convert this using DOS-style short mode. If the path
13678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13679  # take no chances and rewrite it.
13680  # Note: m4 eats our [], so we need to use [ and ] instead.
13681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13682  if test "x$has_forbidden_chars" != x; then
13683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13685  fi
13686
13687
13688  windows_path="$new_path"
13689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13690    unix_path=`$CYGPATH -u "$windows_path"`
13691    new_path="$unix_path"
13692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13694    new_path="$unix_path"
13695  fi
13696
13697  if test "x$path" != "x$new_path"; then
13698    BOOT_JDK="$new_path"
13699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13701  fi
13702
13703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13705
13706  else
13707    # We're on a posix platform. Hooray! :)
13708    path="$BOOT_JDK"
13709
13710    if test ! -f "$path" && test ! -d "$path"; then
13711      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13712    fi
13713
13714    has_space=`$ECHO "$path" | $GREP " "`
13715    if test "x$has_space" != x; then
13716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13718      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13719    fi
13720  fi
13721
13722              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13723$as_echo_n "checking for Boot JDK... " >&6; }
13724              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13725$as_echo "$BOOT_JDK" >&6; }
13726              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13727$as_echo_n "checking Boot JDK version... " >&6; }
13728              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13729              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13730$as_echo "$BOOT_JDK_VERSION" >&6; }
13731            fi # end check jdk version
13732          fi # end check rt.jar
13733        fi # end check javac
13734      fi # end check java
13735    fi # end check boot jdk found
13736  fi
13737
13738
13739  if test "x$BOOT_JDK_FOUND" = xno; then
13740    # Now execute the test
13741
13742  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13743  BOOT_JDK_SUFFIX=""
13744  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13745  if test "x$ALL_JDKS_FOUND" != x; then
13746    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13747
13748  if test "x$BOOT_JDK_FOUND" = xno; then
13749    # Now execute the test
13750
13751        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13752        if test -d "$BOOT_JDK"; then
13753          BOOT_JDK_FOUND=maybe
13754          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13755$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13756        fi
13757
13758
13759    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13760    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13761      # Do we have a bin/java?
13762      if test ! -x "$BOOT_JDK/bin/java"; then
13763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13765        BOOT_JDK_FOUND=no
13766      else
13767        # Do we have a bin/javac?
13768        if test ! -x "$BOOT_JDK/bin/javac"; then
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13772$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13773          BOOT_JDK_FOUND=no
13774        else
13775          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13776          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13779            BOOT_JDK_FOUND=no
13780          else
13781            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13782            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13783
13784            # Extra M4 quote needed to protect [] in grep expression.
13785            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13786            if test "x$FOUND_VERSION_78" = x; then
13787              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13789              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13790$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13791              BOOT_JDK_FOUND=no
13792            else
13793              # We're done! :-)
13794              BOOT_JDK_FOUND=yes
13795
13796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13797
13798  # Input might be given as Windows format, start by converting to
13799  # unix format.
13800  path="$BOOT_JDK"
13801  new_path=`$CYGPATH -u "$path"`
13802
13803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13806  # "foo.exe" is OK but "foo" is an error.
13807  #
13808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13809  # It is also a way to make sure we got the proper file name for the real test later on.
13810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13811  if test "x$test_shortpath" = x; then
13812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13814    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13815  fi
13816
13817  # Call helper function which possibly converts this using DOS-style short mode.
13818  # If so, the updated path is stored in $new_path.
13819
13820  input_path="$new_path"
13821  # Check if we need to convert this using DOS-style short mode. If the path
13822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13823  # take no chances and rewrite it.
13824  # Note: m4 eats our [], so we need to use [ and ] instead.
13825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13826  if test "x$has_forbidden_chars" != x; then
13827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13831      # Going to short mode and back again did indeed matter. Since short mode is
13832      # case insensitive, let's make it lowercase to improve readability.
13833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13834      # Now convert it back to Unix-stile (cygpath)
13835      input_path=`$CYGPATH -u "$shortmode_path"`
13836      new_path="$input_path"
13837    fi
13838  fi
13839
13840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13841  if test "x$test_cygdrive_prefix" = x; then
13842    # As a simple fix, exclude /usr/bin since it's not a real path.
13843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13845      # a path prefixed by /cygdrive for fixpath to work.
13846      new_path="$CYGWIN_ROOT_PATH$input_path"
13847    fi
13848  fi
13849
13850
13851  if test "x$path" != "x$new_path"; then
13852    BOOT_JDK="$new_path"
13853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13855  fi
13856
13857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13858
13859  path="$BOOT_JDK"
13860  has_colon=`$ECHO $path | $GREP ^.:`
13861  new_path="$path"
13862  if test "x$has_colon" = x; then
13863    # Not in mixed or Windows style, start by that.
13864    new_path=`cmd //c echo $path`
13865  fi
13866
13867
13868  input_path="$new_path"
13869  # Check if we need to convert this using DOS-style short mode. If the path
13870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13871  # take no chances and rewrite it.
13872  # Note: m4 eats our [], so we need to use [ and ] instead.
13873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13874  if test "x$has_forbidden_chars" != x; then
13875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13877  fi
13878
13879
13880  windows_path="$new_path"
13881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13882    unix_path=`$CYGPATH -u "$windows_path"`
13883    new_path="$unix_path"
13884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13886    new_path="$unix_path"
13887  fi
13888
13889  if test "x$path" != "x$new_path"; then
13890    BOOT_JDK="$new_path"
13891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13893  fi
13894
13895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13897
13898  else
13899    # We're on a posix platform. Hooray! :)
13900    path="$BOOT_JDK"
13901
13902    if test ! -f "$path" && test ! -d "$path"; then
13903      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13904    fi
13905
13906    has_space=`$ECHO "$path" | $GREP " "`
13907    if test "x$has_space" != x; then
13908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13910      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13911    fi
13912  fi
13913
13914              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13915$as_echo_n "checking for Boot JDK... " >&6; }
13916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13917$as_echo "$BOOT_JDK" >&6; }
13918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13919$as_echo_n "checking Boot JDK version... " >&6; }
13920              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13921              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13922$as_echo "$BOOT_JDK_VERSION" >&6; }
13923            fi # end check jdk version
13924          fi # end check rt.jar
13925        fi # end check javac
13926      fi # end check java
13927    fi # end check boot jdk found
13928  fi
13929
13930    done
13931  fi
13932
13933
13934    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13935    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13936      # Do we have a bin/java?
13937      if test ! -x "$BOOT_JDK/bin/java"; then
13938        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13940        BOOT_JDK_FOUND=no
13941      else
13942        # Do we have a bin/javac?
13943        if test ! -x "$BOOT_JDK/bin/javac"; then
13944          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13946          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13947$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13948          BOOT_JDK_FOUND=no
13949        else
13950          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13951          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13954            BOOT_JDK_FOUND=no
13955          else
13956            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13957            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13958
13959            # Extra M4 quote needed to protect [] in grep expression.
13960            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13961            if test "x$FOUND_VERSION_78" = x; then
13962              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13964              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13965$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13966              BOOT_JDK_FOUND=no
13967            else
13968              # We're done! :-)
13969              BOOT_JDK_FOUND=yes
13970
13971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13972
13973  # Input might be given as Windows format, start by converting to
13974  # unix format.
13975  path="$BOOT_JDK"
13976  new_path=`$CYGPATH -u "$path"`
13977
13978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13981  # "foo.exe" is OK but "foo" is an error.
13982  #
13983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13984  # It is also a way to make sure we got the proper file name for the real test later on.
13985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13986  if test "x$test_shortpath" = x; then
13987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13989    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13990  fi
13991
13992  # Call helper function which possibly converts this using DOS-style short mode.
13993  # If so, the updated path is stored in $new_path.
13994
13995  input_path="$new_path"
13996  # Check if we need to convert this using DOS-style short mode. If the path
13997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13998  # take no chances and rewrite it.
13999  # Note: m4 eats our [], so we need to use [ and ] instead.
14000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14001  if test "x$has_forbidden_chars" != x; then
14002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14006      # Going to short mode and back again did indeed matter. Since short mode is
14007      # case insensitive, let's make it lowercase to improve readability.
14008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14009      # Now convert it back to Unix-stile (cygpath)
14010      input_path=`$CYGPATH -u "$shortmode_path"`
14011      new_path="$input_path"
14012    fi
14013  fi
14014
14015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14016  if test "x$test_cygdrive_prefix" = x; then
14017    # As a simple fix, exclude /usr/bin since it's not a real path.
14018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14020      # a path prefixed by /cygdrive for fixpath to work.
14021      new_path="$CYGWIN_ROOT_PATH$input_path"
14022    fi
14023  fi
14024
14025
14026  if test "x$path" != "x$new_path"; then
14027    BOOT_JDK="$new_path"
14028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14030  fi
14031
14032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14033
14034  path="$BOOT_JDK"
14035  has_colon=`$ECHO $path | $GREP ^.:`
14036  new_path="$path"
14037  if test "x$has_colon" = x; then
14038    # Not in mixed or Windows style, start by that.
14039    new_path=`cmd //c echo $path`
14040  fi
14041
14042
14043  input_path="$new_path"
14044  # Check if we need to convert this using DOS-style short mode. If the path
14045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14046  # take no chances and rewrite it.
14047  # Note: m4 eats our [], so we need to use [ and ] instead.
14048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14049  if test "x$has_forbidden_chars" != x; then
14050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14052  fi
14053
14054
14055  windows_path="$new_path"
14056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14057    unix_path=`$CYGPATH -u "$windows_path"`
14058    new_path="$unix_path"
14059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14061    new_path="$unix_path"
14062  fi
14063
14064  if test "x$path" != "x$new_path"; then
14065    BOOT_JDK="$new_path"
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14068  fi
14069
14070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14072
14073  else
14074    # We're on a posix platform. Hooray! :)
14075    path="$BOOT_JDK"
14076
14077    if test ! -f "$path" && test ! -d "$path"; then
14078      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14079    fi
14080
14081    has_space=`$ECHO "$path" | $GREP " "`
14082    if test "x$has_space" != x; then
14083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14085      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14086    fi
14087  fi
14088
14089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14090$as_echo_n "checking for Boot JDK... " >&6; }
14091              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14092$as_echo "$BOOT_JDK" >&6; }
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14094$as_echo_n "checking Boot JDK version... " >&6; }
14095              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14097$as_echo "$BOOT_JDK_VERSION" >&6; }
14098            fi # end check jdk version
14099          fi # end check rt.jar
14100        fi # end check javac
14101      fi # end check java
14102    fi # end check boot jdk found
14103  fi
14104
14105  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14106
14107  if test "x$BOOT_JDK_FOUND" = xno; then
14108    # Now execute the test
14109
14110  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14111  BOOT_JDK_SUFFIX="/Contents/Home"
14112  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14113  if test "x$ALL_JDKS_FOUND" != x; then
14114    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14115
14116  if test "x$BOOT_JDK_FOUND" = xno; then
14117    # Now execute the test
14118
14119        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14120        if test -d "$BOOT_JDK"; then
14121          BOOT_JDK_FOUND=maybe
14122          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14123$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14124        fi
14125
14126
14127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14129      # Do we have a bin/java?
14130      if test ! -x "$BOOT_JDK/bin/java"; then
14131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14133        BOOT_JDK_FOUND=no
14134      else
14135        # Do we have a bin/javac?
14136        if test ! -x "$BOOT_JDK/bin/javac"; then
14137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14141          BOOT_JDK_FOUND=no
14142        else
14143          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14144          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14147            BOOT_JDK_FOUND=no
14148          else
14149            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14151
14152            # Extra M4 quote needed to protect [] in grep expression.
14153            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14154            if test "x$FOUND_VERSION_78" = x; then
14155              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14157              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14158$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14159              BOOT_JDK_FOUND=no
14160            else
14161              # We're done! :-)
14162              BOOT_JDK_FOUND=yes
14163
14164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14165
14166  # Input might be given as Windows format, start by converting to
14167  # unix format.
14168  path="$BOOT_JDK"
14169  new_path=`$CYGPATH -u "$path"`
14170
14171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14174  # "foo.exe" is OK but "foo" is an error.
14175  #
14176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14177  # It is also a way to make sure we got the proper file name for the real test later on.
14178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14179  if test "x$test_shortpath" = x; then
14180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14183  fi
14184
14185  # Call helper function which possibly converts this using DOS-style short mode.
14186  # If so, the updated path is stored in $new_path.
14187
14188  input_path="$new_path"
14189  # Check if we need to convert this using DOS-style short mode. If the path
14190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14191  # take no chances and rewrite it.
14192  # Note: m4 eats our [], so we need to use [ and ] instead.
14193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14194  if test "x$has_forbidden_chars" != x; then
14195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14199      # Going to short mode and back again did indeed matter. Since short mode is
14200      # case insensitive, let's make it lowercase to improve readability.
14201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14202      # Now convert it back to Unix-stile (cygpath)
14203      input_path=`$CYGPATH -u "$shortmode_path"`
14204      new_path="$input_path"
14205    fi
14206  fi
14207
14208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14209  if test "x$test_cygdrive_prefix" = x; then
14210    # As a simple fix, exclude /usr/bin since it's not a real path.
14211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14213      # a path prefixed by /cygdrive for fixpath to work.
14214      new_path="$CYGWIN_ROOT_PATH$input_path"
14215    fi
14216  fi
14217
14218
14219  if test "x$path" != "x$new_path"; then
14220    BOOT_JDK="$new_path"
14221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14223  fi
14224
14225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14226
14227  path="$BOOT_JDK"
14228  has_colon=`$ECHO $path | $GREP ^.:`
14229  new_path="$path"
14230  if test "x$has_colon" = x; then
14231    # Not in mixed or Windows style, start by that.
14232    new_path=`cmd //c echo $path`
14233  fi
14234
14235
14236  input_path="$new_path"
14237  # Check if we need to convert this using DOS-style short mode. If the path
14238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14239  # take no chances and rewrite it.
14240  # Note: m4 eats our [], so we need to use [ and ] instead.
14241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14242  if test "x$has_forbidden_chars" != x; then
14243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14245  fi
14246
14247
14248  windows_path="$new_path"
14249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14250    unix_path=`$CYGPATH -u "$windows_path"`
14251    new_path="$unix_path"
14252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14254    new_path="$unix_path"
14255  fi
14256
14257  if test "x$path" != "x$new_path"; then
14258    BOOT_JDK="$new_path"
14259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14261  fi
14262
14263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14265
14266  else
14267    # We're on a posix platform. Hooray! :)
14268    path="$BOOT_JDK"
14269
14270    if test ! -f "$path" && test ! -d "$path"; then
14271      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14272    fi
14273
14274    has_space=`$ECHO "$path" | $GREP " "`
14275    if test "x$has_space" != x; then
14276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14279    fi
14280  fi
14281
14282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14283$as_echo_n "checking for Boot JDK... " >&6; }
14284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14285$as_echo "$BOOT_JDK" >&6; }
14286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14287$as_echo_n "checking Boot JDK version... " >&6; }
14288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14290$as_echo "$BOOT_JDK_VERSION" >&6; }
14291            fi # end check jdk version
14292          fi # end check rt.jar
14293        fi # end check javac
14294      fi # end check java
14295    fi # end check boot jdk found
14296  fi
14297
14298    done
14299  fi
14300
14301
14302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14304      # Do we have a bin/java?
14305      if test ! -x "$BOOT_JDK/bin/java"; then
14306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14308        BOOT_JDK_FOUND=no
14309      else
14310        # Do we have a bin/javac?
14311        if test ! -x "$BOOT_JDK/bin/javac"; then
14312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14316          BOOT_JDK_FOUND=no
14317        else
14318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14322            BOOT_JDK_FOUND=no
14323          else
14324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14326
14327            # Extra M4 quote needed to protect [] in grep expression.
14328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14329            if test "x$FOUND_VERSION_78" = x; then
14330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14334              BOOT_JDK_FOUND=no
14335            else
14336              # We're done! :-)
14337              BOOT_JDK_FOUND=yes
14338
14339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14340
14341  # Input might be given as Windows format, start by converting to
14342  # unix format.
14343  path="$BOOT_JDK"
14344  new_path=`$CYGPATH -u "$path"`
14345
14346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14349  # "foo.exe" is OK but "foo" is an error.
14350  #
14351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14352  # It is also a way to make sure we got the proper file name for the real test later on.
14353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14354  if test "x$test_shortpath" = x; then
14355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14358  fi
14359
14360  # Call helper function which possibly converts this using DOS-style short mode.
14361  # If so, the updated path is stored in $new_path.
14362
14363  input_path="$new_path"
14364  # Check if we need to convert this using DOS-style short mode. If the path
14365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14366  # take no chances and rewrite it.
14367  # Note: m4 eats our [], so we need to use [ and ] instead.
14368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14369  if test "x$has_forbidden_chars" != x; then
14370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14374      # Going to short mode and back again did indeed matter. Since short mode is
14375      # case insensitive, let's make it lowercase to improve readability.
14376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14377      # Now convert it back to Unix-stile (cygpath)
14378      input_path=`$CYGPATH -u "$shortmode_path"`
14379      new_path="$input_path"
14380    fi
14381  fi
14382
14383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14384  if test "x$test_cygdrive_prefix" = x; then
14385    # As a simple fix, exclude /usr/bin since it's not a real path.
14386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14388      # a path prefixed by /cygdrive for fixpath to work.
14389      new_path="$CYGWIN_ROOT_PATH$input_path"
14390    fi
14391  fi
14392
14393
14394  if test "x$path" != "x$new_path"; then
14395    BOOT_JDK="$new_path"
14396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14398  fi
14399
14400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14401
14402  path="$BOOT_JDK"
14403  has_colon=`$ECHO $path | $GREP ^.:`
14404  new_path="$path"
14405  if test "x$has_colon" = x; then
14406    # Not in mixed or Windows style, start by that.
14407    new_path=`cmd //c echo $path`
14408  fi
14409
14410
14411  input_path="$new_path"
14412  # Check if we need to convert this using DOS-style short mode. If the path
14413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14414  # take no chances and rewrite it.
14415  # Note: m4 eats our [], so we need to use [ and ] instead.
14416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14417  if test "x$has_forbidden_chars" != x; then
14418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14420  fi
14421
14422
14423  windows_path="$new_path"
14424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14425    unix_path=`$CYGPATH -u "$windows_path"`
14426    new_path="$unix_path"
14427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14429    new_path="$unix_path"
14430  fi
14431
14432  if test "x$path" != "x$new_path"; then
14433    BOOT_JDK="$new_path"
14434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14436  fi
14437
14438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14440
14441  else
14442    # We're on a posix platform. Hooray! :)
14443    path="$BOOT_JDK"
14444
14445    if test ! -f "$path" && test ! -d "$path"; then
14446      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14447    fi
14448
14449    has_space=`$ECHO "$path" | $GREP " "`
14450    if test "x$has_space" != x; then
14451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14453      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14454    fi
14455  fi
14456
14457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14458$as_echo_n "checking for Boot JDK... " >&6; }
14459              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14460$as_echo "$BOOT_JDK" >&6; }
14461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14462$as_echo_n "checking Boot JDK version... " >&6; }
14463              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14465$as_echo "$BOOT_JDK_VERSION" >&6; }
14466            fi # end check jdk version
14467          fi # end check rt.jar
14468        fi # end check javac
14469      fi # end check java
14470    fi # end check boot jdk found
14471  fi
14472
14473
14474  if test "x$BOOT_JDK_FOUND" = xno; then
14475    # Now execute the test
14476
14477  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14478  BOOT_JDK_SUFFIX="/Contents/Home"
14479  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14480  if test "x$ALL_JDKS_FOUND" != x; then
14481    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14482
14483  if test "x$BOOT_JDK_FOUND" = xno; then
14484    # Now execute the test
14485
14486        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14487        if test -d "$BOOT_JDK"; then
14488          BOOT_JDK_FOUND=maybe
14489          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14490$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14491        fi
14492
14493
14494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14496      # Do we have a bin/java?
14497      if test ! -x "$BOOT_JDK/bin/java"; then
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14500        BOOT_JDK_FOUND=no
14501      else
14502        # Do we have a bin/javac?
14503        if test ! -x "$BOOT_JDK/bin/javac"; then
14504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14508          BOOT_JDK_FOUND=no
14509        else
14510          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14511          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14512            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14514            BOOT_JDK_FOUND=no
14515          else
14516            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14517            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14518
14519            # Extra M4 quote needed to protect [] in grep expression.
14520            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14521            if test "x$FOUND_VERSION_78" = x; then
14522              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14524              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14525$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14526              BOOT_JDK_FOUND=no
14527            else
14528              # We're done! :-)
14529              BOOT_JDK_FOUND=yes
14530
14531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14532
14533  # Input might be given as Windows format, start by converting to
14534  # unix format.
14535  path="$BOOT_JDK"
14536  new_path=`$CYGPATH -u "$path"`
14537
14538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14541  # "foo.exe" is OK but "foo" is an error.
14542  #
14543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14544  # It is also a way to make sure we got the proper file name for the real test later on.
14545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14546  if test "x$test_shortpath" = x; then
14547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14549    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14550  fi
14551
14552  # Call helper function which possibly converts this using DOS-style short mode.
14553  # If so, the updated path is stored in $new_path.
14554
14555  input_path="$new_path"
14556  # Check if we need to convert this using DOS-style short mode. If the path
14557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14558  # take no chances and rewrite it.
14559  # Note: m4 eats our [], so we need to use [ and ] instead.
14560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14561  if test "x$has_forbidden_chars" != x; then
14562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14566      # Going to short mode and back again did indeed matter. Since short mode is
14567      # case insensitive, let's make it lowercase to improve readability.
14568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14569      # Now convert it back to Unix-stile (cygpath)
14570      input_path=`$CYGPATH -u "$shortmode_path"`
14571      new_path="$input_path"
14572    fi
14573  fi
14574
14575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14576  if test "x$test_cygdrive_prefix" = x; then
14577    # As a simple fix, exclude /usr/bin since it's not a real path.
14578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14580      # a path prefixed by /cygdrive for fixpath to work.
14581      new_path="$CYGWIN_ROOT_PATH$input_path"
14582    fi
14583  fi
14584
14585
14586  if test "x$path" != "x$new_path"; then
14587    BOOT_JDK="$new_path"
14588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14589$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14590  fi
14591
14592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14593
14594  path="$BOOT_JDK"
14595  has_colon=`$ECHO $path | $GREP ^.:`
14596  new_path="$path"
14597  if test "x$has_colon" = x; then
14598    # Not in mixed or Windows style, start by that.
14599    new_path=`cmd //c echo $path`
14600  fi
14601
14602
14603  input_path="$new_path"
14604  # Check if we need to convert this using DOS-style short mode. If the path
14605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14606  # take no chances and rewrite it.
14607  # Note: m4 eats our [], so we need to use [ and ] instead.
14608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14609  if test "x$has_forbidden_chars" != x; then
14610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14612  fi
14613
14614
14615  windows_path="$new_path"
14616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14617    unix_path=`$CYGPATH -u "$windows_path"`
14618    new_path="$unix_path"
14619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14621    new_path="$unix_path"
14622  fi
14623
14624  if test "x$path" != "x$new_path"; then
14625    BOOT_JDK="$new_path"
14626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14627$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14628  fi
14629
14630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14632
14633  else
14634    # We're on a posix platform. Hooray! :)
14635    path="$BOOT_JDK"
14636
14637    if test ! -f "$path" && test ! -d "$path"; then
14638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14639    fi
14640
14641    has_space=`$ECHO "$path" | $GREP " "`
14642    if test "x$has_space" != x; then
14643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14645      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14646    fi
14647  fi
14648
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14650$as_echo_n "checking for Boot JDK... " >&6; }
14651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14652$as_echo "$BOOT_JDK" >&6; }
14653              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14654$as_echo_n "checking Boot JDK version... " >&6; }
14655              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14656              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14657$as_echo "$BOOT_JDK_VERSION" >&6; }
14658            fi # end check jdk version
14659          fi # end check rt.jar
14660        fi # end check javac
14661      fi # end check java
14662    fi # end check boot jdk found
14663  fi
14664
14665    done
14666  fi
14667
14668
14669    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14670    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14671      # Do we have a bin/java?
14672      if test ! -x "$BOOT_JDK/bin/java"; then
14673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14675        BOOT_JDK_FOUND=no
14676      else
14677        # Do we have a bin/javac?
14678        if test ! -x "$BOOT_JDK/bin/javac"; then
14679          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14682$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14683          BOOT_JDK_FOUND=no
14684        else
14685          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14686          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14687            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14689            BOOT_JDK_FOUND=no
14690          else
14691            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14693
14694            # Extra M4 quote needed to protect [] in grep expression.
14695            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14696            if test "x$FOUND_VERSION_78" = x; then
14697              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14699              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14700$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14701              BOOT_JDK_FOUND=no
14702            else
14703              # We're done! :-)
14704              BOOT_JDK_FOUND=yes
14705
14706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14707
14708  # Input might be given as Windows format, start by converting to
14709  # unix format.
14710  path="$BOOT_JDK"
14711  new_path=`$CYGPATH -u "$path"`
14712
14713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14716  # "foo.exe" is OK but "foo" is an error.
14717  #
14718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14719  # It is also a way to make sure we got the proper file name for the real test later on.
14720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14721  if test "x$test_shortpath" = x; then
14722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14724    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14725  fi
14726
14727  # Call helper function which possibly converts this using DOS-style short mode.
14728  # If so, the updated path is stored in $new_path.
14729
14730  input_path="$new_path"
14731  # Check if we need to convert this using DOS-style short mode. If the path
14732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733  # take no chances and rewrite it.
14734  # Note: m4 eats our [], so we need to use [ and ] instead.
14735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14736  if test "x$has_forbidden_chars" != x; then
14737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14741      # Going to short mode and back again did indeed matter. Since short mode is
14742      # case insensitive, let's make it lowercase to improve readability.
14743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14744      # Now convert it back to Unix-stile (cygpath)
14745      input_path=`$CYGPATH -u "$shortmode_path"`
14746      new_path="$input_path"
14747    fi
14748  fi
14749
14750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14751  if test "x$test_cygdrive_prefix" = x; then
14752    # As a simple fix, exclude /usr/bin since it's not a real path.
14753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14755      # a path prefixed by /cygdrive for fixpath to work.
14756      new_path="$CYGWIN_ROOT_PATH$input_path"
14757    fi
14758  fi
14759
14760
14761  if test "x$path" != "x$new_path"; then
14762    BOOT_JDK="$new_path"
14763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14765  fi
14766
14767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14768
14769  path="$BOOT_JDK"
14770  has_colon=`$ECHO $path | $GREP ^.:`
14771  new_path="$path"
14772  if test "x$has_colon" = x; then
14773    # Not in mixed or Windows style, start by that.
14774    new_path=`cmd //c echo $path`
14775  fi
14776
14777
14778  input_path="$new_path"
14779  # Check if we need to convert this using DOS-style short mode. If the path
14780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14781  # take no chances and rewrite it.
14782  # Note: m4 eats our [], so we need to use [ and ] instead.
14783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14784  if test "x$has_forbidden_chars" != x; then
14785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14787  fi
14788
14789
14790  windows_path="$new_path"
14791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14792    unix_path=`$CYGPATH -u "$windows_path"`
14793    new_path="$unix_path"
14794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14796    new_path="$unix_path"
14797  fi
14798
14799  if test "x$path" != "x$new_path"; then
14800    BOOT_JDK="$new_path"
14801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14803  fi
14804
14805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14807
14808  else
14809    # We're on a posix platform. Hooray! :)
14810    path="$BOOT_JDK"
14811
14812    if test ! -f "$path" && test ! -d "$path"; then
14813      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14814    fi
14815
14816    has_space=`$ECHO "$path" | $GREP " "`
14817    if test "x$has_space" != x; then
14818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14821    fi
14822  fi
14823
14824              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14825$as_echo_n "checking for Boot JDK... " >&6; }
14826              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14827$as_echo "$BOOT_JDK" >&6; }
14828              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14829$as_echo_n "checking Boot JDK version... " >&6; }
14830              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14831              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14832$as_echo "$BOOT_JDK_VERSION" >&6; }
14833            fi # end check jdk version
14834          fi # end check rt.jar
14835        fi # end check javac
14836      fi # end check java
14837    fi # end check boot jdk found
14838  fi
14839
14840  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14841
14842  if test "x$BOOT_JDK_FOUND" = xno; then
14843    # Now execute the test
14844
14845  BOOT_JDK_PREFIX="/usr/lib/jvm"
14846  BOOT_JDK_SUFFIX=""
14847  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14848  if test "x$ALL_JDKS_FOUND" != x; then
14849    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14850
14851  if test "x$BOOT_JDK_FOUND" = xno; then
14852    # Now execute the test
14853
14854        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14855        if test -d "$BOOT_JDK"; then
14856          BOOT_JDK_FOUND=maybe
14857          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14858$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14859        fi
14860
14861
14862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14864      # Do we have a bin/java?
14865      if test ! -x "$BOOT_JDK/bin/java"; then
14866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14868        BOOT_JDK_FOUND=no
14869      else
14870        # Do we have a bin/javac?
14871        if test ! -x "$BOOT_JDK/bin/javac"; then
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14876          BOOT_JDK_FOUND=no
14877        else
14878          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14879          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14882            BOOT_JDK_FOUND=no
14883          else
14884            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14885            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14886
14887            # Extra M4 quote needed to protect [] in grep expression.
14888            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14889            if test "x$FOUND_VERSION_78" = x; then
14890              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14892              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14893$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14894              BOOT_JDK_FOUND=no
14895            else
14896              # We're done! :-)
14897              BOOT_JDK_FOUND=yes
14898
14899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14900
14901  # Input might be given as Windows format, start by converting to
14902  # unix format.
14903  path="$BOOT_JDK"
14904  new_path=`$CYGPATH -u "$path"`
14905
14906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14909  # "foo.exe" is OK but "foo" is an error.
14910  #
14911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14912  # It is also a way to make sure we got the proper file name for the real test later on.
14913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14914  if test "x$test_shortpath" = x; then
14915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14917    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14918  fi
14919
14920  # Call helper function which possibly converts this using DOS-style short mode.
14921  # If so, the updated path is stored in $new_path.
14922
14923  input_path="$new_path"
14924  # Check if we need to convert this using DOS-style short mode. If the path
14925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14926  # take no chances and rewrite it.
14927  # Note: m4 eats our [], so we need to use [ and ] instead.
14928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14929  if test "x$has_forbidden_chars" != x; then
14930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14934      # Going to short mode and back again did indeed matter. Since short mode is
14935      # case insensitive, let's make it lowercase to improve readability.
14936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14937      # Now convert it back to Unix-stile (cygpath)
14938      input_path=`$CYGPATH -u "$shortmode_path"`
14939      new_path="$input_path"
14940    fi
14941  fi
14942
14943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14944  if test "x$test_cygdrive_prefix" = x; then
14945    # As a simple fix, exclude /usr/bin since it's not a real path.
14946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14948      # a path prefixed by /cygdrive for fixpath to work.
14949      new_path="$CYGWIN_ROOT_PATH$input_path"
14950    fi
14951  fi
14952
14953
14954  if test "x$path" != "x$new_path"; then
14955    BOOT_JDK="$new_path"
14956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14958  fi
14959
14960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14961
14962  path="$BOOT_JDK"
14963  has_colon=`$ECHO $path | $GREP ^.:`
14964  new_path="$path"
14965  if test "x$has_colon" = x; then
14966    # Not in mixed or Windows style, start by that.
14967    new_path=`cmd //c echo $path`
14968  fi
14969
14970
14971  input_path="$new_path"
14972  # Check if we need to convert this using DOS-style short mode. If the path
14973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14974  # take no chances and rewrite it.
14975  # Note: m4 eats our [], so we need to use [ and ] instead.
14976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14977  if test "x$has_forbidden_chars" != x; then
14978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14980  fi
14981
14982
14983  windows_path="$new_path"
14984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14985    unix_path=`$CYGPATH -u "$windows_path"`
14986    new_path="$unix_path"
14987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14989    new_path="$unix_path"
14990  fi
14991
14992  if test "x$path" != "x$new_path"; then
14993    BOOT_JDK="$new_path"
14994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14995$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14996  fi
14997
14998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15000
15001  else
15002    # We're on a posix platform. Hooray! :)
15003    path="$BOOT_JDK"
15004
15005    if test ! -f "$path" && test ! -d "$path"; then
15006      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15007    fi
15008
15009    has_space=`$ECHO "$path" | $GREP " "`
15010    if test "x$has_space" != x; then
15011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15013      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15014    fi
15015  fi
15016
15017              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15018$as_echo_n "checking for Boot JDK... " >&6; }
15019              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15020$as_echo "$BOOT_JDK" >&6; }
15021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15022$as_echo_n "checking Boot JDK version... " >&6; }
15023              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15024              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15025$as_echo "$BOOT_JDK_VERSION" >&6; }
15026            fi # end check jdk version
15027          fi # end check rt.jar
15028        fi # end check javac
15029      fi # end check java
15030    fi # end check boot jdk found
15031  fi
15032
15033    done
15034  fi
15035
15036
15037    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15038    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15039      # Do we have a bin/java?
15040      if test ! -x "$BOOT_JDK/bin/java"; then
15041        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15043        BOOT_JDK_FOUND=no
15044      else
15045        # Do we have a bin/javac?
15046        if test ! -x "$BOOT_JDK/bin/javac"; then
15047          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15049          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15050$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15051          BOOT_JDK_FOUND=no
15052        else
15053          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15054          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15057            BOOT_JDK_FOUND=no
15058          else
15059            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15061
15062            # Extra M4 quote needed to protect [] in grep expression.
15063            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15064            if test "x$FOUND_VERSION_78" = x; then
15065              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15067              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15068$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15069              BOOT_JDK_FOUND=no
15070            else
15071              # We're done! :-)
15072              BOOT_JDK_FOUND=yes
15073
15074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15075
15076  # Input might be given as Windows format, start by converting to
15077  # unix format.
15078  path="$BOOT_JDK"
15079  new_path=`$CYGPATH -u "$path"`
15080
15081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15084  # "foo.exe" is OK but "foo" is an error.
15085  #
15086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15087  # It is also a way to make sure we got the proper file name for the real test later on.
15088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15089  if test "x$test_shortpath" = x; then
15090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15092    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15093  fi
15094
15095  # Call helper function which possibly converts this using DOS-style short mode.
15096  # If so, the updated path is stored in $new_path.
15097
15098  input_path="$new_path"
15099  # Check if we need to convert this using DOS-style short mode. If the path
15100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15101  # take no chances and rewrite it.
15102  # Note: m4 eats our [], so we need to use [ and ] instead.
15103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15104  if test "x$has_forbidden_chars" != x; then
15105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15109      # Going to short mode and back again did indeed matter. Since short mode is
15110      # case insensitive, let's make it lowercase to improve readability.
15111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15112      # Now convert it back to Unix-stile (cygpath)
15113      input_path=`$CYGPATH -u "$shortmode_path"`
15114      new_path="$input_path"
15115    fi
15116  fi
15117
15118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15119  if test "x$test_cygdrive_prefix" = x; then
15120    # As a simple fix, exclude /usr/bin since it's not a real path.
15121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15123      # a path prefixed by /cygdrive for fixpath to work.
15124      new_path="$CYGWIN_ROOT_PATH$input_path"
15125    fi
15126  fi
15127
15128
15129  if test "x$path" != "x$new_path"; then
15130    BOOT_JDK="$new_path"
15131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15133  fi
15134
15135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15136
15137  path="$BOOT_JDK"
15138  has_colon=`$ECHO $path | $GREP ^.:`
15139  new_path="$path"
15140  if test "x$has_colon" = x; then
15141    # Not in mixed or Windows style, start by that.
15142    new_path=`cmd //c echo $path`
15143  fi
15144
15145
15146  input_path="$new_path"
15147  # Check if we need to convert this using DOS-style short mode. If the path
15148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15149  # take no chances and rewrite it.
15150  # Note: m4 eats our [], so we need to use [ and ] instead.
15151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15152  if test "x$has_forbidden_chars" != x; then
15153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15155  fi
15156
15157
15158  windows_path="$new_path"
15159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15160    unix_path=`$CYGPATH -u "$windows_path"`
15161    new_path="$unix_path"
15162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15164    new_path="$unix_path"
15165  fi
15166
15167  if test "x$path" != "x$new_path"; then
15168    BOOT_JDK="$new_path"
15169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15171  fi
15172
15173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15175
15176  else
15177    # We're on a posix platform. Hooray! :)
15178    path="$BOOT_JDK"
15179
15180    if test ! -f "$path" && test ! -d "$path"; then
15181      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15182    fi
15183
15184    has_space=`$ECHO "$path" | $GREP " "`
15185    if test "x$has_space" != x; then
15186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15189    fi
15190  fi
15191
15192              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15193$as_echo_n "checking for Boot JDK... " >&6; }
15194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15195$as_echo "$BOOT_JDK" >&6; }
15196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15197$as_echo_n "checking Boot JDK version... " >&6; }
15198              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15200$as_echo "$BOOT_JDK_VERSION" >&6; }
15201            fi # end check jdk version
15202          fi # end check rt.jar
15203        fi # end check javac
15204      fi # end check java
15205    fi # end check boot jdk found
15206  fi
15207
15208  fi
15209
15210
15211    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15212    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15213      # Do we have a bin/java?
15214      if test ! -x "$BOOT_JDK/bin/java"; then
15215        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15217        BOOT_JDK_FOUND=no
15218      else
15219        # Do we have a bin/javac?
15220        if test ! -x "$BOOT_JDK/bin/javac"; then
15221          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15223          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15224$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15225          BOOT_JDK_FOUND=no
15226        else
15227          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15228          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15231            BOOT_JDK_FOUND=no
15232          else
15233            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15235
15236            # Extra M4 quote needed to protect [] in grep expression.
15237            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15238            if test "x$FOUND_VERSION_78" = x; then
15239              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15241              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15242$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15243              BOOT_JDK_FOUND=no
15244            else
15245              # We're done! :-)
15246              BOOT_JDK_FOUND=yes
15247
15248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15249
15250  # Input might be given as Windows format, start by converting to
15251  # unix format.
15252  path="$BOOT_JDK"
15253  new_path=`$CYGPATH -u "$path"`
15254
15255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15258  # "foo.exe" is OK but "foo" is an error.
15259  #
15260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15261  # It is also a way to make sure we got the proper file name for the real test later on.
15262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15263  if test "x$test_shortpath" = x; then
15264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15267  fi
15268
15269  # Call helper function which possibly converts this using DOS-style short mode.
15270  # If so, the updated path is stored in $new_path.
15271
15272  input_path="$new_path"
15273  # Check if we need to convert this using DOS-style short mode. If the path
15274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15275  # take no chances and rewrite it.
15276  # Note: m4 eats our [], so we need to use [ and ] instead.
15277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15278  if test "x$has_forbidden_chars" != x; then
15279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15283      # Going to short mode and back again did indeed matter. Since short mode is
15284      # case insensitive, let's make it lowercase to improve readability.
15285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15286      # Now convert it back to Unix-stile (cygpath)
15287      input_path=`$CYGPATH -u "$shortmode_path"`
15288      new_path="$input_path"
15289    fi
15290  fi
15291
15292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15293  if test "x$test_cygdrive_prefix" = x; then
15294    # As a simple fix, exclude /usr/bin since it's not a real path.
15295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15297      # a path prefixed by /cygdrive for fixpath to work.
15298      new_path="$CYGWIN_ROOT_PATH$input_path"
15299    fi
15300  fi
15301
15302
15303  if test "x$path" != "x$new_path"; then
15304    BOOT_JDK="$new_path"
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15307  fi
15308
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310
15311  path="$BOOT_JDK"
15312  has_colon=`$ECHO $path | $GREP ^.:`
15313  new_path="$path"
15314  if test "x$has_colon" = x; then
15315    # Not in mixed or Windows style, start by that.
15316    new_path=`cmd //c echo $path`
15317  fi
15318
15319
15320  input_path="$new_path"
15321  # Check if we need to convert this using DOS-style short mode. If the path
15322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15323  # take no chances and rewrite it.
15324  # Note: m4 eats our [], so we need to use [ and ] instead.
15325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15326  if test "x$has_forbidden_chars" != x; then
15327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15329  fi
15330
15331
15332  windows_path="$new_path"
15333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15334    unix_path=`$CYGPATH -u "$windows_path"`
15335    new_path="$unix_path"
15336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15338    new_path="$unix_path"
15339  fi
15340
15341  if test "x$path" != "x$new_path"; then
15342    BOOT_JDK="$new_path"
15343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15345  fi
15346
15347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15349
15350  else
15351    # We're on a posix platform. Hooray! :)
15352    path="$BOOT_JDK"
15353
15354    if test ! -f "$path" && test ! -d "$path"; then
15355      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15356    fi
15357
15358    has_space=`$ECHO "$path" | $GREP " "`
15359    if test "x$has_space" != x; then
15360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15363    fi
15364  fi
15365
15366              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15367$as_echo_n "checking for Boot JDK... " >&6; }
15368              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15369$as_echo "$BOOT_JDK" >&6; }
15370              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15371$as_echo_n "checking Boot JDK version... " >&6; }
15372              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15373              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15374$as_echo "$BOOT_JDK_VERSION" >&6; }
15375            fi # end check jdk version
15376          fi # end check rt.jar
15377        fi # end check javac
15378      fi # end check java
15379    fi # end check boot jdk found
15380  fi
15381
15382
15383# If we haven't found anything yet, we've truly lost. Give up.
15384if test "x$BOOT_JDK_FOUND" = xno; then
15385
15386    # Print a helpful message on how to acquire the necessary build dependency.
15387    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15388    MISSING_DEPENDENCY=openjdk
15389    PKGHANDLER_COMMAND=
15390
15391    case $PKGHANDLER in
15392	apt-get)
15393                apt_help     $MISSING_DEPENDENCY ;;
15394    yum)
15395                yum_help     $MISSING_DEPENDENCY ;;
15396	port)
15397                port_help    $MISSING_DEPENDENCY ;;
15398	pkgutil)
15399                pkgutil_help $MISSING_DEPENDENCY ;;
15400	pkgadd)
15401                pkgadd_help  $MISSING_DEPENDENCY ;;
15402    * )
15403      break ;;
15404    esac
15405
15406    if test "x$PKGHANDLER_COMMAND" != x; then
15407        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15408    fi
15409
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15411$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15412  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15413$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15414  as_fn_error $? "Cannot continue" "$LINENO" 5
15415fi
15416
15417# Setup proper paths for what we found
15418BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15419if test ! -f "$BOOT_RTJAR"; then
15420    # On MacOSX it is called classes.jar
15421    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15422    if test -f "$BOOT_RTJAR"; then
15423      # Remove the ..
15424      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15425    fi
15426fi
15427BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15428BOOT_JDK="$BOOT_JDK"
15429
15430
15431
15432
15433# Setup tools from the Boot JDK.
15434
15435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15436$as_echo_n "checking for java in Boot JDK... " >&6; }
15437  JAVA=$BOOT_JDK/bin/java
15438  if test ! -x $JAVA; then
15439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15440$as_echo "not found" >&6; }
15441      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15442$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15443      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15444  fi
15445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15446$as_echo "ok" >&6; }
15447
15448
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15450$as_echo_n "checking for javac in Boot JDK... " >&6; }
15451  JAVAC=$BOOT_JDK/bin/javac
15452  if test ! -x $JAVAC; then
15453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15454$as_echo "not found" >&6; }
15455      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15456$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15457      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15458  fi
15459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15460$as_echo "ok" >&6; }
15461
15462
15463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15464$as_echo_n "checking for javah in Boot JDK... " >&6; }
15465  JAVAH=$BOOT_JDK/bin/javah
15466  if test ! -x $JAVAH; then
15467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15468$as_echo "not found" >&6; }
15469      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15470$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15471      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15472  fi
15473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15474$as_echo "ok" >&6; }
15475
15476
15477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15478$as_echo_n "checking for javap in Boot JDK... " >&6; }
15479  JAVAP=$BOOT_JDK/bin/javap
15480  if test ! -x $JAVAP; then
15481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15482$as_echo "not found" >&6; }
15483      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15484$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15485      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15486  fi
15487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15488$as_echo "ok" >&6; }
15489
15490
15491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15492$as_echo_n "checking for jar in Boot JDK... " >&6; }
15493  JAR=$BOOT_JDK/bin/jar
15494  if test ! -x $JAR; then
15495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15496$as_echo "not found" >&6; }
15497      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15498$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15499      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15500  fi
15501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15502$as_echo "ok" >&6; }
15503
15504
15505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15506$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15507  RMIC=$BOOT_JDK/bin/rmic
15508  if test ! -x $RMIC; then
15509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15510$as_echo "not found" >&6; }
15511      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15512$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15513      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15514  fi
15515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15516$as_echo "ok" >&6; }
15517
15518
15519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15520$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15521  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15522  if test ! -x $NATIVE2ASCII; then
15523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15524$as_echo "not found" >&6; }
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15526$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15527      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15528  fi
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15530$as_echo "ok" >&6; }
15531
15532
15533# Finally, set some other options...
15534
15535# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15536BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15537
15538
15539
15540
15541##############################################################################
15542#
15543# Specify options for anything that is run with the Boot JDK.
15544#
15545
15546# Check whether --with-boot-jdk-jvmargs was given.
15547if test "${with_boot_jdk_jvmargs+set}" = set; then :
15548  withval=$with_boot_jdk_jvmargs;
15549fi
15550
15551
15552if test "x$with_boot_jdk_jvmargs" = x; then
15553    # Not all JVM:s accept the same arguments on the command line.
15554    # OpenJDK specific increase in thread stack for JDK build,
15555    # well more specifically, when running javac.
15556    if test "x$BUILD_NUM_BITS" = x32; then
15557       STACK_SIZE=768
15558    else
15559       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15560       # since 64-bit pointers are pushed on the stach. Apparently, we need
15561       # to increase the stack space when javacing the JDK....
15562       STACK_SIZE=1536
15563    fi
15564
15565    # Minimum amount of heap memory.
15566
15567    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15568    # If so, then append -Xms64M to boot_jdk_jvmargs
15569    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15570    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15571    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15572        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15573    fi
15574
15575    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15576        # Why does macosx need more heap? Its the huge JDK batch.
15577
15578    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15579    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15580    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15581    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15582    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15583        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15584    fi
15585
15586    else
15587
15588    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15589    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15590    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15591    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15592    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15593        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15594    fi
15595
15596    fi
15597    # When is adding -client something that speeds up the JVM?
15598    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15599
15600    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15601    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15602    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15603    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15604    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15605        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15606    fi
15607
15608
15609    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15610    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15611    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15612    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15613    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15614        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15615    fi
15616
15617
15618    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15619    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15620    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15621    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15622    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15623        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15624    fi
15625
15626    # Disable special log output when a debug build is used as Boot JDK...
15627
15628    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15629    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15630    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15631    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15632    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15633        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15634    fi
15635
15636fi
15637
15638BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15639
15640
15641
15642###############################################################################
15643#
15644# Configure the sources to use. We can add or override individual directories.
15645#
15646###############################################################################
15647
15648
15649
15650# Where are the sources. Any of these can be overridden
15651# using --with-override-corba and the likes.
15652LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15653CORBA_TOPDIR="$SRC_ROOT/corba"
15654JAXP_TOPDIR="$SRC_ROOT/jaxp"
15655JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15656HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15657NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15658JDK_TOPDIR="$SRC_ROOT/jdk"
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669###############################################################################
15670#
15671# Pickup additional source for a component from outside of the source root
15672# or override source for a component.
15673#
15674
15675# Check whether --with-add-source-root was given.
15676if test "${with_add_source_root+set}" = set; then :
15677  withval=$with_add_source_root;
15678fi
15679
15680
15681
15682# Check whether --with-override-source-root was given.
15683if test "${with_override_source_root+set}" = set; then :
15684  withval=$with_override_source_root;
15685fi
15686
15687
15688
15689# Check whether --with-adds-and-overrides was given.
15690if test "${with_adds_and_overrides+set}" = set; then :
15691  withval=$with_adds_and_overrides;
15692fi
15693
15694
15695if test "x$with_adds_and_overrides" != x; then
15696    with_add_source_root="$with_adds_and_overrides/adds"
15697    with_override_source_root="$with_adds_and_overrides/overrides"
15698fi
15699
15700if test "x$with_add_source_root" != x; then
15701    if ! test -d $with_add_source_root; then
15702       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15703    fi
15704    CURDIR="$PWD"
15705    cd "$with_add_source_root"
15706    ADD_SRC_ROOT="`pwd`"
15707    cd "$CURDIR"
15708    # Verify that the addon source root does not have any root makefiles.
15709    # If it does, then it is usually an error, prevent this.
15710    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15711       test -f $with_add_source_root/langtools/make/Makefile; then
15712        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
15713    fi
15714    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15715       test -f $with_add_source_root/corba/make/Makefile; then
15716        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
15717    fi
15718    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15719       test -f $with_add_source_root/jaxp/make/Makefile; then
15720        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
15721    fi
15722    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15723       test -f $with_add_source_root/jaxws/make/Makefile; then
15724        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
15725    fi
15726    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15727       test -f $with_add_source_root/hotspot/make/Makefile; then
15728        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
15729    fi
15730    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15731       test -f $with_add_source_root/jdk/make/Makefile; then
15732        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
15733    fi
15734fi
15735
15736
15737if test "x$with_override_source_root" != x; then
15738    if ! test -d $with_override_source_root; then
15739       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15740    fi
15741    CURDIR="$PWD"
15742    cd "$with_override_source_root"
15743    OVERRIDE_SRC_ROOT="`pwd`"
15744    cd "$CURDIR"
15745    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15746       test -f $with_override_source_root/langtools/make/Makefile; then
15747        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
15748    fi
15749    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15750       test -f $with_override_source_root/corba/make/Makefile; then
15751        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
15752    fi
15753    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15754       test -f $with_override_source_root/jaxp/make/Makefile; then
15755        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
15756    fi
15757    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15758       test -f $with_override_source_root/jaxws/make/Makefile; then
15759        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
15760    fi
15761    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15762       test -f $with_override_source_root/hotspot/make/Makefile; then
15763        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
15764    fi
15765    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15766       test -f $with_override_source_root/jdk/make/Makefile; then
15767        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
15768    fi
15769fi
15770
15771
15772###############################################################################
15773#
15774# Override a repo completely, this is used for example when you have 3 small
15775# development sandboxes of the langtools sources and want to avoid having 3 full
15776# OpenJDK sources checked out on disk.
15777#
15778# Assuming that the 3 langtools sandboxes are located here:
15779# /home/fredrik/sandbox1/langtools
15780# /home/fredrik/sandbox2/langtools
15781# /home/fredrik/sandbox3/langtools
15782#
15783# From the source root you create build subdirs manually:
15784#     mkdir -p build1 build2 build3
15785# in each build directory run:
15786#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15787#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15788#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15789#
15790
15791
15792# Check whether --with-override-langtools was given.
15793if test "${with_override_langtools+set}" = set; then :
15794  withval=$with_override_langtools;
15795fi
15796
15797
15798
15799# Check whether --with-override-corba was given.
15800if test "${with_override_corba+set}" = set; then :
15801  withval=$with_override_corba;
15802fi
15803
15804
15805
15806# Check whether --with-override-jaxp was given.
15807if test "${with_override_jaxp+set}" = set; then :
15808  withval=$with_override_jaxp;
15809fi
15810
15811
15812
15813# Check whether --with-override-jaxws was given.
15814if test "${with_override_jaxws+set}" = set; then :
15815  withval=$with_override_jaxws;
15816fi
15817
15818
15819
15820# Check whether --with-override-hotspot was given.
15821if test "${with_override_hotspot+set}" = set; then :
15822  withval=$with_override_hotspot;
15823fi
15824
15825
15826
15827# Check whether --with-override-jdk was given.
15828if test "${with_override_jdk+set}" = set; then :
15829  withval=$with_override_jdk;
15830fi
15831
15832
15833if test "x$with_override_langtools" != x; then
15834    CURDIR="$PWD"
15835    cd "$with_override_langtools"
15836    LANGTOOLS_TOPDIR="`pwd`"
15837    cd "$CURDIR"
15838    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15839        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15840    fi
15841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15842$as_echo_n "checking if langtools should be overridden... " >&6; }
15843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15844$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15845fi
15846if test "x$with_override_corba" != x; then
15847    CURDIR="$PWD"
15848    cd "$with_override_corba"
15849    CORBA_TOPDIR="`pwd`"
15850    cd "$CURDIR"
15851    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15852        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15853    fi
15854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15855$as_echo_n "checking if corba should be overridden... " >&6; }
15856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15857$as_echo "yes with $CORBA_TOPDIR" >&6; }
15858fi
15859if test "x$with_override_jaxp" != x; then
15860    CURDIR="$PWD"
15861    cd "$with_override_jaxp"
15862    JAXP_TOPDIR="`pwd`"
15863    cd "$CURDIR"
15864    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15865        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15866    fi
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15868$as_echo_n "checking if jaxp should be overridden... " >&6; }
15869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15870$as_echo "yes with $JAXP_TOPDIR" >&6; }
15871fi
15872if test "x$with_override_jaxws" != x; then
15873    CURDIR="$PWD"
15874    cd "$with_override_jaxws"
15875    JAXWS_TOPDIR="`pwd`"
15876    cd "$CURDIR"
15877    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15878        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15879    fi
15880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15881$as_echo_n "checking if jaxws should be overridden... " >&6; }
15882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15883$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15884fi
15885if test "x$with_override_hotspot" != x; then
15886    CURDIR="$PWD"
15887    cd "$with_override_hotspot"
15888    HOTSPOT_TOPDIR="`pwd`"
15889    cd "$CURDIR"
15890    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15891       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15892        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15893    fi
15894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15895$as_echo_n "checking if hotspot should be overridden... " >&6; }
15896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15897$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15898fi
15899if test "x$with_override_nashorn" != x; then
15900    CURDIR="$PWD"
15901    cd "$with_override_nashorn"
15902    NASHORN_TOPDIR="`pwd`"
15903    cd "$CURDIR"
15904    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15905        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15906    fi
15907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15908$as_echo_n "checking if nashorn should be overridden... " >&6; }
15909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15910$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15911fi
15912if test "x$with_override_jdk" != x; then
15913    CURDIR="$PWD"
15914    cd "$with_override_jdk"
15915    JDK_TOPDIR="`pwd`"
15916    cd "$CURDIR"
15917    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15918        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15919    fi
15920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15921$as_echo_n "checking if JDK should be overridden... " >&6; }
15922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15923$as_echo "yes with $JDK_TOPDIR" >&6; }
15924fi
15925
15926
15927
15928BUILD_OUTPUT="$OUTPUT_ROOT"
15929
15930
15931HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15932BUILD_HOTSPOT=true
15933
15934
15935
15936# Check whether --with-import-hotspot was given.
15937if test "${with_import_hotspot+set}" = set; then :
15938  withval=$with_import_hotspot;
15939fi
15940
15941if test "x$with_import_hotspot" != x; then
15942    CURDIR="$PWD"
15943    cd "$with_import_hotspot"
15944    HOTSPOT_DIST="`pwd`"
15945    cd "$CURDIR"
15946    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15947        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15948    fi
15949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15950$as_echo_n "checking if hotspot should be imported... " >&6; }
15951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15952$as_echo "yes from $HOTSPOT_DIST" >&6; }
15953    BUILD_HOTSPOT=false
15954fi
15955
15956JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15957
15958
15959###############################################################################
15960#
15961# Setup the toolchain (compilers etc), i.e. the tools that need to be
15962# cross-compilation aware.
15963#
15964###############################################################################
15965
15966
15967###############################################################################
15968#
15969# Configure the development tool paths and potential sysroot.
15970#
15971ac_ext=cpp
15972ac_cpp='$CXXCPP $CPPFLAGS'
15973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15976
15977
15978# The option used to specify the target .o,.a or .so file.
15979# When compiling, how to specify the to be created object file.
15980CC_OUT_OPTION='-o$(SPACE)'
15981# When linking, how to specify the to be created executable.
15982EXE_OUT_OPTION='-o$(SPACE)'
15983# When linking, how to specify the to be created dynamically linkable library.
15984LD_OUT_OPTION='-o$(SPACE)'
15985# When archiving, how to specify the to be create static archive for object files.
15986AR_OUT_OPTION='rcs$(SPACE)'
15987
15988
15989
15990
15991
15992# Locate the actual tools
15993
15994if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15995
15996  # Store path to cygwin link.exe to help excluding it when searching for
15997  # VS linker. This must be done before changing the PATH when looking for VS.
15998  # Extract the first word of "link", so it can be a program name with args.
15999set dummy link; ac_word=$2
16000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16001$as_echo_n "checking for $ac_word... " >&6; }
16002if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16003  $as_echo_n "(cached) " >&6
16004else
16005  case $CYGWIN_LINK in
16006  [\\/]* | ?:[\\/]*)
16007  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16008  ;;
16009  *)
16010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16011for as_dir in $PATH
16012do
16013  IFS=$as_save_IFS
16014  test -z "$as_dir" && as_dir=.
16015    for ac_exec_ext in '' $ac_executable_extensions; do
16016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16017    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16019    break 2
16020  fi
16021done
16022  done
16023IFS=$as_save_IFS
16024
16025  ;;
16026esac
16027fi
16028CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16029if test -n "$CYGWIN_LINK"; then
16030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16031$as_echo "$CYGWIN_LINK" >&6; }
16032else
16033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16034$as_echo "no" >&6; }
16035fi
16036
16037
16038  if test "x$CYGWIN_LINK" != x; then
16039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16040$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16041    "$CYGWIN_LINK" --version > /dev/null
16042    if test $? -eq 0 ; then
16043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16044$as_echo "yes" >&6; }
16045    else
16046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16047$as_echo "no" >&6; }
16048      # This might be the VS linker. Don't exclude it later on.
16049      CYGWIN_LINK=""
16050    fi
16051  fi
16052
16053  # First-hand choice is to locate and run the vsvars bat file.
16054
16055  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16056    VCVARSFILE="vc/bin/vcvars32.bat"
16057  else
16058    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16059  fi
16060
16061  VS_ENV_CMD=""
16062  VS_ENV_ARGS=""
16063  if test "x$with_toolsdir" != x; then
16064
16065  if test "x$VS_ENV_CMD" = x; then
16066    VS100BASE="$with_toolsdir/../.."
16067    METHOD="--with-tools-dir"
16068
16069  windows_path="$VS100BASE"
16070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16071    unix_path=`$CYGPATH -u "$windows_path"`
16072    VS100BASE="$unix_path"
16073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16075    VS100BASE="$unix_path"
16076  fi
16077
16078    if test -d "$VS100BASE"; then
16079      if test -f "$VS100BASE/$VCVARSFILE"; then
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16081$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16082        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16083      else
16084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16085$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16086        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16087$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16088      fi
16089    fi
16090  fi
16091
16092  fi
16093
16094  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16095    # Having specified an argument which is incorrect will produce an instant failure;
16096    # we should not go on looking
16097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16098$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16099    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16100$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16101    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16102  fi
16103
16104  if test "x$ProgramW6432" != x; then
16105
16106  if test "x$VS_ENV_CMD" = x; then
16107    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16108    METHOD="well-known name"
16109
16110  windows_path="$WIN_SDK_BASE"
16111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16112    unix_path=`$CYGPATH -u "$windows_path"`
16113    WIN_SDK_BASE="$unix_path"
16114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16116    WIN_SDK_BASE="$unix_path"
16117  fi
16118
16119    if test -d "$WIN_SDK_BASE"; then
16120      # There have been cases of partial or broken SDK installations. A missing
16121      # lib dir is not going to work.
16122      if test ! -d "$WIN_SDK_BASE/../lib"; then
16123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16124$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16125        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16126$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16127      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16129$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16130        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16131        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16132          VS_ENV_ARGS="/x86"
16133        else
16134          VS_ENV_ARGS="/x64"
16135        fi
16136      else
16137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16140$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16141      fi
16142    fi
16143  fi
16144
16145  fi
16146  if test "x$PROGRAMW6432" != x; then
16147
16148  if test "x$VS_ENV_CMD" = x; then
16149    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16150    METHOD="well-known name"
16151
16152  windows_path="$WIN_SDK_BASE"
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154    unix_path=`$CYGPATH -u "$windows_path"`
16155    WIN_SDK_BASE="$unix_path"
16156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16158    WIN_SDK_BASE="$unix_path"
16159  fi
16160
16161    if test -d "$WIN_SDK_BASE"; then
16162      # There have been cases of partial or broken SDK installations. A missing
16163      # lib dir is not going to work.
16164      if test ! -d "$WIN_SDK_BASE/../lib"; then
16165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16168$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16169      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16170        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16171$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16172        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16173        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16174          VS_ENV_ARGS="/x86"
16175        else
16176          VS_ENV_ARGS="/x64"
16177        fi
16178      else
16179        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16180$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16182$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16183      fi
16184    fi
16185  fi
16186
16187  fi
16188  if test "x$PROGRAMFILES" != x; then
16189
16190  if test "x$VS_ENV_CMD" = x; then
16191    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16192    METHOD="well-known name"
16193
16194  windows_path="$WIN_SDK_BASE"
16195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16196    unix_path=`$CYGPATH -u "$windows_path"`
16197    WIN_SDK_BASE="$unix_path"
16198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16200    WIN_SDK_BASE="$unix_path"
16201  fi
16202
16203    if test -d "$WIN_SDK_BASE"; then
16204      # There have been cases of partial or broken SDK installations. A missing
16205      # lib dir is not going to work.
16206      if test ! -d "$WIN_SDK_BASE/../lib"; then
16207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16208$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16209        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16210$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16211      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16213$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16214        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16215        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16216          VS_ENV_ARGS="/x86"
16217        else
16218          VS_ENV_ARGS="/x64"
16219        fi
16220      else
16221        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16222$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16223        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16224$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16225      fi
16226    fi
16227  fi
16228
16229  fi
16230
16231  if test "x$VS_ENV_CMD" = x; then
16232    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16233    METHOD="well-known name"
16234
16235  windows_path="$WIN_SDK_BASE"
16236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16237    unix_path=`$CYGPATH -u "$windows_path"`
16238    WIN_SDK_BASE="$unix_path"
16239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16241    WIN_SDK_BASE="$unix_path"
16242  fi
16243
16244    if test -d "$WIN_SDK_BASE"; then
16245      # There have been cases of partial or broken SDK installations. A missing
16246      # lib dir is not going to work.
16247      if test ! -d "$WIN_SDK_BASE/../lib"; then
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16251$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16252      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16255        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16256        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16257          VS_ENV_ARGS="/x86"
16258        else
16259          VS_ENV_ARGS="/x64"
16260        fi
16261      else
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16265$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16266      fi
16267    fi
16268  fi
16269
16270
16271  if test "x$VS_ENV_CMD" = x; then
16272    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16273    METHOD="well-known name"
16274
16275  windows_path="$WIN_SDK_BASE"
16276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16277    unix_path=`$CYGPATH -u "$windows_path"`
16278    WIN_SDK_BASE="$unix_path"
16279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16281    WIN_SDK_BASE="$unix_path"
16282  fi
16283
16284    if test -d "$WIN_SDK_BASE"; then
16285      # There have been cases of partial or broken SDK installations. A missing
16286      # lib dir is not going to work.
16287      if test ! -d "$WIN_SDK_BASE/../lib"; then
16288        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16289$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16290        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16291$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16292      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16293        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16294$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16295        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16296        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16297          VS_ENV_ARGS="/x86"
16298        else
16299          VS_ENV_ARGS="/x64"
16300        fi
16301      else
16302        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16303$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16304        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16305$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16306      fi
16307    fi
16308  fi
16309
16310
16311  if test "x$VS100COMNTOOLS" != x; then
16312
16313  if test "x$VS_ENV_CMD" = x; then
16314    VS100BASE="$VS100COMNTOOLS/../.."
16315    METHOD="VS100COMNTOOLS variable"
16316
16317  windows_path="$VS100BASE"
16318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16319    unix_path=`$CYGPATH -u "$windows_path"`
16320    VS100BASE="$unix_path"
16321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16323    VS100BASE="$unix_path"
16324  fi
16325
16326    if test -d "$VS100BASE"; then
16327      if test -f "$VS100BASE/$VCVARSFILE"; then
16328        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16329$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16330        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16331      else
16332        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16333$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16334        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16335$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16336      fi
16337    fi
16338  fi
16339
16340  fi
16341  if test "x$PROGRAMFILES" != x; then
16342
16343  if test "x$VS_ENV_CMD" = x; then
16344    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16345    METHOD="well-known name"
16346
16347  windows_path="$VS100BASE"
16348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349    unix_path=`$CYGPATH -u "$windows_path"`
16350    VS100BASE="$unix_path"
16351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353    VS100BASE="$unix_path"
16354  fi
16355
16356    if test -d "$VS100BASE"; then
16357      if test -f "$VS100BASE/$VCVARSFILE"; then
16358        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16359$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16360        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16361      else
16362        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16363$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16364        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16365$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16366      fi
16367    fi
16368  fi
16369
16370  fi
16371
16372  if test "x$VS_ENV_CMD" = x; then
16373    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16374    METHOD="well-known name"
16375
16376  windows_path="$VS100BASE"
16377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378    unix_path=`$CYGPATH -u "$windows_path"`
16379    VS100BASE="$unix_path"
16380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16382    VS100BASE="$unix_path"
16383  fi
16384
16385    if test -d "$VS100BASE"; then
16386      if test -f "$VS100BASE/$VCVARSFILE"; then
16387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16388$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16389        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16390      else
16391        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16392$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16394$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16395      fi
16396    fi
16397  fi
16398
16399
16400  if test "x$VS_ENV_CMD" = x; then
16401    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16402    METHOD="well-known name"
16403
16404  windows_path="$VS100BASE"
16405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16406    unix_path=`$CYGPATH -u "$windows_path"`
16407    VS100BASE="$unix_path"
16408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16410    VS100BASE="$unix_path"
16411  fi
16412
16413    if test -d "$VS100BASE"; then
16414      if test -f "$VS100BASE/$VCVARSFILE"; then
16415        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16416$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16417        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16418      else
16419        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16420$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16421        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16422$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16423      fi
16424    fi
16425  fi
16426
16427
16428  if test "x$VS_ENV_CMD" != x; then
16429    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16430
16431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16432
16433  # First separate the path from the arguments. This will split at the first
16434  # space.
16435  complete="$VS_ENV_CMD"
16436  path="${complete%% *}"
16437  tmp="$complete EOL"
16438  arguments="${tmp#* }"
16439
16440  # Input might be given as Windows format, start by converting to
16441  # unix format.
16442  new_path=`$CYGPATH -u "$path"`
16443
16444  # Now try to locate executable using which
16445  new_path=`$WHICH "$new_path" 2> /dev/null`
16446  # bat and cmd files are not always considered executable in cygwin causing which
16447  # to not find them
16448  if test "x$new_path" = x \
16449           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16450           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16451    new_path=`$CYGPATH -u "$path"`
16452  fi
16453  if test "x$new_path" = x; then
16454    # Oops. Which didn't find the executable.
16455    # The splitting of arguments from the executable at a space might have been incorrect,
16456    # since paths with space are more likely in Windows. Give it another try with the whole
16457    # argument.
16458    path="$complete"
16459    arguments="EOL"
16460    new_path=`$CYGPATH -u "$path"`
16461    new_path=`$WHICH "$new_path" 2> /dev/null`
16462    # bat and cmd files are not always considered executable in cygwin causing which
16463    # to not find them
16464    if test "x$new_path" = x \
16465             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16466             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16467      new_path=`$CYGPATH -u "$path"`
16468    fi
16469    if test "x$new_path" = x; then
16470      # It's still not found. Now this is an unrecoverable error.
16471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16472$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16473      has_space=`$ECHO "$complete" | $GREP " "`
16474      if test "x$has_space" != x; then
16475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16477      fi
16478      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16479    fi
16480  fi
16481
16482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16485  # "foo.exe" is OK but "foo" is an error.
16486  #
16487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16488  # It is also a way to make sure we got the proper file name for the real test later on.
16489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16490  if test "x$test_shortpath" = x; then
16491    # Short path failed, file does not exist as specified.
16492    # Try adding .exe or .cmd
16493    if test -f "${new_path}.exe"; then
16494       input_to_shortpath="${new_path}.exe"
16495    elif test -f "${new_path}.cmd"; then
16496       input_to_shortpath="${new_path}.cmd"
16497    else
16498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16499$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16500      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16501$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16502      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16503    fi
16504  else
16505    input_to_shortpath="$new_path"
16506  fi
16507
16508  # Call helper function which possibly converts this using DOS-style short mode.
16509  # If so, the updated path is stored in $new_path.
16510  new_path="$input_to_shortpath"
16511
16512  input_path="$input_to_shortpath"
16513  # Check if we need to convert this using DOS-style short mode. If the path
16514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16515  # take no chances and rewrite it.
16516  # Note: m4 eats our [], so we need to use [ and ] instead.
16517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16518  if test "x$has_forbidden_chars" != x; then
16519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16523      # Going to short mode and back again did indeed matter. Since short mode is
16524      # case insensitive, let's make it lowercase to improve readability.
16525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16526      # Now convert it back to Unix-stile (cygpath)
16527      input_path=`$CYGPATH -u "$shortmode_path"`
16528      new_path="$input_path"
16529    fi
16530  fi
16531
16532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16533  if test "x$test_cygdrive_prefix" = x; then
16534    # As a simple fix, exclude /usr/bin since it's not a real path.
16535    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16537      # a path prefixed by /cygdrive for fixpath to work.
16538      new_path="$CYGWIN_ROOT_PATH$input_path"
16539    fi
16540  fi
16541
16542  # remove trailing .exe if any
16543  new_path="${new_path/%.exe/}"
16544
16545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16546
16547  # First separate the path from the arguments. This will split at the first
16548  # space.
16549  complete="$VS_ENV_CMD"
16550  path="${complete%% *}"
16551  tmp="$complete EOL"
16552  arguments="${tmp#* }"
16553
16554  # Input might be given as Windows format, start by converting to
16555  # unix format.
16556  new_path="$path"
16557
16558  windows_path="$new_path"
16559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16560    unix_path=`$CYGPATH -u "$windows_path"`
16561    new_path="$unix_path"
16562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16564    new_path="$unix_path"
16565  fi
16566
16567
16568  # Now try to locate executable using which
16569  new_path=`$WHICH "$new_path" 2> /dev/null`
16570
16571  if test "x$new_path" = x; then
16572    # Oops. Which didn't find the executable.
16573    # The splitting of arguments from the executable at a space might have been incorrect,
16574    # since paths with space are more likely in Windows. Give it another try with the whole
16575    # argument.
16576    path="$complete"
16577    arguments="EOL"
16578    new_path="$path"
16579
16580  windows_path="$new_path"
16581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16582    unix_path=`$CYGPATH -u "$windows_path"`
16583    new_path="$unix_path"
16584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16586    new_path="$unix_path"
16587  fi
16588
16589
16590    new_path=`$WHICH "$new_path" 2> /dev/null`
16591
16592    if test "x$new_path" = x; then
16593      # It's still not found. Now this is an unrecoverable error.
16594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16595$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16596      has_space=`$ECHO "$complete" | $GREP " "`
16597      if test "x$has_space" != x; then
16598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16600      fi
16601      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16602    fi
16603  fi
16604
16605  # Now new_path has a complete unix path to the binary
16606  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16607    # Keep paths in /bin as-is, but remove trailing .exe if any
16608    new_path="${new_path/%.exe/}"
16609    # Do not save /bin paths to all_fixpath_prefixes!
16610  else
16611    # Not in mixed or Windows style, start by that.
16612    new_path=`cmd //c echo $new_path`
16613
16614  input_path="$new_path"
16615  # Check if we need to convert this using DOS-style short mode. If the path
16616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16617  # take no chances and rewrite it.
16618  # Note: m4 eats our [], so we need to use [ and ] instead.
16619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16620  if test "x$has_forbidden_chars" != x; then
16621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16623  fi
16624
16625    # Output is in $new_path
16626
16627  windows_path="$new_path"
16628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16629    unix_path=`$CYGPATH -u "$windows_path"`
16630    new_path="$unix_path"
16631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16633    new_path="$unix_path"
16634  fi
16635
16636    # remove trailing .exe if any
16637    new_path="${new_path/%.exe/}"
16638
16639    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16640    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16641  fi
16642
16643  else
16644    # We're on a posix platform. Hooray! :)
16645    # First separate the path from the arguments. This will split at the first
16646    # space.
16647    complete="$VS_ENV_CMD"
16648    path="${complete%% *}"
16649    tmp="$complete EOL"
16650    arguments="${tmp#* }"
16651
16652    # Cannot rely on the command "which" here since it doesn't always work.
16653    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16654    if test -z "$is_absolute_path"; then
16655      # Path to executable is not absolute. Find it.
16656      IFS_save="$IFS"
16657      IFS=:
16658      for p in $PATH; do
16659        if test -f "$p/$path" && test -x "$p/$path"; then
16660          new_path="$p/$path"
16661          break
16662        fi
16663      done
16664      IFS="$IFS_save"
16665    else
16666      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16667$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16668      new_path="$path"
16669    fi
16670
16671    if test "x$new_path" = x; then
16672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16673$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16674        has_space=`$ECHO "$complete" | $GREP " "`
16675        if test "x$has_space" != x; then
16676          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16678        fi
16679        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16680      fi
16681  fi
16682
16683      # Now join together the path and the arguments once again
16684      if test "x$arguments" != xEOL; then
16685        new_complete="$new_path ${arguments% *}"
16686      else
16687        new_complete="$new_path"
16688      fi
16689
16690  if test "x$complete" != "x$new_complete"; then
16691      VS_ENV_CMD="$new_complete"
16692      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16693$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16694    fi
16695
16696
16697    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16699$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16700    cd $OUTPUT_ROOT
16701    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16702    # to autoconf standards.
16703
16704    #----
16705
16706    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16707    # but calculate the difference in Cygwin environment before/after running it and then
16708    # apply the diff.
16709
16710    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16711      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16712      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16713      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16714    else
16715      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16716      _dosbash=`cmd //c echo \`which bash\``
16717    fi
16718
16719    # generate the set of exported vars before/after the vs10 setup
16720    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16721    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16722    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16723    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16724
16725    # Now execute the newly created bat file.
16726    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16727    cmd /c localdevenvtmp.bat | cat
16728
16729    # apply the diff (less some non-vs10 vars named by "!")
16730    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16731    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16732    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16733
16734    # cleanup
16735    $RM localdevenvtmp*
16736    #----
16737    cd $CURDIR
16738    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16740$as_echo "no" >&6; }
16741      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16742$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16743      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16744$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16745      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16746$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16747      as_fn_error $? "Cannot continue" "$LINENO" 5
16748    fi
16749
16750    # Now set all paths and other env variables. This will allow the rest of
16751    # the configure script to find and run the compiler in the proper way.
16752    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16753$as_echo "$as_me: Setting extracted environment variables" >&6;}
16754    . $OUTPUT_ROOT/localdevenv.sh
16755  else
16756    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16757    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16758$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16759  fi
16760
16761  # At this point, we should have corrent variables in the environment, or we can't continue.
16762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16763$as_echo_n "checking for Visual Studio variables... " >&6; }
16764
16765  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16766    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16768$as_echo "present but broken" >&6; }
16769      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16770    else
16771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16772$as_echo "ok" >&6; }
16773      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16774      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16775      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16776      VS_PATH="$PATH"
16777
16778
16779
16780    fi
16781  else
16782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16783$as_echo "not found" >&6; }
16784
16785    if test "x$VS_ENV_CMD" = x; then
16786      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16787$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16788      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16789$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16790    else
16791      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16792$as_echo "$as_me: Running the extraction script failed." >&6;}
16793    fi
16794    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16795$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16796    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16797$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16798    as_fn_error $? "Cannot continue" "$LINENO" 5
16799  fi
16800
16801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16802$as_echo_n "checking for msvcr100.dll... " >&6; }
16803
16804# Check whether --with-msvcr-dll was given.
16805if test "${with_msvcr_dll+set}" = set; then :
16806  withval=$with_msvcr_dll;
16807fi
16808
16809  if test "x$with_msvcr_dll" != x; then
16810    MSVCR_DLL="$with_msvcr_dll"
16811  else
16812    if test "x$VCINSTALLDIR" != x; then
16813      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16814        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16815      else
16816        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16817        if test "x$MSVCR_DLL" = x; then
16818          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16819        fi
16820      fi
16821      if test "x$MSVCR_DLL" != x; then
16822        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16823$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16824      else
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16826$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16827      fi
16828    fi
16829    if test "x$MSVCR_DLL" = x; then
16830      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16832$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16833        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16834      fi
16835    fi
16836  fi
16837  if test "x$MSVCR_DLL" = x; then
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16839$as_echo "no" >&6; }
16840    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16841  fi
16842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16843$as_echo "$MSVCR_DLL" >&6; }
16844
16845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846
16847  # Input might be given as Windows format, start by converting to
16848  # unix format.
16849  path="$MSVCR_DLL"
16850  new_path=`$CYGPATH -u "$path"`
16851
16852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16855  # "foo.exe" is OK but "foo" is an error.
16856  #
16857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16858  # It is also a way to make sure we got the proper file name for the real test later on.
16859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16860  if test "x$test_shortpath" = x; then
16861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16862$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16863    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16864  fi
16865
16866  # Call helper function which possibly converts this using DOS-style short mode.
16867  # If so, the updated path is stored in $new_path.
16868
16869  input_path="$new_path"
16870  # Check if we need to convert this using DOS-style short mode. If the path
16871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16872  # take no chances and rewrite it.
16873  # Note: m4 eats our [], so we need to use [ and ] instead.
16874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16875  if test "x$has_forbidden_chars" != x; then
16876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16880      # Going to short mode and back again did indeed matter. Since short mode is
16881      # case insensitive, let's make it lowercase to improve readability.
16882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16883      # Now convert it back to Unix-stile (cygpath)
16884      input_path=`$CYGPATH -u "$shortmode_path"`
16885      new_path="$input_path"
16886    fi
16887  fi
16888
16889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16890  if test "x$test_cygdrive_prefix" = x; then
16891    # As a simple fix, exclude /usr/bin since it's not a real path.
16892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16894      # a path prefixed by /cygdrive for fixpath to work.
16895      new_path="$CYGWIN_ROOT_PATH$input_path"
16896    fi
16897  fi
16898
16899
16900  if test "x$path" != "x$new_path"; then
16901    MSVCR_DLL="$new_path"
16902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16903$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16904  fi
16905
16906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16907
16908  path="$MSVCR_DLL"
16909  has_colon=`$ECHO $path | $GREP ^.:`
16910  new_path="$path"
16911  if test "x$has_colon" = x; then
16912    # Not in mixed or Windows style, start by that.
16913    new_path=`cmd //c echo $path`
16914  fi
16915
16916
16917  input_path="$new_path"
16918  # Check if we need to convert this using DOS-style short mode. If the path
16919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16920  # take no chances and rewrite it.
16921  # Note: m4 eats our [], so we need to use [ and ] instead.
16922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16923  if test "x$has_forbidden_chars" != x; then
16924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16926  fi
16927
16928
16929  windows_path="$new_path"
16930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16931    unix_path=`$CYGPATH -u "$windows_path"`
16932    new_path="$unix_path"
16933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16935    new_path="$unix_path"
16936  fi
16937
16938  if test "x$path" != "x$new_path"; then
16939    MSVCR_DLL="$new_path"
16940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16941$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16942  fi
16943
16944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16946
16947  else
16948    # We're on a posix platform. Hooray! :)
16949    path="$MSVCR_DLL"
16950
16951    if test ! -f "$path" && test ! -d "$path"; then
16952      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16953    fi
16954
16955    has_space=`$ECHO "$path" | $GREP " "`
16956    if test "x$has_space" != x; then
16957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16958$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16959      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16960    fi
16961  fi
16962
16963
16964fi
16965
16966
16967
16968# If --build AND --host is set, then the configure script will find any
16969# cross compilation tools in the PATH. Cross compilation tools
16970# follows the cross compilation standard where they are prefixed with ${host}.
16971# For example the binary i686-sun-solaris2.10-gcc
16972# will cross compile for i686-sun-solaris2.10
16973# If neither of build and host is not set, then build=host and the
16974# default compiler found in the path will be used.
16975# Setting only --host, does not seem to be really supported.
16976# Please set both --build and --host if you want to cross compile.
16977
16978if test "x$COMPILE_TYPE" = "xcross"; then
16979    # Now we to find a C/C++ compiler that can build executables for the build
16980    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16981    # once. Also, we need to do this before adding a tools dir to the path,
16982    # otherwise we might pick up cross-compilers which don't use standard naming.
16983    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16984    # to wait until they are properly discovered.
16985    for ac_prog in cl cc gcc
16986do
16987  # Extract the first word of "$ac_prog", so it can be a program name with args.
16988set dummy $ac_prog; ac_word=$2
16989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16990$as_echo_n "checking for $ac_word... " >&6; }
16991if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16992  $as_echo_n "(cached) " >&6
16993else
16994  case $BUILD_CC in
16995  [\\/]* | ?:[\\/]*)
16996  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16997  ;;
16998  *)
16999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17000for as_dir in $PATH
17001do
17002  IFS=$as_save_IFS
17003  test -z "$as_dir" && as_dir=.
17004    for ac_exec_ext in '' $ac_executable_extensions; do
17005  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17006    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17008    break 2
17009  fi
17010done
17011  done
17012IFS=$as_save_IFS
17013
17014  ;;
17015esac
17016fi
17017BUILD_CC=$ac_cv_path_BUILD_CC
17018if test -n "$BUILD_CC"; then
17019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17020$as_echo "$BUILD_CC" >&6; }
17021else
17022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17023$as_echo "no" >&6; }
17024fi
17025
17026
17027  test -n "$BUILD_CC" && break
17028done
17029
17030
17031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17032
17033  # First separate the path from the arguments. This will split at the first
17034  # space.
17035  complete="$BUILD_CC"
17036  path="${complete%% *}"
17037  tmp="$complete EOL"
17038  arguments="${tmp#* }"
17039
17040  # Input might be given as Windows format, start by converting to
17041  # unix format.
17042  new_path=`$CYGPATH -u "$path"`
17043
17044  # Now try to locate executable using which
17045  new_path=`$WHICH "$new_path" 2> /dev/null`
17046  # bat and cmd files are not always considered executable in cygwin causing which
17047  # to not find them
17048  if test "x$new_path" = x \
17049           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17050           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17051    new_path=`$CYGPATH -u "$path"`
17052  fi
17053  if test "x$new_path" = x; then
17054    # Oops. Which didn't find the executable.
17055    # The splitting of arguments from the executable at a space might have been incorrect,
17056    # since paths with space are more likely in Windows. Give it another try with the whole
17057    # argument.
17058    path="$complete"
17059    arguments="EOL"
17060    new_path=`$CYGPATH -u "$path"`
17061    new_path=`$WHICH "$new_path" 2> /dev/null`
17062    # bat and cmd files are not always considered executable in cygwin causing which
17063    # to not find them
17064    if test "x$new_path" = x \
17065             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17066             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17067      new_path=`$CYGPATH -u "$path"`
17068    fi
17069    if test "x$new_path" = x; then
17070      # It's still not found. Now this is an unrecoverable error.
17071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17072$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17073      has_space=`$ECHO "$complete" | $GREP " "`
17074      if test "x$has_space" != x; then
17075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17077      fi
17078      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17079    fi
17080  fi
17081
17082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17085  # "foo.exe" is OK but "foo" is an error.
17086  #
17087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17088  # It is also a way to make sure we got the proper file name for the real test later on.
17089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17090  if test "x$test_shortpath" = x; then
17091    # Short path failed, file does not exist as specified.
17092    # Try adding .exe or .cmd
17093    if test -f "${new_path}.exe"; then
17094       input_to_shortpath="${new_path}.exe"
17095    elif test -f "${new_path}.cmd"; then
17096       input_to_shortpath="${new_path}.cmd"
17097    else
17098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17099$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17102      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17103    fi
17104  else
17105    input_to_shortpath="$new_path"
17106  fi
17107
17108  # Call helper function which possibly converts this using DOS-style short mode.
17109  # If so, the updated path is stored in $new_path.
17110  new_path="$input_to_shortpath"
17111
17112  input_path="$input_to_shortpath"
17113  # Check if we need to convert this using DOS-style short mode. If the path
17114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17115  # take no chances and rewrite it.
17116  # Note: m4 eats our [], so we need to use [ and ] instead.
17117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17118  if test "x$has_forbidden_chars" != x; then
17119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17123      # Going to short mode and back again did indeed matter. Since short mode is
17124      # case insensitive, let's make it lowercase to improve readability.
17125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17126      # Now convert it back to Unix-stile (cygpath)
17127      input_path=`$CYGPATH -u "$shortmode_path"`
17128      new_path="$input_path"
17129    fi
17130  fi
17131
17132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17133  if test "x$test_cygdrive_prefix" = x; then
17134    # As a simple fix, exclude /usr/bin since it's not a real path.
17135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17137      # a path prefixed by /cygdrive for fixpath to work.
17138      new_path="$CYGWIN_ROOT_PATH$input_path"
17139    fi
17140  fi
17141
17142  # remove trailing .exe if any
17143  new_path="${new_path/%.exe/}"
17144
17145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17146
17147  # First separate the path from the arguments. This will split at the first
17148  # space.
17149  complete="$BUILD_CC"
17150  path="${complete%% *}"
17151  tmp="$complete EOL"
17152  arguments="${tmp#* }"
17153
17154  # Input might be given as Windows format, start by converting to
17155  # unix format.
17156  new_path="$path"
17157
17158  windows_path="$new_path"
17159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17160    unix_path=`$CYGPATH -u "$windows_path"`
17161    new_path="$unix_path"
17162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17164    new_path="$unix_path"
17165  fi
17166
17167
17168  # Now try to locate executable using which
17169  new_path=`$WHICH "$new_path" 2> /dev/null`
17170
17171  if test "x$new_path" = x; then
17172    # Oops. Which didn't find the executable.
17173    # The splitting of arguments from the executable at a space might have been incorrect,
17174    # since paths with space are more likely in Windows. Give it another try with the whole
17175    # argument.
17176    path="$complete"
17177    arguments="EOL"
17178    new_path="$path"
17179
17180  windows_path="$new_path"
17181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17182    unix_path=`$CYGPATH -u "$windows_path"`
17183    new_path="$unix_path"
17184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17186    new_path="$unix_path"
17187  fi
17188
17189
17190    new_path=`$WHICH "$new_path" 2> /dev/null`
17191
17192    if test "x$new_path" = x; then
17193      # It's still not found. Now this is an unrecoverable error.
17194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17195$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17196      has_space=`$ECHO "$complete" | $GREP " "`
17197      if test "x$has_space" != x; then
17198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17200      fi
17201      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17202    fi
17203  fi
17204
17205  # Now new_path has a complete unix path to the binary
17206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17207    # Keep paths in /bin as-is, but remove trailing .exe if any
17208    new_path="${new_path/%.exe/}"
17209    # Do not save /bin paths to all_fixpath_prefixes!
17210  else
17211    # Not in mixed or Windows style, start by that.
17212    new_path=`cmd //c echo $new_path`
17213
17214  input_path="$new_path"
17215  # Check if we need to convert this using DOS-style short mode. If the path
17216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17217  # take no chances and rewrite it.
17218  # Note: m4 eats our [], so we need to use [ and ] instead.
17219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17220  if test "x$has_forbidden_chars" != x; then
17221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17223  fi
17224
17225    # Output is in $new_path
17226
17227  windows_path="$new_path"
17228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229    unix_path=`$CYGPATH -u "$windows_path"`
17230    new_path="$unix_path"
17231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17233    new_path="$unix_path"
17234  fi
17235
17236    # remove trailing .exe if any
17237    new_path="${new_path/%.exe/}"
17238
17239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17241  fi
17242
17243  else
17244    # We're on a posix platform. Hooray! :)
17245    # First separate the path from the arguments. This will split at the first
17246    # space.
17247    complete="$BUILD_CC"
17248    path="${complete%% *}"
17249    tmp="$complete EOL"
17250    arguments="${tmp#* }"
17251
17252    # Cannot rely on the command "which" here since it doesn't always work.
17253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17254    if test -z "$is_absolute_path"; then
17255      # Path to executable is not absolute. Find it.
17256      IFS_save="$IFS"
17257      IFS=:
17258      for p in $PATH; do
17259        if test -f "$p/$path" && test -x "$p/$path"; then
17260          new_path="$p/$path"
17261          break
17262        fi
17263      done
17264      IFS="$IFS_save"
17265    else
17266      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17267$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17268      new_path="$path"
17269    fi
17270
17271    if test "x$new_path" = x; then
17272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17273$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17274        has_space=`$ECHO "$complete" | $GREP " "`
17275        if test "x$has_space" != x; then
17276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17278        fi
17279        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17280      fi
17281  fi
17282
17283      # Now join together the path and the arguments once again
17284      if test "x$arguments" != xEOL; then
17285        new_complete="$new_path ${arguments% *}"
17286      else
17287        new_complete="$new_path"
17288      fi
17289
17290  if test "x$complete" != "x$new_complete"; then
17291      BUILD_CC="$new_complete"
17292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17293$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17294    fi
17295
17296    for ac_prog in cl CC g++
17297do
17298  # Extract the first word of "$ac_prog", so it can be a program name with args.
17299set dummy $ac_prog; ac_word=$2
17300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17301$as_echo_n "checking for $ac_word... " >&6; }
17302if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17303  $as_echo_n "(cached) " >&6
17304else
17305  case $BUILD_CXX in
17306  [\\/]* | ?:[\\/]*)
17307  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17308  ;;
17309  *)
17310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17311for as_dir in $PATH
17312do
17313  IFS=$as_save_IFS
17314  test -z "$as_dir" && as_dir=.
17315    for ac_exec_ext in '' $ac_executable_extensions; do
17316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17317    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17319    break 2
17320  fi
17321done
17322  done
17323IFS=$as_save_IFS
17324
17325  ;;
17326esac
17327fi
17328BUILD_CXX=$ac_cv_path_BUILD_CXX
17329if test -n "$BUILD_CXX"; then
17330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17331$as_echo "$BUILD_CXX" >&6; }
17332else
17333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17334$as_echo "no" >&6; }
17335fi
17336
17337
17338  test -n "$BUILD_CXX" && break
17339done
17340
17341
17342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17343
17344  # First separate the path from the arguments. This will split at the first
17345  # space.
17346  complete="$BUILD_CXX"
17347  path="${complete%% *}"
17348  tmp="$complete EOL"
17349  arguments="${tmp#* }"
17350
17351  # Input might be given as Windows format, start by converting to
17352  # unix format.
17353  new_path=`$CYGPATH -u "$path"`
17354
17355  # Now try to locate executable using which
17356  new_path=`$WHICH "$new_path" 2> /dev/null`
17357  # bat and cmd files are not always considered executable in cygwin causing which
17358  # to not find them
17359  if test "x$new_path" = x \
17360           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17361           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17362    new_path=`$CYGPATH -u "$path"`
17363  fi
17364  if test "x$new_path" = x; then
17365    # Oops. Which didn't find the executable.
17366    # The splitting of arguments from the executable at a space might have been incorrect,
17367    # since paths with space are more likely in Windows. Give it another try with the whole
17368    # argument.
17369    path="$complete"
17370    arguments="EOL"
17371    new_path=`$CYGPATH -u "$path"`
17372    new_path=`$WHICH "$new_path" 2> /dev/null`
17373    # bat and cmd files are not always considered executable in cygwin causing which
17374    # to not find them
17375    if test "x$new_path" = x \
17376             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17377             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17378      new_path=`$CYGPATH -u "$path"`
17379    fi
17380    if test "x$new_path" = x; then
17381      # It's still not found. Now this is an unrecoverable error.
17382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17383$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17384      has_space=`$ECHO "$complete" | $GREP " "`
17385      if test "x$has_space" != x; then
17386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17388      fi
17389      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17390    fi
17391  fi
17392
17393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17396  # "foo.exe" is OK but "foo" is an error.
17397  #
17398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17399  # It is also a way to make sure we got the proper file name for the real test later on.
17400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17401  if test "x$test_shortpath" = x; then
17402    # Short path failed, file does not exist as specified.
17403    # Try adding .exe or .cmd
17404    if test -f "${new_path}.exe"; then
17405       input_to_shortpath="${new_path}.exe"
17406    elif test -f "${new_path}.cmd"; then
17407       input_to_shortpath="${new_path}.cmd"
17408    else
17409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17410$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17413      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17414    fi
17415  else
17416    input_to_shortpath="$new_path"
17417  fi
17418
17419  # Call helper function which possibly converts this using DOS-style short mode.
17420  # If so, the updated path is stored in $new_path.
17421  new_path="$input_to_shortpath"
17422
17423  input_path="$input_to_shortpath"
17424  # Check if we need to convert this using DOS-style short mode. If the path
17425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17426  # take no chances and rewrite it.
17427  # Note: m4 eats our [], so we need to use [ and ] instead.
17428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17429  if test "x$has_forbidden_chars" != x; then
17430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17434      # Going to short mode and back again did indeed matter. Since short mode is
17435      # case insensitive, let's make it lowercase to improve readability.
17436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17437      # Now convert it back to Unix-stile (cygpath)
17438      input_path=`$CYGPATH -u "$shortmode_path"`
17439      new_path="$input_path"
17440    fi
17441  fi
17442
17443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17444  if test "x$test_cygdrive_prefix" = x; then
17445    # As a simple fix, exclude /usr/bin since it's not a real path.
17446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17448      # a path prefixed by /cygdrive for fixpath to work.
17449      new_path="$CYGWIN_ROOT_PATH$input_path"
17450    fi
17451  fi
17452
17453  # remove trailing .exe if any
17454  new_path="${new_path/%.exe/}"
17455
17456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17457
17458  # First separate the path from the arguments. This will split at the first
17459  # space.
17460  complete="$BUILD_CXX"
17461  path="${complete%% *}"
17462  tmp="$complete EOL"
17463  arguments="${tmp#* }"
17464
17465  # Input might be given as Windows format, start by converting to
17466  # unix format.
17467  new_path="$path"
17468
17469  windows_path="$new_path"
17470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17471    unix_path=`$CYGPATH -u "$windows_path"`
17472    new_path="$unix_path"
17473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17475    new_path="$unix_path"
17476  fi
17477
17478
17479  # Now try to locate executable using which
17480  new_path=`$WHICH "$new_path" 2> /dev/null`
17481
17482  if test "x$new_path" = x; then
17483    # Oops. Which didn't find the executable.
17484    # The splitting of arguments from the executable at a space might have been incorrect,
17485    # since paths with space are more likely in Windows. Give it another try with the whole
17486    # argument.
17487    path="$complete"
17488    arguments="EOL"
17489    new_path="$path"
17490
17491  windows_path="$new_path"
17492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17493    unix_path=`$CYGPATH -u "$windows_path"`
17494    new_path="$unix_path"
17495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17497    new_path="$unix_path"
17498  fi
17499
17500
17501    new_path=`$WHICH "$new_path" 2> /dev/null`
17502
17503    if test "x$new_path" = x; then
17504      # It's still not found. Now this is an unrecoverable error.
17505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17506$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17507      has_space=`$ECHO "$complete" | $GREP " "`
17508      if test "x$has_space" != x; then
17509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17511      fi
17512      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17513    fi
17514  fi
17515
17516  # Now new_path has a complete unix path to the binary
17517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17518    # Keep paths in /bin as-is, but remove trailing .exe if any
17519    new_path="${new_path/%.exe/}"
17520    # Do not save /bin paths to all_fixpath_prefixes!
17521  else
17522    # Not in mixed or Windows style, start by that.
17523    new_path=`cmd //c echo $new_path`
17524
17525  input_path="$new_path"
17526  # Check if we need to convert this using DOS-style short mode. If the path
17527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17528  # take no chances and rewrite it.
17529  # Note: m4 eats our [], so we need to use [ and ] instead.
17530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17531  if test "x$has_forbidden_chars" != x; then
17532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17534  fi
17535
17536    # Output is in $new_path
17537
17538  windows_path="$new_path"
17539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17540    unix_path=`$CYGPATH -u "$windows_path"`
17541    new_path="$unix_path"
17542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17544    new_path="$unix_path"
17545  fi
17546
17547    # remove trailing .exe if any
17548    new_path="${new_path/%.exe/}"
17549
17550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17552  fi
17553
17554  else
17555    # We're on a posix platform. Hooray! :)
17556    # First separate the path from the arguments. This will split at the first
17557    # space.
17558    complete="$BUILD_CXX"
17559    path="${complete%% *}"
17560    tmp="$complete EOL"
17561    arguments="${tmp#* }"
17562
17563    # Cannot rely on the command "which" here since it doesn't always work.
17564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17565    if test -z "$is_absolute_path"; then
17566      # Path to executable is not absolute. Find it.
17567      IFS_save="$IFS"
17568      IFS=:
17569      for p in $PATH; do
17570        if test -f "$p/$path" && test -x "$p/$path"; then
17571          new_path="$p/$path"
17572          break
17573        fi
17574      done
17575      IFS="$IFS_save"
17576    else
17577      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17578$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17579      new_path="$path"
17580    fi
17581
17582    if test "x$new_path" = x; then
17583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17584$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17585        has_space=`$ECHO "$complete" | $GREP " "`
17586        if test "x$has_space" != x; then
17587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17589        fi
17590        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17591      fi
17592  fi
17593
17594      # Now join together the path and the arguments once again
17595      if test "x$arguments" != xEOL; then
17596        new_complete="$new_path ${arguments% *}"
17597      else
17598        new_complete="$new_path"
17599      fi
17600
17601  if test "x$complete" != "x$new_complete"; then
17602      BUILD_CXX="$new_complete"
17603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17604$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17605    fi
17606
17607    # Extract the first word of "ld", so it can be a program name with args.
17608set dummy ld; ac_word=$2
17609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17610$as_echo_n "checking for $ac_word... " >&6; }
17611if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17612  $as_echo_n "(cached) " >&6
17613else
17614  case $BUILD_LD in
17615  [\\/]* | ?:[\\/]*)
17616  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17617  ;;
17618  *)
17619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17620for as_dir in $PATH
17621do
17622  IFS=$as_save_IFS
17623  test -z "$as_dir" && as_dir=.
17624    for ac_exec_ext in '' $ac_executable_extensions; do
17625  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17626    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17628    break 2
17629  fi
17630done
17631  done
17632IFS=$as_save_IFS
17633
17634  ;;
17635esac
17636fi
17637BUILD_LD=$ac_cv_path_BUILD_LD
17638if test -n "$BUILD_LD"; then
17639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17640$as_echo "$BUILD_LD" >&6; }
17641else
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17643$as_echo "no" >&6; }
17644fi
17645
17646
17647
17648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17649
17650  # First separate the path from the arguments. This will split at the first
17651  # space.
17652  complete="$BUILD_LD"
17653  path="${complete%% *}"
17654  tmp="$complete EOL"
17655  arguments="${tmp#* }"
17656
17657  # Input might be given as Windows format, start by converting to
17658  # unix format.
17659  new_path=`$CYGPATH -u "$path"`
17660
17661  # Now try to locate executable using which
17662  new_path=`$WHICH "$new_path" 2> /dev/null`
17663  # bat and cmd files are not always considered executable in cygwin causing which
17664  # to not find them
17665  if test "x$new_path" = x \
17666           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17667           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17668    new_path=`$CYGPATH -u "$path"`
17669  fi
17670  if test "x$new_path" = x; then
17671    # Oops. Which didn't find the executable.
17672    # The splitting of arguments from the executable at a space might have been incorrect,
17673    # since paths with space are more likely in Windows. Give it another try with the whole
17674    # argument.
17675    path="$complete"
17676    arguments="EOL"
17677    new_path=`$CYGPATH -u "$path"`
17678    new_path=`$WHICH "$new_path" 2> /dev/null`
17679    # bat and cmd files are not always considered executable in cygwin causing which
17680    # to not find them
17681    if test "x$new_path" = x \
17682             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17683             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17684      new_path=`$CYGPATH -u "$path"`
17685    fi
17686    if test "x$new_path" = x; then
17687      # It's still not found. Now this is an unrecoverable error.
17688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17689$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17690      has_space=`$ECHO "$complete" | $GREP " "`
17691      if test "x$has_space" != x; then
17692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17694      fi
17695      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17696    fi
17697  fi
17698
17699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17702  # "foo.exe" is OK but "foo" is an error.
17703  #
17704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17705  # It is also a way to make sure we got the proper file name for the real test later on.
17706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17707  if test "x$test_shortpath" = x; then
17708    # Short path failed, file does not exist as specified.
17709    # Try adding .exe or .cmd
17710    if test -f "${new_path}.exe"; then
17711       input_to_shortpath="${new_path}.exe"
17712    elif test -f "${new_path}.cmd"; then
17713       input_to_shortpath="${new_path}.cmd"
17714    else
17715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17716$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17717      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17718$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17719      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17720    fi
17721  else
17722    input_to_shortpath="$new_path"
17723  fi
17724
17725  # Call helper function which possibly converts this using DOS-style short mode.
17726  # If so, the updated path is stored in $new_path.
17727  new_path="$input_to_shortpath"
17728
17729  input_path="$input_to_shortpath"
17730  # Check if we need to convert this using DOS-style short mode. If the path
17731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17732  # take no chances and rewrite it.
17733  # Note: m4 eats our [], so we need to use [ and ] instead.
17734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17735  if test "x$has_forbidden_chars" != x; then
17736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17740      # Going to short mode and back again did indeed matter. Since short mode is
17741      # case insensitive, let's make it lowercase to improve readability.
17742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17743      # Now convert it back to Unix-stile (cygpath)
17744      input_path=`$CYGPATH -u "$shortmode_path"`
17745      new_path="$input_path"
17746    fi
17747  fi
17748
17749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17750  if test "x$test_cygdrive_prefix" = x; then
17751    # As a simple fix, exclude /usr/bin since it's not a real path.
17752    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17754      # a path prefixed by /cygdrive for fixpath to work.
17755      new_path="$CYGWIN_ROOT_PATH$input_path"
17756    fi
17757  fi
17758
17759  # remove trailing .exe if any
17760  new_path="${new_path/%.exe/}"
17761
17762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17763
17764  # First separate the path from the arguments. This will split at the first
17765  # space.
17766  complete="$BUILD_LD"
17767  path="${complete%% *}"
17768  tmp="$complete EOL"
17769  arguments="${tmp#* }"
17770
17771  # Input might be given as Windows format, start by converting to
17772  # unix format.
17773  new_path="$path"
17774
17775  windows_path="$new_path"
17776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777    unix_path=`$CYGPATH -u "$windows_path"`
17778    new_path="$unix_path"
17779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17781    new_path="$unix_path"
17782  fi
17783
17784
17785  # Now try to locate executable using which
17786  new_path=`$WHICH "$new_path" 2> /dev/null`
17787
17788  if test "x$new_path" = x; then
17789    # Oops. Which didn't find the executable.
17790    # The splitting of arguments from the executable at a space might have been incorrect,
17791    # since paths with space are more likely in Windows. Give it another try with the whole
17792    # argument.
17793    path="$complete"
17794    arguments="EOL"
17795    new_path="$path"
17796
17797  windows_path="$new_path"
17798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17799    unix_path=`$CYGPATH -u "$windows_path"`
17800    new_path="$unix_path"
17801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17803    new_path="$unix_path"
17804  fi
17805
17806
17807    new_path=`$WHICH "$new_path" 2> /dev/null`
17808
17809    if test "x$new_path" = x; then
17810      # It's still not found. Now this is an unrecoverable error.
17811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17812$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17813      has_space=`$ECHO "$complete" | $GREP " "`
17814      if test "x$has_space" != x; then
17815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17817      fi
17818      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17819    fi
17820  fi
17821
17822  # Now new_path has a complete unix path to the binary
17823  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17824    # Keep paths in /bin as-is, but remove trailing .exe if any
17825    new_path="${new_path/%.exe/}"
17826    # Do not save /bin paths to all_fixpath_prefixes!
17827  else
17828    # Not in mixed or Windows style, start by that.
17829    new_path=`cmd //c echo $new_path`
17830
17831  input_path="$new_path"
17832  # Check if we need to convert this using DOS-style short mode. If the path
17833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17834  # take no chances and rewrite it.
17835  # Note: m4 eats our [], so we need to use [ and ] instead.
17836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17837  if test "x$has_forbidden_chars" != x; then
17838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17840  fi
17841
17842    # Output is in $new_path
17843
17844  windows_path="$new_path"
17845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17846    unix_path=`$CYGPATH -u "$windows_path"`
17847    new_path="$unix_path"
17848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17850    new_path="$unix_path"
17851  fi
17852
17853    # remove trailing .exe if any
17854    new_path="${new_path/%.exe/}"
17855
17856    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17857    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17858  fi
17859
17860  else
17861    # We're on a posix platform. Hooray! :)
17862    # First separate the path from the arguments. This will split at the first
17863    # space.
17864    complete="$BUILD_LD"
17865    path="${complete%% *}"
17866    tmp="$complete EOL"
17867    arguments="${tmp#* }"
17868
17869    # Cannot rely on the command "which" here since it doesn't always work.
17870    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17871    if test -z "$is_absolute_path"; then
17872      # Path to executable is not absolute. Find it.
17873      IFS_save="$IFS"
17874      IFS=:
17875      for p in $PATH; do
17876        if test -f "$p/$path" && test -x "$p/$path"; then
17877          new_path="$p/$path"
17878          break
17879        fi
17880      done
17881      IFS="$IFS_save"
17882    else
17883      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17884$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17885      new_path="$path"
17886    fi
17887
17888    if test "x$new_path" = x; then
17889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17890$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17891        has_space=`$ECHO "$complete" | $GREP " "`
17892        if test "x$has_space" != x; then
17893          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17895        fi
17896        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17897      fi
17898  fi
17899
17900      # Now join together the path and the arguments once again
17901      if test "x$arguments" != xEOL; then
17902        new_complete="$new_path ${arguments% *}"
17903      else
17904        new_complete="$new_path"
17905      fi
17906
17907  if test "x$complete" != "x$new_complete"; then
17908      BUILD_LD="$new_complete"
17909      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17910$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17911    fi
17912
17913fi
17914
17915
17916
17917
17918# If a devkit is found on the builddeps server, then prepend its path to the
17919# PATH variable. If there are cross compilers available in the devkit, these
17920# will be found by AC_PROG_CC et al.
17921DEVKIT=
17922
17923
17924    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17925        # Source the builddeps file again, to make sure it uses the latest variables!
17926        . $builddepsfile
17927        # Look for a target and build machine specific resource!
17928        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17929        if test "x$resource" = x; then
17930            # Ok, lets instead look for a target specific resource
17931            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17932        fi
17933        if test "x$resource" = x; then
17934            # Ok, lets instead look for a build specific resource
17935            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17936        fi
17937        if test "x$resource" = x; then
17938            # Ok, lets instead look for a generic resource
17939            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17940            resource=${builddep_devkit}
17941        fi
17942        if test "x$resource" != x; then
17943            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17944$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17945	    # If the resource in the builddeps.conf file is an existing directory,
17946	    # for example /java/linux/cups
17947	    if test -d ${resource}; then
17948	       depdir=${resource}
17949	    else
17950
17951# devkit is for example mymodule
17952# $resource is for example libs/general/libmymod_1_2_3.zip
17953# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17954# $with_builddeps_dir is for example /localhome/builddeps
17955# depdir is the name of the variable into which we store the depdir, eg MYMOD
17956# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17957# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17958    filename=`basename $resource`
17959    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17960    filebase=${filename%%.*}
17961    extension=${filename#*.}
17962    installdir=$with_builddeps_dir/$filebase
17963    if test ! -f $installdir/$filename.unpacked; then
17964        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17965$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17966        if test ! -d $installdir; then
17967            mkdir -p $installdir
17968        fi
17969        if test ! -d $installdir; then
17970            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17971        fi
17972        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17973        touch $tmpfile
17974        if test ! -f $tmpfile; then
17975            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17976        fi
17977
17978    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17979    # $tmpfile is the local file name for the downloaded file.
17980    VALID_TOOL=no
17981    if test "x$BDEPS_FTP" = xwget; then
17982       VALID_TOOL=yes
17983       wget -O $tmpfile $with_builddeps_server/$resource
17984    fi
17985    if test "x$BDEPS_FTP" = xlftp; then
17986       VALID_TOOL=yes
17987       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17988    fi
17989    if test "x$BDEPS_FTP" = xftp; then
17990        VALID_TOOL=yes
17991        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17992        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17993        FTPUSERPWD=${FTPSERVER%%@*}
17994        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17995            FTPUSER=${userpwd%%:*}
17996            FTPPWD=${userpwd#*@}
17997            FTPSERVER=${FTPSERVER#*@}
17998        else
17999            FTPUSER=ftp
18000            FTPPWD=ftp
18001        fi
18002        # the "pass" command does not work on some
18003        # ftp clients (read ftp.exe) but if it works,
18004        # passive mode is better!
18005        (\
18006            echo "user $FTPUSER $FTPPWD"        ;\
18007            echo "pass"                         ;\
18008            echo "bin"                          ;\
18009            echo "get $FTPPATH $tmpfile"              ;\
18010        ) | ftp -in $FTPSERVER
18011    fi
18012    if test "x$VALID_TOOL" != xyes; then
18013       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18014    fi
18015
18016        mv $tmpfile $installdir/$filename
18017        if test ! -s $installdir/$filename; then
18018            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18019        fi
18020        case "$extension" in
18021            zip)  echo "Unzipping $installdir/$filename..."
18022               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18023            ;;
18024            tar.gz) echo "Untaring $installdir/$filename..."
18025               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18026            ;;
18027            tgz) echo "Untaring $installdir/$filename..."
18028               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18029            ;;
18030            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18031            ;;
18032        esac
18033    fi
18034    if test -f $installdir/$filename.unpacked; then
18035        depdir=$installdir
18036    fi
18037
18038	    fi
18039            # Source the builddeps file again, because in the previous command, the depdir
18040            # was updated to point at the current build dependency install directory.
18041            . $builddepsfile
18042            # Now extract variables from the builddeps.conf files.
18043            theroot=${builddep_devkit_ROOT}
18044            thecflags=${builddep_devkit_CFLAGS}
18045            thelibs=${builddep_devkit_LIBS}
18046            if test "x$depdir" = x; then
18047                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18048            fi
18049            DEVKIT=$depdir
18050            if test "x$theroot" != x; then
18051               DEVKIT="$theroot"
18052            fi
18053            if test "x$thecflags" != x; then
18054               DEVKIT_CFLAGS="$thecflags"
18055            fi
18056            if test "x$thelibs" != x; then
18057               DEVKIT_LIBS="$thelibs"
18058            fi
18059            # Found devkit
18060                     PATH="$DEVKIT/bin:$PATH"
18061                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18062                     if test "x$x_includes" = "xNONE"; then
18063                         x_includes="$SYS_ROOT/usr/include/X11"
18064                     fi
18065                     if test "x$x_libraries" = "xNONE"; then
18066                         x_libraries="$SYS_ROOT/usr/lib"
18067                     fi
18068
18069
18070        fi
18071
18072    fi
18073
18074
18075if test "x$SYS_ROOT" != "x/" ; then
18076    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18077    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18078    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18079    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18080    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18081    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18082fi
18083
18084# Store the CFLAGS etal passed to the configure script.
18085ORG_CFLAGS="$CFLAGS"
18086ORG_CXXFLAGS="$CXXFLAGS"
18087ORG_OBJCFLAGS="$OBJCFLAGS"
18088
18089# autoconf magic only relies on PATH, so update it if tools dir is specified
18090OLD_PATH="$PATH"
18091if test "x$TOOLS_DIR" != x; then
18092  PATH=$TOOLS_DIR:$PATH
18093fi
18094
18095
18096### Locate C compiler (CC)
18097
18098# gcc is almost always present, but on Windows we
18099# prefer cl.exe and on Solaris we prefer CC.
18100# Thus test for them in this order.
18101if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18102  # Do not probe for cc on MacOSX.
18103  COMPILER_CHECK_LIST="cl gcc"
18104else
18105  COMPILER_CHECK_LIST="cl cc gcc"
18106fi
18107
18108
18109  COMPILER_NAME=C
18110
18111  CC=
18112  # If TOOLS_DIR is set, check for all compiler names in there first
18113  # before checking the rest of the PATH.
18114  if test -n "$TOOLS_DIR"; then
18115    PATH_save="$PATH"
18116    PATH="$TOOLS_DIR"
18117    for ac_prog in $COMPILER_CHECK_LIST
18118do
18119  # Extract the first word of "$ac_prog", so it can be a program name with args.
18120set dummy $ac_prog; ac_word=$2
18121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18122$as_echo_n "checking for $ac_word... " >&6; }
18123if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18124  $as_echo_n "(cached) " >&6
18125else
18126  case $TOOLS_DIR_CC in
18127  [\\/]* | ?:[\\/]*)
18128  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18129  ;;
18130  *)
18131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18132for as_dir in $PATH
18133do
18134  IFS=$as_save_IFS
18135  test -z "$as_dir" && as_dir=.
18136    for ac_exec_ext in '' $ac_executable_extensions; do
18137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18138    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18140    break 2
18141  fi
18142done
18143  done
18144IFS=$as_save_IFS
18145
18146  ;;
18147esac
18148fi
18149TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18150if test -n "$TOOLS_DIR_CC"; then
18151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18152$as_echo "$TOOLS_DIR_CC" >&6; }
18153else
18154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18155$as_echo "no" >&6; }
18156fi
18157
18158
18159  test -n "$TOOLS_DIR_CC" && break
18160done
18161
18162    CC=$TOOLS_DIR_CC
18163    PATH="$PATH_save"
18164  fi
18165
18166  # AC_PATH_PROGS can't be run multiple times with the same variable,
18167  # so create a new name for this run.
18168  if test "x$CC" = x; then
18169    for ac_prog in $COMPILER_CHECK_LIST
18170do
18171  # Extract the first word of "$ac_prog", so it can be a program name with args.
18172set dummy $ac_prog; ac_word=$2
18173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18174$as_echo_n "checking for $ac_word... " >&6; }
18175if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18176  $as_echo_n "(cached) " >&6
18177else
18178  case $POTENTIAL_CC in
18179  [\\/]* | ?:[\\/]*)
18180  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18181  ;;
18182  *)
18183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18184for as_dir in $PATH
18185do
18186  IFS=$as_save_IFS
18187  test -z "$as_dir" && as_dir=.
18188    for ac_exec_ext in '' $ac_executable_extensions; do
18189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18190    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18192    break 2
18193  fi
18194done
18195  done
18196IFS=$as_save_IFS
18197
18198  ;;
18199esac
18200fi
18201POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18202if test -n "$POTENTIAL_CC"; then
18203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18204$as_echo "$POTENTIAL_CC" >&6; }
18205else
18206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18207$as_echo "no" >&6; }
18208fi
18209
18210
18211  test -n "$POTENTIAL_CC" && break
18212done
18213
18214    CC=$POTENTIAL_CC
18215  fi
18216
18217  if test "x$CC" = x; then
18218
18219    # Print a helpful message on how to acquire the necessary build dependency.
18220    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18221    MISSING_DEPENDENCY=devkit
18222    PKGHANDLER_COMMAND=
18223
18224    case $PKGHANDLER in
18225	apt-get)
18226                apt_help     $MISSING_DEPENDENCY ;;
18227    yum)
18228                yum_help     $MISSING_DEPENDENCY ;;
18229	port)
18230                port_help    $MISSING_DEPENDENCY ;;
18231	pkgutil)
18232                pkgutil_help $MISSING_DEPENDENCY ;;
18233	pkgadd)
18234                pkgadd_help  $MISSING_DEPENDENCY ;;
18235    * )
18236      break ;;
18237    esac
18238
18239    if test "x$PKGHANDLER_COMMAND" != x; then
18240        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18241    fi
18242
18243      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18244  fi
18245
18246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18247
18248  # First separate the path from the arguments. This will split at the first
18249  # space.
18250  complete="$CC"
18251  path="${complete%% *}"
18252  tmp="$complete EOL"
18253  arguments="${tmp#* }"
18254
18255  # Input might be given as Windows format, start by converting to
18256  # unix format.
18257  new_path=`$CYGPATH -u "$path"`
18258
18259  # Now try to locate executable using which
18260  new_path=`$WHICH "$new_path" 2> /dev/null`
18261  # bat and cmd files are not always considered executable in cygwin causing which
18262  # to not find them
18263  if test "x$new_path" = x \
18264           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18265           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18266    new_path=`$CYGPATH -u "$path"`
18267  fi
18268  if test "x$new_path" = x; then
18269    # Oops. Which didn't find the executable.
18270    # The splitting of arguments from the executable at a space might have been incorrect,
18271    # since paths with space are more likely in Windows. Give it another try with the whole
18272    # argument.
18273    path="$complete"
18274    arguments="EOL"
18275    new_path=`$CYGPATH -u "$path"`
18276    new_path=`$WHICH "$new_path" 2> /dev/null`
18277    # bat and cmd files are not always considered executable in cygwin causing which
18278    # to not find them
18279    if test "x$new_path" = x \
18280             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18281             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18282      new_path=`$CYGPATH -u "$path"`
18283    fi
18284    if test "x$new_path" = x; then
18285      # It's still not found. Now this is an unrecoverable error.
18286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18287$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18288      has_space=`$ECHO "$complete" | $GREP " "`
18289      if test "x$has_space" != x; then
18290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18292      fi
18293      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18294    fi
18295  fi
18296
18297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18300  # "foo.exe" is OK but "foo" is an error.
18301  #
18302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18303  # It is also a way to make sure we got the proper file name for the real test later on.
18304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18305  if test "x$test_shortpath" = x; then
18306    # Short path failed, file does not exist as specified.
18307    # Try adding .exe or .cmd
18308    if test -f "${new_path}.exe"; then
18309       input_to_shortpath="${new_path}.exe"
18310    elif test -f "${new_path}.cmd"; then
18311       input_to_shortpath="${new_path}.cmd"
18312    else
18313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18314$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18317      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18318    fi
18319  else
18320    input_to_shortpath="$new_path"
18321  fi
18322
18323  # Call helper function which possibly converts this using DOS-style short mode.
18324  # If so, the updated path is stored in $new_path.
18325  new_path="$input_to_shortpath"
18326
18327  input_path="$input_to_shortpath"
18328  # Check if we need to convert this using DOS-style short mode. If the path
18329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18330  # take no chances and rewrite it.
18331  # Note: m4 eats our [], so we need to use [ and ] instead.
18332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18333  if test "x$has_forbidden_chars" != x; then
18334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18338      # Going to short mode and back again did indeed matter. Since short mode is
18339      # case insensitive, let's make it lowercase to improve readability.
18340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18341      # Now convert it back to Unix-stile (cygpath)
18342      input_path=`$CYGPATH -u "$shortmode_path"`
18343      new_path="$input_path"
18344    fi
18345  fi
18346
18347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18348  if test "x$test_cygdrive_prefix" = x; then
18349    # As a simple fix, exclude /usr/bin since it's not a real path.
18350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18352      # a path prefixed by /cygdrive for fixpath to work.
18353      new_path="$CYGWIN_ROOT_PATH$input_path"
18354    fi
18355  fi
18356
18357  # remove trailing .exe if any
18358  new_path="${new_path/%.exe/}"
18359
18360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18361
18362  # First separate the path from the arguments. This will split at the first
18363  # space.
18364  complete="$CC"
18365  path="${complete%% *}"
18366  tmp="$complete EOL"
18367  arguments="${tmp#* }"
18368
18369  # Input might be given as Windows format, start by converting to
18370  # unix format.
18371  new_path="$path"
18372
18373  windows_path="$new_path"
18374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18375    unix_path=`$CYGPATH -u "$windows_path"`
18376    new_path="$unix_path"
18377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18379    new_path="$unix_path"
18380  fi
18381
18382
18383  # Now try to locate executable using which
18384  new_path=`$WHICH "$new_path" 2> /dev/null`
18385
18386  if test "x$new_path" = x; then
18387    # Oops. Which didn't find the executable.
18388    # The splitting of arguments from the executable at a space might have been incorrect,
18389    # since paths with space are more likely in Windows. Give it another try with the whole
18390    # argument.
18391    path="$complete"
18392    arguments="EOL"
18393    new_path="$path"
18394
18395  windows_path="$new_path"
18396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18397    unix_path=`$CYGPATH -u "$windows_path"`
18398    new_path="$unix_path"
18399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18401    new_path="$unix_path"
18402  fi
18403
18404
18405    new_path=`$WHICH "$new_path" 2> /dev/null`
18406
18407    if test "x$new_path" = x; then
18408      # It's still not found. Now this is an unrecoverable error.
18409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18410$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18411      has_space=`$ECHO "$complete" | $GREP " "`
18412      if test "x$has_space" != x; then
18413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18415      fi
18416      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18417    fi
18418  fi
18419
18420  # Now new_path has a complete unix path to the binary
18421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18422    # Keep paths in /bin as-is, but remove trailing .exe if any
18423    new_path="${new_path/%.exe/}"
18424    # Do not save /bin paths to all_fixpath_prefixes!
18425  else
18426    # Not in mixed or Windows style, start by that.
18427    new_path=`cmd //c echo $new_path`
18428
18429  input_path="$new_path"
18430  # Check if we need to convert this using DOS-style short mode. If the path
18431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18432  # take no chances and rewrite it.
18433  # Note: m4 eats our [], so we need to use [ and ] instead.
18434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18435  if test "x$has_forbidden_chars" != x; then
18436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18438  fi
18439
18440    # Output is in $new_path
18441
18442  windows_path="$new_path"
18443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18444    unix_path=`$CYGPATH -u "$windows_path"`
18445    new_path="$unix_path"
18446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18448    new_path="$unix_path"
18449  fi
18450
18451    # remove trailing .exe if any
18452    new_path="${new_path/%.exe/}"
18453
18454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18456  fi
18457
18458  else
18459    # We're on a posix platform. Hooray! :)
18460    # First separate the path from the arguments. This will split at the first
18461    # space.
18462    complete="$CC"
18463    path="${complete%% *}"
18464    tmp="$complete EOL"
18465    arguments="${tmp#* }"
18466
18467    # Cannot rely on the command "which" here since it doesn't always work.
18468    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18469    if test -z "$is_absolute_path"; then
18470      # Path to executable is not absolute. Find it.
18471      IFS_save="$IFS"
18472      IFS=:
18473      for p in $PATH; do
18474        if test -f "$p/$path" && test -x "$p/$path"; then
18475          new_path="$p/$path"
18476          break
18477        fi
18478      done
18479      IFS="$IFS_save"
18480    else
18481      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18482$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18483      new_path="$path"
18484    fi
18485
18486    if test "x$new_path" = x; then
18487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18488$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18489        has_space=`$ECHO "$complete" | $GREP " "`
18490        if test "x$has_space" != x; then
18491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18493        fi
18494        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18495      fi
18496  fi
18497
18498      # Now join together the path and the arguments once again
18499      if test "x$arguments" != xEOL; then
18500        new_complete="$new_path ${arguments% *}"
18501      else
18502        new_complete="$new_path"
18503      fi
18504
18505  if test "x$complete" != "x$new_complete"; then
18506      CC="$new_complete"
18507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18508$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18509    fi
18510
18511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18512$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18513  TEST_COMPILER="$CC"
18514
18515    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18516        # Follow a chain of symbolic links. Use readlink
18517        # where it exists, else fall back to horribly
18518        # complicated shell code.
18519        if test "x$READLINK_TESTED" != yes; then
18520            # On MacOSX there is a readlink tool with a different
18521            # purpose than the GNU readlink tool. Check the found readlink.
18522            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18523            if test "x$ISGNU" = x; then
18524                 # A readlink that we do not know how to use.
18525                 # Are there other non-GNU readlinks out there?
18526                 READLINK_TESTED=yes
18527                 READLINK=
18528            fi
18529        fi
18530
18531        if test "x$READLINK" != x; then
18532            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18533        else
18534            # Save the current directory for restoring afterwards
18535            STARTDIR=$PWD
18536            COUNTER=0
18537            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18538            sym_link_file=`$BASENAME $TEST_COMPILER`
18539            # Use the system pwd and not the shell builtin to resolve directory symlinks
18540            cd $sym_link_dir
18541            cd `$THEPWDCMD`
18542            sym_link_dir=`$THEPWDCMD`
18543            # Resolve file symlinks
18544            while test $COUNTER -lt 20; do
18545                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18546                if test "x$ISLINK" == x; then
18547                    # This is not a symbolic link! We are done!
18548                    break
18549                fi
18550                # Again resolve directory symlinks since the target of the just found
18551                # link could be in a different directory
18552                cd `$DIRNAME $ISLINK`
18553                sym_link_dir=`$THEPWDCMD`
18554                sym_link_file=`$BASENAME $ISLINK`
18555                let COUNTER=COUNTER+1
18556            done
18557            cd $STARTDIR
18558            TEST_COMPILER=$sym_link_dir/$sym_link_file
18559        fi
18560    fi
18561
18562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18563$as_echo "$TEST_COMPILER" >&6; }
18564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18565$as_echo_n "checking if CC is disguised ccache... " >&6; }
18566
18567  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18568  if test "x$COMPILER_BASENAME" = "xccache"; then
18569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18570$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18571    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18572    # We want to control ccache invocation ourselves, so ignore this cc and try
18573    # searching again.
18574
18575    # Remove the path to the fake ccache cc from the PATH
18576    RETRY_COMPILER_SAVED_PATH="$PATH"
18577    COMPILER_DIRNAME=`$DIRNAME $CC`
18578    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18579
18580    # Try again looking for our compiler
18581    if test -n "$ac_tool_prefix"; then
18582  for ac_prog in $COMPILER_CHECK_LIST
18583  do
18584    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18587$as_echo_n "checking for $ac_word... " >&6; }
18588if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18589  $as_echo_n "(cached) " >&6
18590else
18591  if test -n "$PROPER_COMPILER_CC"; then
18592  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18593else
18594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18595for as_dir in $PATH
18596do
18597  IFS=$as_save_IFS
18598  test -z "$as_dir" && as_dir=.
18599    for ac_exec_ext in '' $ac_executable_extensions; do
18600  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18601    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18603    break 2
18604  fi
18605done
18606  done
18607IFS=$as_save_IFS
18608
18609fi
18610fi
18611PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18612if test -n "$PROPER_COMPILER_CC"; then
18613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18614$as_echo "$PROPER_COMPILER_CC" >&6; }
18615else
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18617$as_echo "no" >&6; }
18618fi
18619
18620
18621    test -n "$PROPER_COMPILER_CC" && break
18622  done
18623fi
18624if test -z "$PROPER_COMPILER_CC"; then
18625  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18626  for ac_prog in $COMPILER_CHECK_LIST
18627do
18628  # Extract the first word of "$ac_prog", so it can be a program name with args.
18629set dummy $ac_prog; ac_word=$2
18630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18631$as_echo_n "checking for $ac_word... " >&6; }
18632if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18633  $as_echo_n "(cached) " >&6
18634else
18635  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18636  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18637else
18638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639for as_dir in $PATH
18640do
18641  IFS=$as_save_IFS
18642  test -z "$as_dir" && as_dir=.
18643    for ac_exec_ext in '' $ac_executable_extensions; do
18644  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18645    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647    break 2
18648  fi
18649done
18650  done
18651IFS=$as_save_IFS
18652
18653fi
18654fi
18655ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18656if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18658$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18659else
18660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18661$as_echo "no" >&6; }
18662fi
18663
18664
18665  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18666done
18667
18668  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18669    PROPER_COMPILER_CC=""
18670  else
18671    case $cross_compiling:$ac_tool_warned in
18672yes:)
18673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18675ac_tool_warned=yes ;;
18676esac
18677    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18678  fi
18679fi
18680
18681
18682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18683
18684  # First separate the path from the arguments. This will split at the first
18685  # space.
18686  complete="$PROPER_COMPILER_CC"
18687  path="${complete%% *}"
18688  tmp="$complete EOL"
18689  arguments="${tmp#* }"
18690
18691  # Input might be given as Windows format, start by converting to
18692  # unix format.
18693  new_path=`$CYGPATH -u "$path"`
18694
18695  # Now try to locate executable using which
18696  new_path=`$WHICH "$new_path" 2> /dev/null`
18697  # bat and cmd files are not always considered executable in cygwin causing which
18698  # to not find them
18699  if test "x$new_path" = x \
18700           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18701           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18702    new_path=`$CYGPATH -u "$path"`
18703  fi
18704  if test "x$new_path" = x; then
18705    # Oops. Which didn't find the executable.
18706    # The splitting of arguments from the executable at a space might have been incorrect,
18707    # since paths with space are more likely in Windows. Give it another try with the whole
18708    # argument.
18709    path="$complete"
18710    arguments="EOL"
18711    new_path=`$CYGPATH -u "$path"`
18712    new_path=`$WHICH "$new_path" 2> /dev/null`
18713    # bat and cmd files are not always considered executable in cygwin causing which
18714    # to not find them
18715    if test "x$new_path" = x \
18716             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18717             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18718      new_path=`$CYGPATH -u "$path"`
18719    fi
18720    if test "x$new_path" = x; then
18721      # It's still not found. Now this is an unrecoverable error.
18722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18723$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18724      has_space=`$ECHO "$complete" | $GREP " "`
18725      if test "x$has_space" != x; then
18726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18728      fi
18729      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18730    fi
18731  fi
18732
18733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18736  # "foo.exe" is OK but "foo" is an error.
18737  #
18738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18739  # It is also a way to make sure we got the proper file name for the real test later on.
18740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18741  if test "x$test_shortpath" = x; then
18742    # Short path failed, file does not exist as specified.
18743    # Try adding .exe or .cmd
18744    if test -f "${new_path}.exe"; then
18745       input_to_shortpath="${new_path}.exe"
18746    elif test -f "${new_path}.cmd"; then
18747       input_to_shortpath="${new_path}.cmd"
18748    else
18749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18750$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18753      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18754    fi
18755  else
18756    input_to_shortpath="$new_path"
18757  fi
18758
18759  # Call helper function which possibly converts this using DOS-style short mode.
18760  # If so, the updated path is stored in $new_path.
18761  new_path="$input_to_shortpath"
18762
18763  input_path="$input_to_shortpath"
18764  # Check if we need to convert this using DOS-style short mode. If the path
18765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18766  # take no chances and rewrite it.
18767  # Note: m4 eats our [], so we need to use [ and ] instead.
18768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18769  if test "x$has_forbidden_chars" != x; then
18770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18774      # Going to short mode and back again did indeed matter. Since short mode is
18775      # case insensitive, let's make it lowercase to improve readability.
18776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18777      # Now convert it back to Unix-stile (cygpath)
18778      input_path=`$CYGPATH -u "$shortmode_path"`
18779      new_path="$input_path"
18780    fi
18781  fi
18782
18783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18784  if test "x$test_cygdrive_prefix" = x; then
18785    # As a simple fix, exclude /usr/bin since it's not a real path.
18786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18788      # a path prefixed by /cygdrive for fixpath to work.
18789      new_path="$CYGWIN_ROOT_PATH$input_path"
18790    fi
18791  fi
18792
18793  # remove trailing .exe if any
18794  new_path="${new_path/%.exe/}"
18795
18796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18797
18798  # First separate the path from the arguments. This will split at the first
18799  # space.
18800  complete="$PROPER_COMPILER_CC"
18801  path="${complete%% *}"
18802  tmp="$complete EOL"
18803  arguments="${tmp#* }"
18804
18805  # Input might be given as Windows format, start by converting to
18806  # unix format.
18807  new_path="$path"
18808
18809  windows_path="$new_path"
18810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18811    unix_path=`$CYGPATH -u "$windows_path"`
18812    new_path="$unix_path"
18813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18815    new_path="$unix_path"
18816  fi
18817
18818
18819  # Now try to locate executable using which
18820  new_path=`$WHICH "$new_path" 2> /dev/null`
18821
18822  if test "x$new_path" = x; then
18823    # Oops. Which didn't find the executable.
18824    # The splitting of arguments from the executable at a space might have been incorrect,
18825    # since paths with space are more likely in Windows. Give it another try with the whole
18826    # argument.
18827    path="$complete"
18828    arguments="EOL"
18829    new_path="$path"
18830
18831  windows_path="$new_path"
18832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18833    unix_path=`$CYGPATH -u "$windows_path"`
18834    new_path="$unix_path"
18835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18837    new_path="$unix_path"
18838  fi
18839
18840
18841    new_path=`$WHICH "$new_path" 2> /dev/null`
18842
18843    if test "x$new_path" = x; then
18844      # It's still not found. Now this is an unrecoverable error.
18845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18846$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18847      has_space=`$ECHO "$complete" | $GREP " "`
18848      if test "x$has_space" != x; then
18849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18851      fi
18852      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18853    fi
18854  fi
18855
18856  # Now new_path has a complete unix path to the binary
18857  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18858    # Keep paths in /bin as-is, but remove trailing .exe if any
18859    new_path="${new_path/%.exe/}"
18860    # Do not save /bin paths to all_fixpath_prefixes!
18861  else
18862    # Not in mixed or Windows style, start by that.
18863    new_path=`cmd //c echo $new_path`
18864
18865  input_path="$new_path"
18866  # Check if we need to convert this using DOS-style short mode. If the path
18867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18868  # take no chances and rewrite it.
18869  # Note: m4 eats our [], so we need to use [ and ] instead.
18870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18871  if test "x$has_forbidden_chars" != x; then
18872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18874  fi
18875
18876    # Output is in $new_path
18877
18878  windows_path="$new_path"
18879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18880    unix_path=`$CYGPATH -u "$windows_path"`
18881    new_path="$unix_path"
18882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18884    new_path="$unix_path"
18885  fi
18886
18887    # remove trailing .exe if any
18888    new_path="${new_path/%.exe/}"
18889
18890    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18891    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18892  fi
18893
18894  else
18895    # We're on a posix platform. Hooray! :)
18896    # First separate the path from the arguments. This will split at the first
18897    # space.
18898    complete="$PROPER_COMPILER_CC"
18899    path="${complete%% *}"
18900    tmp="$complete EOL"
18901    arguments="${tmp#* }"
18902
18903    # Cannot rely on the command "which" here since it doesn't always work.
18904    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18905    if test -z "$is_absolute_path"; then
18906      # Path to executable is not absolute. Find it.
18907      IFS_save="$IFS"
18908      IFS=:
18909      for p in $PATH; do
18910        if test -f "$p/$path" && test -x "$p/$path"; then
18911          new_path="$p/$path"
18912          break
18913        fi
18914      done
18915      IFS="$IFS_save"
18916    else
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18918$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18919      new_path="$path"
18920    fi
18921
18922    if test "x$new_path" = x; then
18923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18924$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18925        has_space=`$ECHO "$complete" | $GREP " "`
18926        if test "x$has_space" != x; then
18927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18929        fi
18930        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18931      fi
18932  fi
18933
18934      # Now join together the path and the arguments once again
18935      if test "x$arguments" != xEOL; then
18936        new_complete="$new_path ${arguments% *}"
18937      else
18938        new_complete="$new_path"
18939      fi
18940
18941  if test "x$complete" != "x$new_complete"; then
18942      PROPER_COMPILER_CC="$new_complete"
18943      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18944$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18945    fi
18946
18947    PATH="$RETRY_COMPILER_SAVED_PATH"
18948
18949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18950$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18951
18952    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18953        # Follow a chain of symbolic links. Use readlink
18954        # where it exists, else fall back to horribly
18955        # complicated shell code.
18956        if test "x$READLINK_TESTED" != yes; then
18957            # On MacOSX there is a readlink tool with a different
18958            # purpose than the GNU readlink tool. Check the found readlink.
18959            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18960            if test "x$ISGNU" = x; then
18961                 # A readlink that we do not know how to use.
18962                 # Are there other non-GNU readlinks out there?
18963                 READLINK_TESTED=yes
18964                 READLINK=
18965            fi
18966        fi
18967
18968        if test "x$READLINK" != x; then
18969            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18970        else
18971            # Save the current directory for restoring afterwards
18972            STARTDIR=$PWD
18973            COUNTER=0
18974            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18975            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18976            # Use the system pwd and not the shell builtin to resolve directory symlinks
18977            cd $sym_link_dir
18978            cd `$THEPWDCMD`
18979            sym_link_dir=`$THEPWDCMD`
18980            # Resolve file symlinks
18981            while test $COUNTER -lt 20; do
18982                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18983                if test "x$ISLINK" == x; then
18984                    # This is not a symbolic link! We are done!
18985                    break
18986                fi
18987                # Again resolve directory symlinks since the target of the just found
18988                # link could be in a different directory
18989                cd `$DIRNAME $ISLINK`
18990                sym_link_dir=`$THEPWDCMD`
18991                sym_link_file=`$BASENAME $ISLINK`
18992                let COUNTER=COUNTER+1
18993            done
18994            cd $STARTDIR
18995            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18996        fi
18997    fi
18998
18999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19000$as_echo "$PROPER_COMPILER_CC" >&6; }
19001    CC="$PROPER_COMPILER_CC"
19002  else
19003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19004$as_echo "no, keeping CC" >&6; }
19005    CC="$TEST_COMPILER"
19006  fi
19007
19008  COMPILER=$CC
19009  COMPILER_NAME=$COMPILER_NAME
19010
19011  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19012    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19013    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19014    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19015    if test $? -ne 0; then
19016      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19017
19018      { $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
19019$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19020      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19021$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19022      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19023    else
19024      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19025      COMPILER_VENDOR="Sun Studio"
19026    fi
19027  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19028    # First line typically looks something like:
19029    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19030    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19031    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19032    COMPILER_VENDOR="Microsoft CL.EXE"
19033    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19034    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19035      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19036        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19037      fi
19038    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19039      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19040        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19041      fi
19042    fi
19043  else
19044    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19045    # Check that this is likely to be GCC.
19046    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19047    if test $? -ne 0; then
19048      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19049$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19050      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19051$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19052      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19053    fi
19054
19055    # First line typically looks something like:
19056    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19057    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19058    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19059  fi
19060  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19061  CC_VERSION="$COMPILER_VERSION"
19062  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19063  CC_VENDOR="$COMPILER_VENDOR"
19064
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19066$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19067
19068
19069# Now that we have resolved CC ourself, let autoconf have it's go at it
19070ac_ext=c
19071ac_cpp='$CPP $CPPFLAGS'
19072ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19073ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19074ac_compiler_gnu=$ac_cv_c_compiler_gnu
19075if test -n "$ac_tool_prefix"; then
19076  for ac_prog in $CC
19077  do
19078    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19079set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19081$as_echo_n "checking for $ac_word... " >&6; }
19082if test "${ac_cv_prog_CC+set}" = set; then :
19083  $as_echo_n "(cached) " >&6
19084else
19085  if test -n "$CC"; then
19086  ac_cv_prog_CC="$CC" # Let the user override the test.
19087else
19088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19089for as_dir in $PATH
19090do
19091  IFS=$as_save_IFS
19092  test -z "$as_dir" && as_dir=.
19093    for ac_exec_ext in '' $ac_executable_extensions; do
19094  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19095    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19097    break 2
19098  fi
19099done
19100  done
19101IFS=$as_save_IFS
19102
19103fi
19104fi
19105CC=$ac_cv_prog_CC
19106if test -n "$CC"; then
19107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19108$as_echo "$CC" >&6; }
19109else
19110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19111$as_echo "no" >&6; }
19112fi
19113
19114
19115    test -n "$CC" && break
19116  done
19117fi
19118if test -z "$CC"; then
19119  ac_ct_CC=$CC
19120  for ac_prog in $CC
19121do
19122  # Extract the first word of "$ac_prog", so it can be a program name with args.
19123set dummy $ac_prog; ac_word=$2
19124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19125$as_echo_n "checking for $ac_word... " >&6; }
19126if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19127  $as_echo_n "(cached) " >&6
19128else
19129  if test -n "$ac_ct_CC"; then
19130  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19131else
19132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19133for as_dir in $PATH
19134do
19135  IFS=$as_save_IFS
19136  test -z "$as_dir" && as_dir=.
19137    for ac_exec_ext in '' $ac_executable_extensions; do
19138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19139    ac_cv_prog_ac_ct_CC="$ac_prog"
19140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19141    break 2
19142  fi
19143done
19144  done
19145IFS=$as_save_IFS
19146
19147fi
19148fi
19149ac_ct_CC=$ac_cv_prog_ac_ct_CC
19150if test -n "$ac_ct_CC"; then
19151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19152$as_echo "$ac_ct_CC" >&6; }
19153else
19154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19155$as_echo "no" >&6; }
19156fi
19157
19158
19159  test -n "$ac_ct_CC" && break
19160done
19161
19162  if test "x$ac_ct_CC" = x; then
19163    CC=""
19164  else
19165    case $cross_compiling:$ac_tool_warned in
19166yes:)
19167{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19168$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19169ac_tool_warned=yes ;;
19170esac
19171    CC=$ac_ct_CC
19172  fi
19173fi
19174
19175
19176test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19178as_fn_error $? "no acceptable C compiler found in \$PATH
19179See \`config.log' for more details" "$LINENO" 5 ; }
19180
19181# Provide some information about the compiler.
19182$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19183set X $ac_compile
19184ac_compiler=$2
19185for ac_option in --version -v -V -qversion; do
19186  { { ac_try="$ac_compiler $ac_option >&5"
19187case "(($ac_try" in
19188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19189  *) ac_try_echo=$ac_try;;
19190esac
19191eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19192$as_echo "$ac_try_echo"; } >&5
19193  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19194  ac_status=$?
19195  if test -s conftest.err; then
19196    sed '10a\
19197... rest of stderr output deleted ...
19198         10q' conftest.err >conftest.er1
19199    cat conftest.er1 >&5
19200  fi
19201  rm -f conftest.er1 conftest.err
19202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19203  test $ac_status = 0; }
19204done
19205
19206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19207/* end confdefs.h.  */
19208
19209int
19210main ()
19211{
19212
19213  ;
19214  return 0;
19215}
19216_ACEOF
19217ac_clean_files_save=$ac_clean_files
19218ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19219# Try to create an executable without -o first, disregard a.out.
19220# It will help us diagnose broken compilers, and finding out an intuition
19221# of exeext.
19222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19223$as_echo_n "checking whether the C compiler works... " >&6; }
19224ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19225
19226# The possible output files:
19227ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19228
19229ac_rmfiles=
19230for ac_file in $ac_files
19231do
19232  case $ac_file in
19233    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19234    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19235  esac
19236done
19237rm -f $ac_rmfiles
19238
19239if { { ac_try="$ac_link_default"
19240case "(($ac_try" in
19241  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19242  *) ac_try_echo=$ac_try;;
19243esac
19244eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19245$as_echo "$ac_try_echo"; } >&5
19246  (eval "$ac_link_default") 2>&5
19247  ac_status=$?
19248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19249  test $ac_status = 0; }; then :
19250  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19251# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19252# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19253# so that the user can short-circuit this test for compilers unknown to
19254# Autoconf.
19255for ac_file in $ac_files ''
19256do
19257  test -f "$ac_file" || continue
19258  case $ac_file in
19259    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19260	;;
19261    [ab].out )
19262	# We found the default executable, but exeext='' is most
19263	# certainly right.
19264	break;;
19265    *.* )
19266	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19267	then :; else
19268	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19269	fi
19270	# We set ac_cv_exeext here because the later test for it is not
19271	# safe: cross compilers may not add the suffix if given an `-o'
19272	# argument, so we may need to know it at that point already.
19273	# Even if this section looks crufty: it has the advantage of
19274	# actually working.
19275	break;;
19276    * )
19277	break;;
19278  esac
19279done
19280test "$ac_cv_exeext" = no && ac_cv_exeext=
19281
19282else
19283  ac_file=''
19284fi
19285if test -z "$ac_file"; then :
19286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19287$as_echo "no" >&6; }
19288$as_echo "$as_me: failed program was:" >&5
19289sed 's/^/| /' conftest.$ac_ext >&5
19290
19291{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19293as_fn_error 77 "C compiler cannot create executables
19294See \`config.log' for more details" "$LINENO" 5 ; }
19295else
19296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19297$as_echo "yes" >&6; }
19298fi
19299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19300$as_echo_n "checking for C compiler default output file name... " >&6; }
19301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19302$as_echo "$ac_file" >&6; }
19303ac_exeext=$ac_cv_exeext
19304
19305rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19306ac_clean_files=$ac_clean_files_save
19307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19308$as_echo_n "checking for suffix of executables... " >&6; }
19309if { { ac_try="$ac_link"
19310case "(($ac_try" in
19311  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19312  *) ac_try_echo=$ac_try;;
19313esac
19314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19315$as_echo "$ac_try_echo"; } >&5
19316  (eval "$ac_link") 2>&5
19317  ac_status=$?
19318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19319  test $ac_status = 0; }; then :
19320  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19321# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19322# work properly (i.e., refer to `conftest.exe'), while it won't with
19323# `rm'.
19324for ac_file in conftest.exe conftest conftest.*; do
19325  test -f "$ac_file" || continue
19326  case $ac_file in
19327    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19328    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19329	  break;;
19330    * ) break;;
19331  esac
19332done
19333else
19334  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19336as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19337See \`config.log' for more details" "$LINENO" 5 ; }
19338fi
19339rm -f conftest conftest$ac_cv_exeext
19340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19341$as_echo "$ac_cv_exeext" >&6; }
19342
19343rm -f conftest.$ac_ext
19344EXEEXT=$ac_cv_exeext
19345ac_exeext=$EXEEXT
19346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19347/* end confdefs.h.  */
19348#include <stdio.h>
19349int
19350main ()
19351{
19352FILE *f = fopen ("conftest.out", "w");
19353 return ferror (f) || fclose (f) != 0;
19354
19355  ;
19356  return 0;
19357}
19358_ACEOF
19359ac_clean_files="$ac_clean_files conftest.out"
19360# Check that the compiler produces executables we can run.  If not, either
19361# the compiler is broken, or we cross compile.
19362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19363$as_echo_n "checking whether we are cross compiling... " >&6; }
19364if test "$cross_compiling" != yes; then
19365  { { ac_try="$ac_link"
19366case "(($ac_try" in
19367  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19368  *) ac_try_echo=$ac_try;;
19369esac
19370eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19371$as_echo "$ac_try_echo"; } >&5
19372  (eval "$ac_link") 2>&5
19373  ac_status=$?
19374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19375  test $ac_status = 0; }
19376  if { ac_try='./conftest$ac_cv_exeext'
19377  { { case "(($ac_try" in
19378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19379  *) ac_try_echo=$ac_try;;
19380esac
19381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19382$as_echo "$ac_try_echo"; } >&5
19383  (eval "$ac_try") 2>&5
19384  ac_status=$?
19385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19386  test $ac_status = 0; }; }; then
19387    cross_compiling=no
19388  else
19389    if test "$cross_compiling" = maybe; then
19390	cross_compiling=yes
19391    else
19392	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19394as_fn_error $? "cannot run C compiled programs.
19395If you meant to cross compile, use \`--host'.
19396See \`config.log' for more details" "$LINENO" 5 ; }
19397    fi
19398  fi
19399fi
19400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19401$as_echo "$cross_compiling" >&6; }
19402
19403rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19404ac_clean_files=$ac_clean_files_save
19405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19406$as_echo_n "checking for suffix of object files... " >&6; }
19407if test "${ac_cv_objext+set}" = set; then :
19408  $as_echo_n "(cached) " >&6
19409else
19410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19411/* end confdefs.h.  */
19412
19413int
19414main ()
19415{
19416
19417  ;
19418  return 0;
19419}
19420_ACEOF
19421rm -f conftest.o conftest.obj
19422if { { ac_try="$ac_compile"
19423case "(($ac_try" in
19424  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19425  *) ac_try_echo=$ac_try;;
19426esac
19427eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19428$as_echo "$ac_try_echo"; } >&5
19429  (eval "$ac_compile") 2>&5
19430  ac_status=$?
19431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19432  test $ac_status = 0; }; then :
19433  for ac_file in conftest.o conftest.obj conftest.*; do
19434  test -f "$ac_file" || continue;
19435  case $ac_file in
19436    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19437    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19438       break;;
19439  esac
19440done
19441else
19442  $as_echo "$as_me: failed program was:" >&5
19443sed 's/^/| /' conftest.$ac_ext >&5
19444
19445{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19447as_fn_error $? "cannot compute suffix of object files: cannot compile
19448See \`config.log' for more details" "$LINENO" 5 ; }
19449fi
19450rm -f conftest.$ac_cv_objext conftest.$ac_ext
19451fi
19452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19453$as_echo "$ac_cv_objext" >&6; }
19454OBJEXT=$ac_cv_objext
19455ac_objext=$OBJEXT
19456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19457$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19458if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19459  $as_echo_n "(cached) " >&6
19460else
19461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19462/* end confdefs.h.  */
19463
19464int
19465main ()
19466{
19467#ifndef __GNUC__
19468       choke me
19469#endif
19470
19471  ;
19472  return 0;
19473}
19474_ACEOF
19475if ac_fn_c_try_compile "$LINENO"; then :
19476  ac_compiler_gnu=yes
19477else
19478  ac_compiler_gnu=no
19479fi
19480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19481ac_cv_c_compiler_gnu=$ac_compiler_gnu
19482
19483fi
19484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19485$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19486if test $ac_compiler_gnu = yes; then
19487  GCC=yes
19488else
19489  GCC=
19490fi
19491ac_test_CFLAGS=${CFLAGS+set}
19492ac_save_CFLAGS=$CFLAGS
19493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19494$as_echo_n "checking whether $CC accepts -g... " >&6; }
19495if test "${ac_cv_prog_cc_g+set}" = set; then :
19496  $as_echo_n "(cached) " >&6
19497else
19498  ac_save_c_werror_flag=$ac_c_werror_flag
19499   ac_c_werror_flag=yes
19500   ac_cv_prog_cc_g=no
19501   CFLAGS="-g"
19502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19503/* end confdefs.h.  */
19504
19505int
19506main ()
19507{
19508
19509  ;
19510  return 0;
19511}
19512_ACEOF
19513if ac_fn_c_try_compile "$LINENO"; then :
19514  ac_cv_prog_cc_g=yes
19515else
19516  CFLAGS=""
19517      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19518/* end confdefs.h.  */
19519
19520int
19521main ()
19522{
19523
19524  ;
19525  return 0;
19526}
19527_ACEOF
19528if ac_fn_c_try_compile "$LINENO"; then :
19529
19530else
19531  ac_c_werror_flag=$ac_save_c_werror_flag
19532	 CFLAGS="-g"
19533	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19534/* end confdefs.h.  */
19535
19536int
19537main ()
19538{
19539
19540  ;
19541  return 0;
19542}
19543_ACEOF
19544if ac_fn_c_try_compile "$LINENO"; then :
19545  ac_cv_prog_cc_g=yes
19546fi
19547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19548fi
19549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19550fi
19551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19552   ac_c_werror_flag=$ac_save_c_werror_flag
19553fi
19554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19555$as_echo "$ac_cv_prog_cc_g" >&6; }
19556if test "$ac_test_CFLAGS" = set; then
19557  CFLAGS=$ac_save_CFLAGS
19558elif test $ac_cv_prog_cc_g = yes; then
19559  if test "$GCC" = yes; then
19560    CFLAGS="-g -O2"
19561  else
19562    CFLAGS="-g"
19563  fi
19564else
19565  if test "$GCC" = yes; then
19566    CFLAGS="-O2"
19567  else
19568    CFLAGS=
19569  fi
19570fi
19571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19572$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19573if test "${ac_cv_prog_cc_c89+set}" = set; then :
19574  $as_echo_n "(cached) " >&6
19575else
19576  ac_cv_prog_cc_c89=no
19577ac_save_CC=$CC
19578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19579/* end confdefs.h.  */
19580#include <stdarg.h>
19581#include <stdio.h>
19582#include <sys/types.h>
19583#include <sys/stat.h>
19584/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19585struct buf { int x; };
19586FILE * (*rcsopen) (struct buf *, struct stat *, int);
19587static char *e (p, i)
19588     char **p;
19589     int i;
19590{
19591  return p[i];
19592}
19593static char *f (char * (*g) (char **, int), char **p, ...)
19594{
19595  char *s;
19596  va_list v;
19597  va_start (v,p);
19598  s = g (p, va_arg (v,int));
19599  va_end (v);
19600  return s;
19601}
19602
19603/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19604   function prototypes and stuff, but not '\xHH' hex character constants.
19605   These don't provoke an error unfortunately, instead are silently treated
19606   as 'x'.  The following induces an error, until -std is added to get
19607   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19608   array size at least.  It's necessary to write '\x00'==0 to get something
19609   that's true only with -std.  */
19610int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19611
19612/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19613   inside strings and character constants.  */
19614#define FOO(x) 'x'
19615int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19616
19617int test (int i, double x);
19618struct s1 {int (*f) (int a);};
19619struct s2 {int (*f) (double a);};
19620int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19621int argc;
19622char **argv;
19623int
19624main ()
19625{
19626return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19627  ;
19628  return 0;
19629}
19630_ACEOF
19631for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19632	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19633do
19634  CC="$ac_save_CC $ac_arg"
19635  if ac_fn_c_try_compile "$LINENO"; then :
19636  ac_cv_prog_cc_c89=$ac_arg
19637fi
19638rm -f core conftest.err conftest.$ac_objext
19639  test "x$ac_cv_prog_cc_c89" != "xno" && break
19640done
19641rm -f conftest.$ac_ext
19642CC=$ac_save_CC
19643
19644fi
19645# AC_CACHE_VAL
19646case "x$ac_cv_prog_cc_c89" in
19647  x)
19648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19649$as_echo "none needed" >&6; } ;;
19650  xno)
19651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19652$as_echo "unsupported" >&6; } ;;
19653  *)
19654    CC="$CC $ac_cv_prog_cc_c89"
19655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19656$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19657esac
19658if test "x$ac_cv_prog_cc_c89" != xno; then :
19659
19660fi
19661
19662ac_ext=cpp
19663ac_cpp='$CXXCPP $CPPFLAGS'
19664ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19665ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19666ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19667
19668
19669### Locate C++ compiler (CXX)
19670
19671if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19672  # Do not probe for CC on MacOSX.
19673  COMPILER_CHECK_LIST="cl g++"
19674else
19675  COMPILER_CHECK_LIST="cl CC g++"
19676fi
19677
19678  COMPILER_NAME=C++
19679
19680  CXX=
19681  # If TOOLS_DIR is set, check for all compiler names in there first
19682  # before checking the rest of the PATH.
19683  if test -n "$TOOLS_DIR"; then
19684    PATH_save="$PATH"
19685    PATH="$TOOLS_DIR"
19686    for ac_prog in $COMPILER_CHECK_LIST
19687do
19688  # Extract the first word of "$ac_prog", so it can be a program name with args.
19689set dummy $ac_prog; ac_word=$2
19690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19691$as_echo_n "checking for $ac_word... " >&6; }
19692if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19693  $as_echo_n "(cached) " >&6
19694else
19695  case $TOOLS_DIR_CXX in
19696  [\\/]* | ?:[\\/]*)
19697  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19698  ;;
19699  *)
19700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19701for as_dir in $PATH
19702do
19703  IFS=$as_save_IFS
19704  test -z "$as_dir" && as_dir=.
19705    for ac_exec_ext in '' $ac_executable_extensions; do
19706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19707    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19709    break 2
19710  fi
19711done
19712  done
19713IFS=$as_save_IFS
19714
19715  ;;
19716esac
19717fi
19718TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19719if test -n "$TOOLS_DIR_CXX"; then
19720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19721$as_echo "$TOOLS_DIR_CXX" >&6; }
19722else
19723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724$as_echo "no" >&6; }
19725fi
19726
19727
19728  test -n "$TOOLS_DIR_CXX" && break
19729done
19730
19731    CXX=$TOOLS_DIR_CXX
19732    PATH="$PATH_save"
19733  fi
19734
19735  # AC_PATH_PROGS can't be run multiple times with the same variable,
19736  # so create a new name for this run.
19737  if test "x$CXX" = x; then
19738    for ac_prog in $COMPILER_CHECK_LIST
19739do
19740  # Extract the first word of "$ac_prog", so it can be a program name with args.
19741set dummy $ac_prog; ac_word=$2
19742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19743$as_echo_n "checking for $ac_word... " >&6; }
19744if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19745  $as_echo_n "(cached) " >&6
19746else
19747  case $POTENTIAL_CXX in
19748  [\\/]* | ?:[\\/]*)
19749  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19750  ;;
19751  *)
19752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19753for as_dir in $PATH
19754do
19755  IFS=$as_save_IFS
19756  test -z "$as_dir" && as_dir=.
19757    for ac_exec_ext in '' $ac_executable_extensions; do
19758  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19759    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19761    break 2
19762  fi
19763done
19764  done
19765IFS=$as_save_IFS
19766
19767  ;;
19768esac
19769fi
19770POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19771if test -n "$POTENTIAL_CXX"; then
19772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19773$as_echo "$POTENTIAL_CXX" >&6; }
19774else
19775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19776$as_echo "no" >&6; }
19777fi
19778
19779
19780  test -n "$POTENTIAL_CXX" && break
19781done
19782
19783    CXX=$POTENTIAL_CXX
19784  fi
19785
19786  if test "x$CXX" = x; then
19787
19788    # Print a helpful message on how to acquire the necessary build dependency.
19789    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19790    MISSING_DEPENDENCY=devkit
19791    PKGHANDLER_COMMAND=
19792
19793    case $PKGHANDLER in
19794	apt-get)
19795                apt_help     $MISSING_DEPENDENCY ;;
19796    yum)
19797                yum_help     $MISSING_DEPENDENCY ;;
19798	port)
19799                port_help    $MISSING_DEPENDENCY ;;
19800	pkgutil)
19801                pkgutil_help $MISSING_DEPENDENCY ;;
19802	pkgadd)
19803                pkgadd_help  $MISSING_DEPENDENCY ;;
19804    * )
19805      break ;;
19806    esac
19807
19808    if test "x$PKGHANDLER_COMMAND" != x; then
19809        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19810    fi
19811
19812      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19813  fi
19814
19815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19816
19817  # First separate the path from the arguments. This will split at the first
19818  # space.
19819  complete="$CXX"
19820  path="${complete%% *}"
19821  tmp="$complete EOL"
19822  arguments="${tmp#* }"
19823
19824  # Input might be given as Windows format, start by converting to
19825  # unix format.
19826  new_path=`$CYGPATH -u "$path"`
19827
19828  # Now try to locate executable using which
19829  new_path=`$WHICH "$new_path" 2> /dev/null`
19830  # bat and cmd files are not always considered executable in cygwin causing which
19831  # to not find them
19832  if test "x$new_path" = x \
19833           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19834           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19835    new_path=`$CYGPATH -u "$path"`
19836  fi
19837  if test "x$new_path" = x; then
19838    # Oops. Which didn't find the executable.
19839    # The splitting of arguments from the executable at a space might have been incorrect,
19840    # since paths with space are more likely in Windows. Give it another try with the whole
19841    # argument.
19842    path="$complete"
19843    arguments="EOL"
19844    new_path=`$CYGPATH -u "$path"`
19845    new_path=`$WHICH "$new_path" 2> /dev/null`
19846    # bat and cmd files are not always considered executable in cygwin causing which
19847    # to not find them
19848    if test "x$new_path" = x \
19849             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19850             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19851      new_path=`$CYGPATH -u "$path"`
19852    fi
19853    if test "x$new_path" = x; then
19854      # It's still not found. Now this is an unrecoverable error.
19855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19856$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19857      has_space=`$ECHO "$complete" | $GREP " "`
19858      if test "x$has_space" != x; then
19859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19861      fi
19862      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19863    fi
19864  fi
19865
19866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19869  # "foo.exe" is OK but "foo" is an error.
19870  #
19871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19872  # It is also a way to make sure we got the proper file name for the real test later on.
19873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19874  if test "x$test_shortpath" = x; then
19875    # Short path failed, file does not exist as specified.
19876    # Try adding .exe or .cmd
19877    if test -f "${new_path}.exe"; then
19878       input_to_shortpath="${new_path}.exe"
19879    elif test -f "${new_path}.cmd"; then
19880       input_to_shortpath="${new_path}.cmd"
19881    else
19882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19883$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19884      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19885$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19886      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19887    fi
19888  else
19889    input_to_shortpath="$new_path"
19890  fi
19891
19892  # Call helper function which possibly converts this using DOS-style short mode.
19893  # If so, the updated path is stored in $new_path.
19894  new_path="$input_to_shortpath"
19895
19896  input_path="$input_to_shortpath"
19897  # Check if we need to convert this using DOS-style short mode. If the path
19898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19899  # take no chances and rewrite it.
19900  # Note: m4 eats our [], so we need to use [ and ] instead.
19901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19902  if test "x$has_forbidden_chars" != x; then
19903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19907      # Going to short mode and back again did indeed matter. Since short mode is
19908      # case insensitive, let's make it lowercase to improve readability.
19909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19910      # Now convert it back to Unix-stile (cygpath)
19911      input_path=`$CYGPATH -u "$shortmode_path"`
19912      new_path="$input_path"
19913    fi
19914  fi
19915
19916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19917  if test "x$test_cygdrive_prefix" = x; then
19918    # As a simple fix, exclude /usr/bin since it's not a real path.
19919    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19921      # a path prefixed by /cygdrive for fixpath to work.
19922      new_path="$CYGWIN_ROOT_PATH$input_path"
19923    fi
19924  fi
19925
19926  # remove trailing .exe if any
19927  new_path="${new_path/%.exe/}"
19928
19929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19930
19931  # First separate the path from the arguments. This will split at the first
19932  # space.
19933  complete="$CXX"
19934  path="${complete%% *}"
19935  tmp="$complete EOL"
19936  arguments="${tmp#* }"
19937
19938  # Input might be given as Windows format, start by converting to
19939  # unix format.
19940  new_path="$path"
19941
19942  windows_path="$new_path"
19943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19944    unix_path=`$CYGPATH -u "$windows_path"`
19945    new_path="$unix_path"
19946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19948    new_path="$unix_path"
19949  fi
19950
19951
19952  # Now try to locate executable using which
19953  new_path=`$WHICH "$new_path" 2> /dev/null`
19954
19955  if test "x$new_path" = x; then
19956    # Oops. Which didn't find the executable.
19957    # The splitting of arguments from the executable at a space might have been incorrect,
19958    # since paths with space are more likely in Windows. Give it another try with the whole
19959    # argument.
19960    path="$complete"
19961    arguments="EOL"
19962    new_path="$path"
19963
19964  windows_path="$new_path"
19965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19966    unix_path=`$CYGPATH -u "$windows_path"`
19967    new_path="$unix_path"
19968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19970    new_path="$unix_path"
19971  fi
19972
19973
19974    new_path=`$WHICH "$new_path" 2> /dev/null`
19975
19976    if test "x$new_path" = x; then
19977      # It's still not found. Now this is an unrecoverable error.
19978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19979$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19980      has_space=`$ECHO "$complete" | $GREP " "`
19981      if test "x$has_space" != x; then
19982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19984      fi
19985      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19986    fi
19987  fi
19988
19989  # Now new_path has a complete unix path to the binary
19990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19991    # Keep paths in /bin as-is, but remove trailing .exe if any
19992    new_path="${new_path/%.exe/}"
19993    # Do not save /bin paths to all_fixpath_prefixes!
19994  else
19995    # Not in mixed or Windows style, start by that.
19996    new_path=`cmd //c echo $new_path`
19997
19998  input_path="$new_path"
19999  # Check if we need to convert this using DOS-style short mode. If the path
20000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20001  # take no chances and rewrite it.
20002  # Note: m4 eats our [], so we need to use [ and ] instead.
20003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20004  if test "x$has_forbidden_chars" != x; then
20005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20007  fi
20008
20009    # Output is in $new_path
20010
20011  windows_path="$new_path"
20012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20013    unix_path=`$CYGPATH -u "$windows_path"`
20014    new_path="$unix_path"
20015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20017    new_path="$unix_path"
20018  fi
20019
20020    # remove trailing .exe if any
20021    new_path="${new_path/%.exe/}"
20022
20023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20025  fi
20026
20027  else
20028    # We're on a posix platform. Hooray! :)
20029    # First separate the path from the arguments. This will split at the first
20030    # space.
20031    complete="$CXX"
20032    path="${complete%% *}"
20033    tmp="$complete EOL"
20034    arguments="${tmp#* }"
20035
20036    # Cannot rely on the command "which" here since it doesn't always work.
20037    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20038    if test -z "$is_absolute_path"; then
20039      # Path to executable is not absolute. Find it.
20040      IFS_save="$IFS"
20041      IFS=:
20042      for p in $PATH; do
20043        if test -f "$p/$path" && test -x "$p/$path"; then
20044          new_path="$p/$path"
20045          break
20046        fi
20047      done
20048      IFS="$IFS_save"
20049    else
20050      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20051$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20052      new_path="$path"
20053    fi
20054
20055    if test "x$new_path" = x; then
20056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20057$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20058        has_space=`$ECHO "$complete" | $GREP " "`
20059        if test "x$has_space" != x; then
20060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20062        fi
20063        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20064      fi
20065  fi
20066
20067      # Now join together the path and the arguments once again
20068      if test "x$arguments" != xEOL; then
20069        new_complete="$new_path ${arguments% *}"
20070      else
20071        new_complete="$new_path"
20072      fi
20073
20074  if test "x$complete" != "x$new_complete"; then
20075      CXX="$new_complete"
20076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20077$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20078    fi
20079
20080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20081$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20082  TEST_COMPILER="$CXX"
20083
20084    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20085        # Follow a chain of symbolic links. Use readlink
20086        # where it exists, else fall back to horribly
20087        # complicated shell code.
20088        if test "x$READLINK_TESTED" != yes; then
20089            # On MacOSX there is a readlink tool with a different
20090            # purpose than the GNU readlink tool. Check the found readlink.
20091            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20092            if test "x$ISGNU" = x; then
20093                 # A readlink that we do not know how to use.
20094                 # Are there other non-GNU readlinks out there?
20095                 READLINK_TESTED=yes
20096                 READLINK=
20097            fi
20098        fi
20099
20100        if test "x$READLINK" != x; then
20101            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20102        else
20103            # Save the current directory for restoring afterwards
20104            STARTDIR=$PWD
20105            COUNTER=0
20106            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20107            sym_link_file=`$BASENAME $TEST_COMPILER`
20108            # Use the system pwd and not the shell builtin to resolve directory symlinks
20109            cd $sym_link_dir
20110            cd `$THEPWDCMD`
20111            sym_link_dir=`$THEPWDCMD`
20112            # Resolve file symlinks
20113            while test $COUNTER -lt 20; do
20114                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20115                if test "x$ISLINK" == x; then
20116                    # This is not a symbolic link! We are done!
20117                    break
20118                fi
20119                # Again resolve directory symlinks since the target of the just found
20120                # link could be in a different directory
20121                cd `$DIRNAME $ISLINK`
20122                sym_link_dir=`$THEPWDCMD`
20123                sym_link_file=`$BASENAME $ISLINK`
20124                let COUNTER=COUNTER+1
20125            done
20126            cd $STARTDIR
20127            TEST_COMPILER=$sym_link_dir/$sym_link_file
20128        fi
20129    fi
20130
20131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20132$as_echo "$TEST_COMPILER" >&6; }
20133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20134$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20135
20136  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20137  if test "x$COMPILER_BASENAME" = "xccache"; then
20138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20139$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20140    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20141    # We want to control ccache invocation ourselves, so ignore this cc and try
20142    # searching again.
20143
20144    # Remove the path to the fake ccache cc from the PATH
20145    RETRY_COMPILER_SAVED_PATH="$PATH"
20146    COMPILER_DIRNAME=`$DIRNAME $CXX`
20147    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20148
20149    # Try again looking for our compiler
20150    if test -n "$ac_tool_prefix"; then
20151  for ac_prog in $COMPILER_CHECK_LIST
20152  do
20153    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20154set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20156$as_echo_n "checking for $ac_word... " >&6; }
20157if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20158  $as_echo_n "(cached) " >&6
20159else
20160  if test -n "$PROPER_COMPILER_CXX"; then
20161  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20162else
20163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20164for as_dir in $PATH
20165do
20166  IFS=$as_save_IFS
20167  test -z "$as_dir" && as_dir=.
20168    for ac_exec_ext in '' $ac_executable_extensions; do
20169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20170    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20172    break 2
20173  fi
20174done
20175  done
20176IFS=$as_save_IFS
20177
20178fi
20179fi
20180PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20181if test -n "$PROPER_COMPILER_CXX"; then
20182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20183$as_echo "$PROPER_COMPILER_CXX" >&6; }
20184else
20185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186$as_echo "no" >&6; }
20187fi
20188
20189
20190    test -n "$PROPER_COMPILER_CXX" && break
20191  done
20192fi
20193if test -z "$PROPER_COMPILER_CXX"; then
20194  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20195  for ac_prog in $COMPILER_CHECK_LIST
20196do
20197  # Extract the first word of "$ac_prog", so it can be a program name with args.
20198set dummy $ac_prog; ac_word=$2
20199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20200$as_echo_n "checking for $ac_word... " >&6; }
20201if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20202  $as_echo_n "(cached) " >&6
20203else
20204  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20205  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20206else
20207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20208for as_dir in $PATH
20209do
20210  IFS=$as_save_IFS
20211  test -z "$as_dir" && as_dir=.
20212    for ac_exec_ext in '' $ac_executable_extensions; do
20213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20214    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20216    break 2
20217  fi
20218done
20219  done
20220IFS=$as_save_IFS
20221
20222fi
20223fi
20224ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20225if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20227$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20228else
20229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20230$as_echo "no" >&6; }
20231fi
20232
20233
20234  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20235done
20236
20237  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20238    PROPER_COMPILER_CXX=""
20239  else
20240    case $cross_compiling:$ac_tool_warned in
20241yes:)
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20244ac_tool_warned=yes ;;
20245esac
20246    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20247  fi
20248fi
20249
20250
20251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20252
20253  # First separate the path from the arguments. This will split at the first
20254  # space.
20255  complete="$PROPER_COMPILER_CXX"
20256  path="${complete%% *}"
20257  tmp="$complete EOL"
20258  arguments="${tmp#* }"
20259
20260  # Input might be given as Windows format, start by converting to
20261  # unix format.
20262  new_path=`$CYGPATH -u "$path"`
20263
20264  # Now try to locate executable using which
20265  new_path=`$WHICH "$new_path" 2> /dev/null`
20266  # bat and cmd files are not always considered executable in cygwin causing which
20267  # to not find them
20268  if test "x$new_path" = x \
20269           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20270           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20271    new_path=`$CYGPATH -u "$path"`
20272  fi
20273  if test "x$new_path" = x; then
20274    # Oops. Which didn't find the executable.
20275    # The splitting of arguments from the executable at a space might have been incorrect,
20276    # since paths with space are more likely in Windows. Give it another try with the whole
20277    # argument.
20278    path="$complete"
20279    arguments="EOL"
20280    new_path=`$CYGPATH -u "$path"`
20281    new_path=`$WHICH "$new_path" 2> /dev/null`
20282    # bat and cmd files are not always considered executable in cygwin causing which
20283    # to not find them
20284    if test "x$new_path" = x \
20285             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20286             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20287      new_path=`$CYGPATH -u "$path"`
20288    fi
20289    if test "x$new_path" = x; then
20290      # It's still not found. Now this is an unrecoverable error.
20291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20292$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20293      has_space=`$ECHO "$complete" | $GREP " "`
20294      if test "x$has_space" != x; then
20295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20297      fi
20298      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20299    fi
20300  fi
20301
20302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20305  # "foo.exe" is OK but "foo" is an error.
20306  #
20307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20308  # It is also a way to make sure we got the proper file name for the real test later on.
20309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20310  if test "x$test_shortpath" = x; then
20311    # Short path failed, file does not exist as specified.
20312    # Try adding .exe or .cmd
20313    if test -f "${new_path}.exe"; then
20314       input_to_shortpath="${new_path}.exe"
20315    elif test -f "${new_path}.cmd"; then
20316       input_to_shortpath="${new_path}.cmd"
20317    else
20318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20319$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20322      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20323    fi
20324  else
20325    input_to_shortpath="$new_path"
20326  fi
20327
20328  # Call helper function which possibly converts this using DOS-style short mode.
20329  # If so, the updated path is stored in $new_path.
20330  new_path="$input_to_shortpath"
20331
20332  input_path="$input_to_shortpath"
20333  # Check if we need to convert this using DOS-style short mode. If the path
20334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20335  # take no chances and rewrite it.
20336  # Note: m4 eats our [], so we need to use [ and ] instead.
20337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20338  if test "x$has_forbidden_chars" != x; then
20339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20343      # Going to short mode and back again did indeed matter. Since short mode is
20344      # case insensitive, let's make it lowercase to improve readability.
20345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20346      # Now convert it back to Unix-stile (cygpath)
20347      input_path=`$CYGPATH -u "$shortmode_path"`
20348      new_path="$input_path"
20349    fi
20350  fi
20351
20352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20353  if test "x$test_cygdrive_prefix" = x; then
20354    # As a simple fix, exclude /usr/bin since it's not a real path.
20355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20357      # a path prefixed by /cygdrive for fixpath to work.
20358      new_path="$CYGWIN_ROOT_PATH$input_path"
20359    fi
20360  fi
20361
20362  # remove trailing .exe if any
20363  new_path="${new_path/%.exe/}"
20364
20365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20366
20367  # First separate the path from the arguments. This will split at the first
20368  # space.
20369  complete="$PROPER_COMPILER_CXX"
20370  path="${complete%% *}"
20371  tmp="$complete EOL"
20372  arguments="${tmp#* }"
20373
20374  # Input might be given as Windows format, start by converting to
20375  # unix format.
20376  new_path="$path"
20377
20378  windows_path="$new_path"
20379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20380    unix_path=`$CYGPATH -u "$windows_path"`
20381    new_path="$unix_path"
20382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20384    new_path="$unix_path"
20385  fi
20386
20387
20388  # Now try to locate executable using which
20389  new_path=`$WHICH "$new_path" 2> /dev/null`
20390
20391  if test "x$new_path" = x; then
20392    # Oops. Which didn't find the executable.
20393    # The splitting of arguments from the executable at a space might have been incorrect,
20394    # since paths with space are more likely in Windows. Give it another try with the whole
20395    # argument.
20396    path="$complete"
20397    arguments="EOL"
20398    new_path="$path"
20399
20400  windows_path="$new_path"
20401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20402    unix_path=`$CYGPATH -u "$windows_path"`
20403    new_path="$unix_path"
20404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20406    new_path="$unix_path"
20407  fi
20408
20409
20410    new_path=`$WHICH "$new_path" 2> /dev/null`
20411
20412    if test "x$new_path" = x; then
20413      # It's still not found. Now this is an unrecoverable error.
20414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20415$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20416      has_space=`$ECHO "$complete" | $GREP " "`
20417      if test "x$has_space" != x; then
20418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20420      fi
20421      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20422    fi
20423  fi
20424
20425  # Now new_path has a complete unix path to the binary
20426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20427    # Keep paths in /bin as-is, but remove trailing .exe if any
20428    new_path="${new_path/%.exe/}"
20429    # Do not save /bin paths to all_fixpath_prefixes!
20430  else
20431    # Not in mixed or Windows style, start by that.
20432    new_path=`cmd //c echo $new_path`
20433
20434  input_path="$new_path"
20435  # Check if we need to convert this using DOS-style short mode. If the path
20436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20437  # take no chances and rewrite it.
20438  # Note: m4 eats our [], so we need to use [ and ] instead.
20439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20440  if test "x$has_forbidden_chars" != x; then
20441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20443  fi
20444
20445    # Output is in $new_path
20446
20447  windows_path="$new_path"
20448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20449    unix_path=`$CYGPATH -u "$windows_path"`
20450    new_path="$unix_path"
20451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20453    new_path="$unix_path"
20454  fi
20455
20456    # remove trailing .exe if any
20457    new_path="${new_path/%.exe/}"
20458
20459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20461  fi
20462
20463  else
20464    # We're on a posix platform. Hooray! :)
20465    # First separate the path from the arguments. This will split at the first
20466    # space.
20467    complete="$PROPER_COMPILER_CXX"
20468    path="${complete%% *}"
20469    tmp="$complete EOL"
20470    arguments="${tmp#* }"
20471
20472    # Cannot rely on the command "which" here since it doesn't always work.
20473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20474    if test -z "$is_absolute_path"; then
20475      # Path to executable is not absolute. Find it.
20476      IFS_save="$IFS"
20477      IFS=:
20478      for p in $PATH; do
20479        if test -f "$p/$path" && test -x "$p/$path"; then
20480          new_path="$p/$path"
20481          break
20482        fi
20483      done
20484      IFS="$IFS_save"
20485    else
20486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20487$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20488      new_path="$path"
20489    fi
20490
20491    if test "x$new_path" = x; then
20492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20493$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20494        has_space=`$ECHO "$complete" | $GREP " "`
20495        if test "x$has_space" != x; then
20496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20498        fi
20499        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20500      fi
20501  fi
20502
20503      # Now join together the path and the arguments once again
20504      if test "x$arguments" != xEOL; then
20505        new_complete="$new_path ${arguments% *}"
20506      else
20507        new_complete="$new_path"
20508      fi
20509
20510  if test "x$complete" != "x$new_complete"; then
20511      PROPER_COMPILER_CXX="$new_complete"
20512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20513$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20514    fi
20515
20516    PATH="$RETRY_COMPILER_SAVED_PATH"
20517
20518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20519$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20520
20521    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20522        # Follow a chain of symbolic links. Use readlink
20523        # where it exists, else fall back to horribly
20524        # complicated shell code.
20525        if test "x$READLINK_TESTED" != yes; then
20526            # On MacOSX there is a readlink tool with a different
20527            # purpose than the GNU readlink tool. Check the found readlink.
20528            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20529            if test "x$ISGNU" = x; then
20530                 # A readlink that we do not know how to use.
20531                 # Are there other non-GNU readlinks out there?
20532                 READLINK_TESTED=yes
20533                 READLINK=
20534            fi
20535        fi
20536
20537        if test "x$READLINK" != x; then
20538            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20539        else
20540            # Save the current directory for restoring afterwards
20541            STARTDIR=$PWD
20542            COUNTER=0
20543            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20544            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20545            # Use the system pwd and not the shell builtin to resolve directory symlinks
20546            cd $sym_link_dir
20547            cd `$THEPWDCMD`
20548            sym_link_dir=`$THEPWDCMD`
20549            # Resolve file symlinks
20550            while test $COUNTER -lt 20; do
20551                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20552                if test "x$ISLINK" == x; then
20553                    # This is not a symbolic link! We are done!
20554                    break
20555                fi
20556                # Again resolve directory symlinks since the target of the just found
20557                # link could be in a different directory
20558                cd `$DIRNAME $ISLINK`
20559                sym_link_dir=`$THEPWDCMD`
20560                sym_link_file=`$BASENAME $ISLINK`
20561                let COUNTER=COUNTER+1
20562            done
20563            cd $STARTDIR
20564            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20565        fi
20566    fi
20567
20568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20569$as_echo "$PROPER_COMPILER_CXX" >&6; }
20570    CXX="$PROPER_COMPILER_CXX"
20571  else
20572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20573$as_echo "no, keeping CXX" >&6; }
20574    CXX="$TEST_COMPILER"
20575  fi
20576
20577  COMPILER=$CXX
20578  COMPILER_NAME=$COMPILER_NAME
20579
20580  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20581    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20582    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20583    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20584    if test $? -ne 0; then
20585      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20586
20587      { $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
20588$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20589      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20590$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20591      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20592    else
20593      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20594      COMPILER_VENDOR="Sun Studio"
20595    fi
20596  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20597    # First line typically looks something like:
20598    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20599    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20600    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20601    COMPILER_VENDOR="Microsoft CL.EXE"
20602    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20603    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20604      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20605        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20606      fi
20607    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20608      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20609        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20610      fi
20611    fi
20612  else
20613    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20614    # Check that this is likely to be GCC.
20615    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20616    if test $? -ne 0; then
20617      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20618$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20620$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20621      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20622    fi
20623
20624    # First line typically looks something like:
20625    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20626    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20627    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20628  fi
20629  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20630  CXX_VERSION="$COMPILER_VERSION"
20631  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20632  CXX_VENDOR="$COMPILER_VENDOR"
20633
20634  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20635$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20636
20637
20638# Now that we have resolved CXX ourself, let autoconf have it's go at it
20639ac_ext=cpp
20640ac_cpp='$CXXCPP $CPPFLAGS'
20641ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20642ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20643ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20644if test -z "$CXX"; then
20645  if test -n "$CCC"; then
20646    CXX=$CCC
20647  else
20648    if test -n "$ac_tool_prefix"; then
20649  for ac_prog in $CXX
20650  do
20651    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20654$as_echo_n "checking for $ac_word... " >&6; }
20655if test "${ac_cv_prog_CXX+set}" = set; then :
20656  $as_echo_n "(cached) " >&6
20657else
20658  if test -n "$CXX"; then
20659  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20660else
20661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20662for as_dir in $PATH
20663do
20664  IFS=$as_save_IFS
20665  test -z "$as_dir" && as_dir=.
20666    for ac_exec_ext in '' $ac_executable_extensions; do
20667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20668    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20670    break 2
20671  fi
20672done
20673  done
20674IFS=$as_save_IFS
20675
20676fi
20677fi
20678CXX=$ac_cv_prog_CXX
20679if test -n "$CXX"; then
20680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20681$as_echo "$CXX" >&6; }
20682else
20683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20684$as_echo "no" >&6; }
20685fi
20686
20687
20688    test -n "$CXX" && break
20689  done
20690fi
20691if test -z "$CXX"; then
20692  ac_ct_CXX=$CXX
20693  for ac_prog in $CXX
20694do
20695  # Extract the first word of "$ac_prog", so it can be a program name with args.
20696set dummy $ac_prog; ac_word=$2
20697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20698$as_echo_n "checking for $ac_word... " >&6; }
20699if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20700  $as_echo_n "(cached) " >&6
20701else
20702  if test -n "$ac_ct_CXX"; then
20703  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20704else
20705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20706for as_dir in $PATH
20707do
20708  IFS=$as_save_IFS
20709  test -z "$as_dir" && as_dir=.
20710    for ac_exec_ext in '' $ac_executable_extensions; do
20711  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20712    ac_cv_prog_ac_ct_CXX="$ac_prog"
20713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20714    break 2
20715  fi
20716done
20717  done
20718IFS=$as_save_IFS
20719
20720fi
20721fi
20722ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20723if test -n "$ac_ct_CXX"; then
20724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20725$as_echo "$ac_ct_CXX" >&6; }
20726else
20727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20728$as_echo "no" >&6; }
20729fi
20730
20731
20732  test -n "$ac_ct_CXX" && break
20733done
20734
20735  if test "x$ac_ct_CXX" = x; then
20736    CXX="g++"
20737  else
20738    case $cross_compiling:$ac_tool_warned in
20739yes:)
20740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20742ac_tool_warned=yes ;;
20743esac
20744    CXX=$ac_ct_CXX
20745  fi
20746fi
20747
20748  fi
20749fi
20750# Provide some information about the compiler.
20751$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20752set X $ac_compile
20753ac_compiler=$2
20754for ac_option in --version -v -V -qversion; do
20755  { { ac_try="$ac_compiler $ac_option >&5"
20756case "(($ac_try" in
20757  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20758  *) ac_try_echo=$ac_try;;
20759esac
20760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20761$as_echo "$ac_try_echo"; } >&5
20762  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20763  ac_status=$?
20764  if test -s conftest.err; then
20765    sed '10a\
20766... rest of stderr output deleted ...
20767         10q' conftest.err >conftest.er1
20768    cat conftest.er1 >&5
20769  fi
20770  rm -f conftest.er1 conftest.err
20771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20772  test $ac_status = 0; }
20773done
20774
20775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20776$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20777if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20778  $as_echo_n "(cached) " >&6
20779else
20780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20781/* end confdefs.h.  */
20782
20783int
20784main ()
20785{
20786#ifndef __GNUC__
20787       choke me
20788#endif
20789
20790  ;
20791  return 0;
20792}
20793_ACEOF
20794if ac_fn_cxx_try_compile "$LINENO"; then :
20795  ac_compiler_gnu=yes
20796else
20797  ac_compiler_gnu=no
20798fi
20799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20800ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20801
20802fi
20803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20804$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20805if test $ac_compiler_gnu = yes; then
20806  GXX=yes
20807else
20808  GXX=
20809fi
20810ac_test_CXXFLAGS=${CXXFLAGS+set}
20811ac_save_CXXFLAGS=$CXXFLAGS
20812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20813$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20814if test "${ac_cv_prog_cxx_g+set}" = set; then :
20815  $as_echo_n "(cached) " >&6
20816else
20817  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20818   ac_cxx_werror_flag=yes
20819   ac_cv_prog_cxx_g=no
20820   CXXFLAGS="-g"
20821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20822/* end confdefs.h.  */
20823
20824int
20825main ()
20826{
20827
20828  ;
20829  return 0;
20830}
20831_ACEOF
20832if ac_fn_cxx_try_compile "$LINENO"; then :
20833  ac_cv_prog_cxx_g=yes
20834else
20835  CXXFLAGS=""
20836      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20837/* end confdefs.h.  */
20838
20839int
20840main ()
20841{
20842
20843  ;
20844  return 0;
20845}
20846_ACEOF
20847if ac_fn_cxx_try_compile "$LINENO"; then :
20848
20849else
20850  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20851	 CXXFLAGS="-g"
20852	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20853/* end confdefs.h.  */
20854
20855int
20856main ()
20857{
20858
20859  ;
20860  return 0;
20861}
20862_ACEOF
20863if ac_fn_cxx_try_compile "$LINENO"; then :
20864  ac_cv_prog_cxx_g=yes
20865fi
20866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20867fi
20868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20869fi
20870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20871   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20872fi
20873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20874$as_echo "$ac_cv_prog_cxx_g" >&6; }
20875if test "$ac_test_CXXFLAGS" = set; then
20876  CXXFLAGS=$ac_save_CXXFLAGS
20877elif test $ac_cv_prog_cxx_g = yes; then
20878  if test "$GXX" = yes; then
20879    CXXFLAGS="-g -O2"
20880  else
20881    CXXFLAGS="-g"
20882  fi
20883else
20884  if test "$GXX" = yes; then
20885    CXXFLAGS="-O2"
20886  else
20887    CXXFLAGS=
20888  fi
20889fi
20890ac_ext=cpp
20891ac_cpp='$CXXCPP $CPPFLAGS'
20892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20895
20896
20897### Locate other tools
20898
20899if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20900    ac_ext=m
20901ac_cpp='$OBJCPP $CPPFLAGS'
20902ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20903ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20904ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20905if test -n "$ac_tool_prefix"; then
20906  for ac_prog in gcc objcc objc cc CC
20907  do
20908    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20911$as_echo_n "checking for $ac_word... " >&6; }
20912if test "${ac_cv_prog_OBJC+set}" = set; then :
20913  $as_echo_n "(cached) " >&6
20914else
20915  if test -n "$OBJC"; then
20916  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20917else
20918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20919for as_dir in $PATH
20920do
20921  IFS=$as_save_IFS
20922  test -z "$as_dir" && as_dir=.
20923    for ac_exec_ext in '' $ac_executable_extensions; do
20924  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20925    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20927    break 2
20928  fi
20929done
20930  done
20931IFS=$as_save_IFS
20932
20933fi
20934fi
20935OBJC=$ac_cv_prog_OBJC
20936if test -n "$OBJC"; then
20937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20938$as_echo "$OBJC" >&6; }
20939else
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20941$as_echo "no" >&6; }
20942fi
20943
20944
20945    test -n "$OBJC" && break
20946  done
20947fi
20948if test -z "$OBJC"; then
20949  ac_ct_OBJC=$OBJC
20950  for ac_prog in gcc objcc objc cc CC
20951do
20952  # Extract the first word of "$ac_prog", so it can be a program name with args.
20953set dummy $ac_prog; ac_word=$2
20954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20955$as_echo_n "checking for $ac_word... " >&6; }
20956if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20957  $as_echo_n "(cached) " >&6
20958else
20959  if test -n "$ac_ct_OBJC"; then
20960  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20961else
20962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20963for as_dir in $PATH
20964do
20965  IFS=$as_save_IFS
20966  test -z "$as_dir" && as_dir=.
20967    for ac_exec_ext in '' $ac_executable_extensions; do
20968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20969    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20971    break 2
20972  fi
20973done
20974  done
20975IFS=$as_save_IFS
20976
20977fi
20978fi
20979ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20980if test -n "$ac_ct_OBJC"; then
20981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20982$as_echo "$ac_ct_OBJC" >&6; }
20983else
20984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20985$as_echo "no" >&6; }
20986fi
20987
20988
20989  test -n "$ac_ct_OBJC" && break
20990done
20991
20992  if test "x$ac_ct_OBJC" = x; then
20993    OBJC="gcc"
20994  else
20995    case $cross_compiling:$ac_tool_warned in
20996yes:)
20997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20999ac_tool_warned=yes ;;
21000esac
21001    OBJC=$ac_ct_OBJC
21002  fi
21003fi
21004
21005# Provide some information about the compiler.
21006$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21007set X $ac_compile
21008ac_compiler=$2
21009for ac_option in --version -v -V -qversion; do
21010  { { ac_try="$ac_compiler $ac_option >&5"
21011case "(($ac_try" in
21012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21013  *) ac_try_echo=$ac_try;;
21014esac
21015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21016$as_echo "$ac_try_echo"; } >&5
21017  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21018  ac_status=$?
21019  if test -s conftest.err; then
21020    sed '10a\
21021... rest of stderr output deleted ...
21022         10q' conftest.err >conftest.er1
21023    cat conftest.er1 >&5
21024  fi
21025  rm -f conftest.er1 conftest.err
21026  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21027  test $ac_status = 0; }
21028done
21029
21030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21031$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21032if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21033  $as_echo_n "(cached) " >&6
21034else
21035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21036/* end confdefs.h.  */
21037
21038int
21039main ()
21040{
21041#ifndef __GNUC__
21042       choke me
21043#endif
21044
21045  ;
21046  return 0;
21047}
21048_ACEOF
21049if ac_fn_objc_try_compile "$LINENO"; then :
21050  ac_compiler_gnu=yes
21051else
21052  ac_compiler_gnu=no
21053fi
21054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21055ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21056
21057fi
21058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21059$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21060if test $ac_compiler_gnu = yes; then
21061  GOBJC=yes
21062else
21063  GOBJC=
21064fi
21065ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21066ac_save_OBJCFLAGS=$OBJCFLAGS
21067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21068$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21069if test "${ac_cv_prog_objc_g+set}" = set; then :
21070  $as_echo_n "(cached) " >&6
21071else
21072  ac_save_objc_werror_flag=$ac_objc_werror_flag
21073   ac_objc_werror_flag=yes
21074   ac_cv_prog_objc_g=no
21075   OBJCFLAGS="-g"
21076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21077/* end confdefs.h.  */
21078
21079int
21080main ()
21081{
21082
21083  ;
21084  return 0;
21085}
21086_ACEOF
21087if ac_fn_objc_try_compile "$LINENO"; then :
21088  ac_cv_prog_objc_g=yes
21089else
21090  OBJCFLAGS=""
21091      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21092/* end confdefs.h.  */
21093
21094int
21095main ()
21096{
21097
21098  ;
21099  return 0;
21100}
21101_ACEOF
21102if ac_fn_objc_try_compile "$LINENO"; then :
21103
21104else
21105  ac_objc_werror_flag=$ac_save_objc_werror_flag
21106	 OBJCFLAGS="-g"
21107	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21108/* end confdefs.h.  */
21109
21110int
21111main ()
21112{
21113
21114  ;
21115  return 0;
21116}
21117_ACEOF
21118if ac_fn_objc_try_compile "$LINENO"; then :
21119  ac_cv_prog_objc_g=yes
21120fi
21121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21122fi
21123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21124fi
21125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21126   ac_objc_werror_flag=$ac_save_objc_werror_flag
21127fi
21128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21129$as_echo "$ac_cv_prog_objc_g" >&6; }
21130if test "$ac_test_OBJCFLAGS" = set; then
21131  OBJCFLAGS=$ac_save_OBJCFLAGS
21132elif test $ac_cv_prog_objc_g = yes; then
21133  if test "$GOBJC" = yes; then
21134    OBJCFLAGS="-g -O2"
21135  else
21136    OBJCFLAGS="-g"
21137  fi
21138else
21139  if test "$GOBJC" = yes; then
21140    OBJCFLAGS="-O2"
21141  else
21142    OBJCFLAGS=
21143  fi
21144fi
21145ac_ext=cpp
21146ac_cpp='$CXXCPP $CPPFLAGS'
21147ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21148ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21149ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21150
21151
21152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21153
21154  # First separate the path from the arguments. This will split at the first
21155  # space.
21156  complete="$OBJC"
21157  path="${complete%% *}"
21158  tmp="$complete EOL"
21159  arguments="${tmp#* }"
21160
21161  # Input might be given as Windows format, start by converting to
21162  # unix format.
21163  new_path=`$CYGPATH -u "$path"`
21164
21165  # Now try to locate executable using which
21166  new_path=`$WHICH "$new_path" 2> /dev/null`
21167  # bat and cmd files are not always considered executable in cygwin causing which
21168  # to not find them
21169  if test "x$new_path" = x \
21170           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21171           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21172    new_path=`$CYGPATH -u "$path"`
21173  fi
21174  if test "x$new_path" = x; then
21175    # Oops. Which didn't find the executable.
21176    # The splitting of arguments from the executable at a space might have been incorrect,
21177    # since paths with space are more likely in Windows. Give it another try with the whole
21178    # argument.
21179    path="$complete"
21180    arguments="EOL"
21181    new_path=`$CYGPATH -u "$path"`
21182    new_path=`$WHICH "$new_path" 2> /dev/null`
21183    # bat and cmd files are not always considered executable in cygwin causing which
21184    # to not find them
21185    if test "x$new_path" = x \
21186             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21187             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21188      new_path=`$CYGPATH -u "$path"`
21189    fi
21190    if test "x$new_path" = x; then
21191      # It's still not found. Now this is an unrecoverable error.
21192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21193$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21194      has_space=`$ECHO "$complete" | $GREP " "`
21195      if test "x$has_space" != x; then
21196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21198      fi
21199      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21200    fi
21201  fi
21202
21203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21206  # "foo.exe" is OK but "foo" is an error.
21207  #
21208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21209  # It is also a way to make sure we got the proper file name for the real test later on.
21210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21211  if test "x$test_shortpath" = x; then
21212    # Short path failed, file does not exist as specified.
21213    # Try adding .exe or .cmd
21214    if test -f "${new_path}.exe"; then
21215       input_to_shortpath="${new_path}.exe"
21216    elif test -f "${new_path}.cmd"; then
21217       input_to_shortpath="${new_path}.cmd"
21218    else
21219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21220$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21223      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21224    fi
21225  else
21226    input_to_shortpath="$new_path"
21227  fi
21228
21229  # Call helper function which possibly converts this using DOS-style short mode.
21230  # If so, the updated path is stored in $new_path.
21231  new_path="$input_to_shortpath"
21232
21233  input_path="$input_to_shortpath"
21234  # Check if we need to convert this using DOS-style short mode. If the path
21235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21236  # take no chances and rewrite it.
21237  # Note: m4 eats our [], so we need to use [ and ] instead.
21238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21239  if test "x$has_forbidden_chars" != x; then
21240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21244      # Going to short mode and back again did indeed matter. Since short mode is
21245      # case insensitive, let's make it lowercase to improve readability.
21246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21247      # Now convert it back to Unix-stile (cygpath)
21248      input_path=`$CYGPATH -u "$shortmode_path"`
21249      new_path="$input_path"
21250    fi
21251  fi
21252
21253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21254  if test "x$test_cygdrive_prefix" = x; then
21255    # As a simple fix, exclude /usr/bin since it's not a real path.
21256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21258      # a path prefixed by /cygdrive for fixpath to work.
21259      new_path="$CYGWIN_ROOT_PATH$input_path"
21260    fi
21261  fi
21262
21263  # remove trailing .exe if any
21264  new_path="${new_path/%.exe/}"
21265
21266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21267
21268  # First separate the path from the arguments. This will split at the first
21269  # space.
21270  complete="$OBJC"
21271  path="${complete%% *}"
21272  tmp="$complete EOL"
21273  arguments="${tmp#* }"
21274
21275  # Input might be given as Windows format, start by converting to
21276  # unix format.
21277  new_path="$path"
21278
21279  windows_path="$new_path"
21280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21281    unix_path=`$CYGPATH -u "$windows_path"`
21282    new_path="$unix_path"
21283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21285    new_path="$unix_path"
21286  fi
21287
21288
21289  # Now try to locate executable using which
21290  new_path=`$WHICH "$new_path" 2> /dev/null`
21291
21292  if test "x$new_path" = x; then
21293    # Oops. Which didn't find the executable.
21294    # The splitting of arguments from the executable at a space might have been incorrect,
21295    # since paths with space are more likely in Windows. Give it another try with the whole
21296    # argument.
21297    path="$complete"
21298    arguments="EOL"
21299    new_path="$path"
21300
21301  windows_path="$new_path"
21302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21303    unix_path=`$CYGPATH -u "$windows_path"`
21304    new_path="$unix_path"
21305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21307    new_path="$unix_path"
21308  fi
21309
21310
21311    new_path=`$WHICH "$new_path" 2> /dev/null`
21312
21313    if test "x$new_path" = x; then
21314      # It's still not found. Now this is an unrecoverable error.
21315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21316$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21317      has_space=`$ECHO "$complete" | $GREP " "`
21318      if test "x$has_space" != x; then
21319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21321      fi
21322      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21323    fi
21324  fi
21325
21326  # Now new_path has a complete unix path to the binary
21327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21328    # Keep paths in /bin as-is, but remove trailing .exe if any
21329    new_path="${new_path/%.exe/}"
21330    # Do not save /bin paths to all_fixpath_prefixes!
21331  else
21332    # Not in mixed or Windows style, start by that.
21333    new_path=`cmd //c echo $new_path`
21334
21335  input_path="$new_path"
21336  # Check if we need to convert this using DOS-style short mode. If the path
21337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21338  # take no chances and rewrite it.
21339  # Note: m4 eats our [], so we need to use [ and ] instead.
21340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21341  if test "x$has_forbidden_chars" != x; then
21342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21344  fi
21345
21346    # Output is in $new_path
21347
21348  windows_path="$new_path"
21349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21350    unix_path=`$CYGPATH -u "$windows_path"`
21351    new_path="$unix_path"
21352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21354    new_path="$unix_path"
21355  fi
21356
21357    # remove trailing .exe if any
21358    new_path="${new_path/%.exe/}"
21359
21360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21362  fi
21363
21364  else
21365    # We're on a posix platform. Hooray! :)
21366    # First separate the path from the arguments. This will split at the first
21367    # space.
21368    complete="$OBJC"
21369    path="${complete%% *}"
21370    tmp="$complete EOL"
21371    arguments="${tmp#* }"
21372
21373    # Cannot rely on the command "which" here since it doesn't always work.
21374    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21375    if test -z "$is_absolute_path"; then
21376      # Path to executable is not absolute. Find it.
21377      IFS_save="$IFS"
21378      IFS=:
21379      for p in $PATH; do
21380        if test -f "$p/$path" && test -x "$p/$path"; then
21381          new_path="$p/$path"
21382          break
21383        fi
21384      done
21385      IFS="$IFS_save"
21386    else
21387      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21388$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21389      new_path="$path"
21390    fi
21391
21392    if test "x$new_path" = x; then
21393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21394$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21395        has_space=`$ECHO "$complete" | $GREP " "`
21396        if test "x$has_space" != x; then
21397          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21398$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21399        fi
21400        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21401      fi
21402  fi
21403
21404      # Now join together the path and the arguments once again
21405      if test "x$arguments" != xEOL; then
21406        new_complete="$new_path ${arguments% *}"
21407      else
21408        new_complete="$new_path"
21409      fi
21410
21411  if test "x$complete" != "x$new_complete"; then
21412      OBJC="$new_complete"
21413      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21414$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21415    fi
21416
21417else
21418    OBJC=
21419fi
21420
21421# Restore the flags to the user specified values.
21422# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21423CFLAGS="$ORG_CFLAGS"
21424CXXFLAGS="$ORG_CXXFLAGS"
21425OBJCFLAGS="$ORG_OBJCFLAGS"
21426
21427LD="$CC"
21428LDEXE="$CC"
21429LDCXX="$CXX"
21430LDEXECXX="$CXX"
21431
21432# LDEXE is the linker to use, when creating executables.
21433
21434# Linking C++ libraries.
21435
21436# Linking C++ executables.
21437
21438
21439if test "x$OPENJDK_TARGET_OS" != xwindows; then
21440    if test -n "$ac_tool_prefix"; then
21441  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21442set dummy ${ac_tool_prefix}ar; ac_word=$2
21443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21444$as_echo_n "checking for $ac_word... " >&6; }
21445if test "${ac_cv_prog_AR+set}" = set; then :
21446  $as_echo_n "(cached) " >&6
21447else
21448  if test -n "$AR"; then
21449  ac_cv_prog_AR="$AR" # Let the user override the test.
21450else
21451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21452for as_dir in $PATH
21453do
21454  IFS=$as_save_IFS
21455  test -z "$as_dir" && as_dir=.
21456    for ac_exec_ext in '' $ac_executable_extensions; do
21457  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21458    ac_cv_prog_AR="${ac_tool_prefix}ar"
21459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21460    break 2
21461  fi
21462done
21463  done
21464IFS=$as_save_IFS
21465
21466fi
21467fi
21468AR=$ac_cv_prog_AR
21469if test -n "$AR"; then
21470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21471$as_echo "$AR" >&6; }
21472else
21473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21474$as_echo "no" >&6; }
21475fi
21476
21477
21478fi
21479if test -z "$ac_cv_prog_AR"; then
21480  ac_ct_AR=$AR
21481  # Extract the first word of "ar", so it can be a program name with args.
21482set dummy ar; ac_word=$2
21483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21484$as_echo_n "checking for $ac_word... " >&6; }
21485if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21486  $as_echo_n "(cached) " >&6
21487else
21488  if test -n "$ac_ct_AR"; then
21489  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21490else
21491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21492for as_dir in $PATH
21493do
21494  IFS=$as_save_IFS
21495  test -z "$as_dir" && as_dir=.
21496    for ac_exec_ext in '' $ac_executable_extensions; do
21497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21498    ac_cv_prog_ac_ct_AR="ar"
21499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21500    break 2
21501  fi
21502done
21503  done
21504IFS=$as_save_IFS
21505
21506fi
21507fi
21508ac_ct_AR=$ac_cv_prog_ac_ct_AR
21509if test -n "$ac_ct_AR"; then
21510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21511$as_echo "$ac_ct_AR" >&6; }
21512else
21513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21514$as_echo "no" >&6; }
21515fi
21516
21517  if test "x$ac_ct_AR" = x; then
21518    AR=""
21519  else
21520    case $cross_compiling:$ac_tool_warned in
21521yes:)
21522{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21524ac_tool_warned=yes ;;
21525esac
21526    AR=$ac_ct_AR
21527  fi
21528else
21529  AR="$ac_cv_prog_AR"
21530fi
21531
21532
21533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21534
21535  # First separate the path from the arguments. This will split at the first
21536  # space.
21537  complete="$AR"
21538  path="${complete%% *}"
21539  tmp="$complete EOL"
21540  arguments="${tmp#* }"
21541
21542  # Input might be given as Windows format, start by converting to
21543  # unix format.
21544  new_path=`$CYGPATH -u "$path"`
21545
21546  # Now try to locate executable using which
21547  new_path=`$WHICH "$new_path" 2> /dev/null`
21548  # bat and cmd files are not always considered executable in cygwin causing which
21549  # to not find them
21550  if test "x$new_path" = x \
21551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21553    new_path=`$CYGPATH -u "$path"`
21554  fi
21555  if test "x$new_path" = x; then
21556    # Oops. Which didn't find the executable.
21557    # The splitting of arguments from the executable at a space might have been incorrect,
21558    # since paths with space are more likely in Windows. Give it another try with the whole
21559    # argument.
21560    path="$complete"
21561    arguments="EOL"
21562    new_path=`$CYGPATH -u "$path"`
21563    new_path=`$WHICH "$new_path" 2> /dev/null`
21564    # bat and cmd files are not always considered executable in cygwin causing which
21565    # to not find them
21566    if test "x$new_path" = x \
21567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21569      new_path=`$CYGPATH -u "$path"`
21570    fi
21571    if test "x$new_path" = x; then
21572      # It's still not found. Now this is an unrecoverable error.
21573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21574$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21575      has_space=`$ECHO "$complete" | $GREP " "`
21576      if test "x$has_space" != x; then
21577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21579      fi
21580      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21581    fi
21582  fi
21583
21584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21587  # "foo.exe" is OK but "foo" is an error.
21588  #
21589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21590  # It is also a way to make sure we got the proper file name for the real test later on.
21591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21592  if test "x$test_shortpath" = x; then
21593    # Short path failed, file does not exist as specified.
21594    # Try adding .exe or .cmd
21595    if test -f "${new_path}.exe"; then
21596       input_to_shortpath="${new_path}.exe"
21597    elif test -f "${new_path}.cmd"; then
21598       input_to_shortpath="${new_path}.cmd"
21599    else
21600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21601$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21604      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21605    fi
21606  else
21607    input_to_shortpath="$new_path"
21608  fi
21609
21610  # Call helper function which possibly converts this using DOS-style short mode.
21611  # If so, the updated path is stored in $new_path.
21612  new_path="$input_to_shortpath"
21613
21614  input_path="$input_to_shortpath"
21615  # Check if we need to convert this using DOS-style short mode. If the path
21616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21617  # take no chances and rewrite it.
21618  # Note: m4 eats our [], so we need to use [ and ] instead.
21619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21620  if test "x$has_forbidden_chars" != x; then
21621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21625      # Going to short mode and back again did indeed matter. Since short mode is
21626      # case insensitive, let's make it lowercase to improve readability.
21627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21628      # Now convert it back to Unix-stile (cygpath)
21629      input_path=`$CYGPATH -u "$shortmode_path"`
21630      new_path="$input_path"
21631    fi
21632  fi
21633
21634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21635  if test "x$test_cygdrive_prefix" = x; then
21636    # As a simple fix, exclude /usr/bin since it's not a real path.
21637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21639      # a path prefixed by /cygdrive for fixpath to work.
21640      new_path="$CYGWIN_ROOT_PATH$input_path"
21641    fi
21642  fi
21643
21644  # remove trailing .exe if any
21645  new_path="${new_path/%.exe/}"
21646
21647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21648
21649  # First separate the path from the arguments. This will split at the first
21650  # space.
21651  complete="$AR"
21652  path="${complete%% *}"
21653  tmp="$complete EOL"
21654  arguments="${tmp#* }"
21655
21656  # Input might be given as Windows format, start by converting to
21657  # unix format.
21658  new_path="$path"
21659
21660  windows_path="$new_path"
21661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21662    unix_path=`$CYGPATH -u "$windows_path"`
21663    new_path="$unix_path"
21664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21666    new_path="$unix_path"
21667  fi
21668
21669
21670  # Now try to locate executable using which
21671  new_path=`$WHICH "$new_path" 2> /dev/null`
21672
21673  if test "x$new_path" = x; then
21674    # Oops. Which didn't find the executable.
21675    # The splitting of arguments from the executable at a space might have been incorrect,
21676    # since paths with space are more likely in Windows. Give it another try with the whole
21677    # argument.
21678    path="$complete"
21679    arguments="EOL"
21680    new_path="$path"
21681
21682  windows_path="$new_path"
21683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21684    unix_path=`$CYGPATH -u "$windows_path"`
21685    new_path="$unix_path"
21686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21688    new_path="$unix_path"
21689  fi
21690
21691
21692    new_path=`$WHICH "$new_path" 2> /dev/null`
21693
21694    if test "x$new_path" = x; then
21695      # It's still not found. Now this is an unrecoverable error.
21696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21697$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21698      has_space=`$ECHO "$complete" | $GREP " "`
21699      if test "x$has_space" != x; then
21700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21702      fi
21703      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21704    fi
21705  fi
21706
21707  # Now new_path has a complete unix path to the binary
21708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21709    # Keep paths in /bin as-is, but remove trailing .exe if any
21710    new_path="${new_path/%.exe/}"
21711    # Do not save /bin paths to all_fixpath_prefixes!
21712  else
21713    # Not in mixed or Windows style, start by that.
21714    new_path=`cmd //c echo $new_path`
21715
21716  input_path="$new_path"
21717  # Check if we need to convert this using DOS-style short mode. If the path
21718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21719  # take no chances and rewrite it.
21720  # Note: m4 eats our [], so we need to use [ and ] instead.
21721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21722  if test "x$has_forbidden_chars" != x; then
21723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21725  fi
21726
21727    # Output is in $new_path
21728
21729  windows_path="$new_path"
21730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21731    unix_path=`$CYGPATH -u "$windows_path"`
21732    new_path="$unix_path"
21733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21735    new_path="$unix_path"
21736  fi
21737
21738    # remove trailing .exe if any
21739    new_path="${new_path/%.exe/}"
21740
21741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21743  fi
21744
21745  else
21746    # We're on a posix platform. Hooray! :)
21747    # First separate the path from the arguments. This will split at the first
21748    # space.
21749    complete="$AR"
21750    path="${complete%% *}"
21751    tmp="$complete EOL"
21752    arguments="${tmp#* }"
21753
21754    # Cannot rely on the command "which" here since it doesn't always work.
21755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21756    if test -z "$is_absolute_path"; then
21757      # Path to executable is not absolute. Find it.
21758      IFS_save="$IFS"
21759      IFS=:
21760      for p in $PATH; do
21761        if test -f "$p/$path" && test -x "$p/$path"; then
21762          new_path="$p/$path"
21763          break
21764        fi
21765      done
21766      IFS="$IFS_save"
21767    else
21768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21769$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21770      new_path="$path"
21771    fi
21772
21773    if test "x$new_path" = x; then
21774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21775$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21776        has_space=`$ECHO "$complete" | $GREP " "`
21777        if test "x$has_space" != x; then
21778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21780        fi
21781        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21782      fi
21783  fi
21784
21785      # Now join together the path and the arguments once again
21786      if test "x$arguments" != xEOL; then
21787        new_complete="$new_path ${arguments% *}"
21788      else
21789        new_complete="$new_path"
21790      fi
21791
21792  if test "x$complete" != "x$new_complete"; then
21793      AR="$new_complete"
21794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21795$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21796    fi
21797
21798fi
21799if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21800    ARFLAGS="-r"
21801else
21802    ARFLAGS=""
21803fi
21804
21805
21806# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21807HOTSPOT_CXX="$CXX"
21808HOTSPOT_LD="$LD"
21809
21810
21811
21812COMPILER_NAME=gcc
21813COMPILER_TYPE=CC
21814if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21815
21816    # For now, assume that we are always compiling using cl.exe.
21817    CC_OUT_OPTION=-Fo
21818    EXE_OUT_OPTION=-out:
21819    LD_OUT_OPTION=-out:
21820    AR_OUT_OPTION=-out:
21821    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21822    # program for something completely different.
21823    # Extract the first word of "link", so it can be a program name with args.
21824set dummy link; ac_word=$2
21825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21826$as_echo_n "checking for $ac_word... " >&6; }
21827if test "${ac_cv_prog_WINLD+set}" = set; then :
21828  $as_echo_n "(cached) " >&6
21829else
21830  if test -n "$WINLD"; then
21831  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21832else
21833  ac_prog_rejected=no
21834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21835for as_dir in $PATH
21836do
21837  IFS=$as_save_IFS
21838  test -z "$as_dir" && as_dir=.
21839    for ac_exec_ext in '' $ac_executable_extensions; do
21840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21841    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21842       ac_prog_rejected=yes
21843       continue
21844     fi
21845    ac_cv_prog_WINLD="link"
21846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21847    break 2
21848  fi
21849done
21850  done
21851IFS=$as_save_IFS
21852
21853if test $ac_prog_rejected = yes; then
21854  # We found a bogon in the path, so make sure we never use it.
21855  set dummy $ac_cv_prog_WINLD
21856  shift
21857  if test $# != 0; then
21858    # We chose a different compiler from the bogus one.
21859    # However, it has the same basename, so the bogon will be chosen
21860    # first if we set WINLD to just the basename; use the full file name.
21861    shift
21862    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21863  fi
21864fi
21865fi
21866fi
21867WINLD=$ac_cv_prog_WINLD
21868if test -n "$WINLD"; then
21869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21870$as_echo "$WINLD" >&6; }
21871else
21872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21873$as_echo "no" >&6; }
21874fi
21875
21876
21877    # Since we must ignore the first found link, WINLD will contain
21878    # the full path to the link.exe program.
21879
21880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21881
21882  # First separate the path from the arguments. This will split at the first
21883  # space.
21884  complete="$WINLD"
21885  path="${complete%% *}"
21886  tmp="$complete EOL"
21887  arguments="${tmp#* }"
21888
21889  # Input might be given as Windows format, start by converting to
21890  # unix format.
21891  new_path=`$CYGPATH -u "$path"`
21892
21893  # Now try to locate executable using which
21894  new_path=`$WHICH "$new_path" 2> /dev/null`
21895  # bat and cmd files are not always considered executable in cygwin causing which
21896  # to not find them
21897  if test "x$new_path" = x \
21898           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21899           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21900    new_path=`$CYGPATH -u "$path"`
21901  fi
21902  if test "x$new_path" = x; then
21903    # Oops. Which didn't find the executable.
21904    # The splitting of arguments from the executable at a space might have been incorrect,
21905    # since paths with space are more likely in Windows. Give it another try with the whole
21906    # argument.
21907    path="$complete"
21908    arguments="EOL"
21909    new_path=`$CYGPATH -u "$path"`
21910    new_path=`$WHICH "$new_path" 2> /dev/null`
21911    # bat and cmd files are not always considered executable in cygwin causing which
21912    # to not find them
21913    if test "x$new_path" = x \
21914             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21915             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21916      new_path=`$CYGPATH -u "$path"`
21917    fi
21918    if test "x$new_path" = x; then
21919      # It's still not found. Now this is an unrecoverable error.
21920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21921$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21922      has_space=`$ECHO "$complete" | $GREP " "`
21923      if test "x$has_space" != x; then
21924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21926      fi
21927      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21928    fi
21929  fi
21930
21931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21934  # "foo.exe" is OK but "foo" is an error.
21935  #
21936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21937  # It is also a way to make sure we got the proper file name for the real test later on.
21938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21939  if test "x$test_shortpath" = x; then
21940    # Short path failed, file does not exist as specified.
21941    # Try adding .exe or .cmd
21942    if test -f "${new_path}.exe"; then
21943       input_to_shortpath="${new_path}.exe"
21944    elif test -f "${new_path}.cmd"; then
21945       input_to_shortpath="${new_path}.cmd"
21946    else
21947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21948$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21951      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21952    fi
21953  else
21954    input_to_shortpath="$new_path"
21955  fi
21956
21957  # Call helper function which possibly converts this using DOS-style short mode.
21958  # If so, the updated path is stored in $new_path.
21959  new_path="$input_to_shortpath"
21960
21961  input_path="$input_to_shortpath"
21962  # Check if we need to convert this using DOS-style short mode. If the path
21963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21964  # take no chances and rewrite it.
21965  # Note: m4 eats our [], so we need to use [ and ] instead.
21966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21967  if test "x$has_forbidden_chars" != x; then
21968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21972      # Going to short mode and back again did indeed matter. Since short mode is
21973      # case insensitive, let's make it lowercase to improve readability.
21974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21975      # Now convert it back to Unix-stile (cygpath)
21976      input_path=`$CYGPATH -u "$shortmode_path"`
21977      new_path="$input_path"
21978    fi
21979  fi
21980
21981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21982  if test "x$test_cygdrive_prefix" = x; then
21983    # As a simple fix, exclude /usr/bin since it's not a real path.
21984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21986      # a path prefixed by /cygdrive for fixpath to work.
21987      new_path="$CYGWIN_ROOT_PATH$input_path"
21988    fi
21989  fi
21990
21991  # remove trailing .exe if any
21992  new_path="${new_path/%.exe/}"
21993
21994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21995
21996  # First separate the path from the arguments. This will split at the first
21997  # space.
21998  complete="$WINLD"
21999  path="${complete%% *}"
22000  tmp="$complete EOL"
22001  arguments="${tmp#* }"
22002
22003  # Input might be given as Windows format, start by converting to
22004  # unix format.
22005  new_path="$path"
22006
22007  windows_path="$new_path"
22008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22009    unix_path=`$CYGPATH -u "$windows_path"`
22010    new_path="$unix_path"
22011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22013    new_path="$unix_path"
22014  fi
22015
22016
22017  # Now try to locate executable using which
22018  new_path=`$WHICH "$new_path" 2> /dev/null`
22019
22020  if test "x$new_path" = x; then
22021    # Oops. Which didn't find the executable.
22022    # The splitting of arguments from the executable at a space might have been incorrect,
22023    # since paths with space are more likely in Windows. Give it another try with the whole
22024    # argument.
22025    path="$complete"
22026    arguments="EOL"
22027    new_path="$path"
22028
22029  windows_path="$new_path"
22030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22031    unix_path=`$CYGPATH -u "$windows_path"`
22032    new_path="$unix_path"
22033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22035    new_path="$unix_path"
22036  fi
22037
22038
22039    new_path=`$WHICH "$new_path" 2> /dev/null`
22040
22041    if test "x$new_path" = x; then
22042      # It's still not found. Now this is an unrecoverable error.
22043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22044$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22045      has_space=`$ECHO "$complete" | $GREP " "`
22046      if test "x$has_space" != x; then
22047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22049      fi
22050      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22051    fi
22052  fi
22053
22054  # Now new_path has a complete unix path to the binary
22055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22056    # Keep paths in /bin as-is, but remove trailing .exe if any
22057    new_path="${new_path/%.exe/}"
22058    # Do not save /bin paths to all_fixpath_prefixes!
22059  else
22060    # Not in mixed or Windows style, start by that.
22061    new_path=`cmd //c echo $new_path`
22062
22063  input_path="$new_path"
22064  # Check if we need to convert this using DOS-style short mode. If the path
22065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22066  # take no chances and rewrite it.
22067  # Note: m4 eats our [], so we need to use [ and ] instead.
22068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22069  if test "x$has_forbidden_chars" != x; then
22070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22072  fi
22073
22074    # Output is in $new_path
22075
22076  windows_path="$new_path"
22077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22078    unix_path=`$CYGPATH -u "$windows_path"`
22079    new_path="$unix_path"
22080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22082    new_path="$unix_path"
22083  fi
22084
22085    # remove trailing .exe if any
22086    new_path="${new_path/%.exe/}"
22087
22088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22090  fi
22091
22092  else
22093    # We're on a posix platform. Hooray! :)
22094    # First separate the path from the arguments. This will split at the first
22095    # space.
22096    complete="$WINLD"
22097    path="${complete%% *}"
22098    tmp="$complete EOL"
22099    arguments="${tmp#* }"
22100
22101    # Cannot rely on the command "which" here since it doesn't always work.
22102    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22103    if test -z "$is_absolute_path"; then
22104      # Path to executable is not absolute. Find it.
22105      IFS_save="$IFS"
22106      IFS=:
22107      for p in $PATH; do
22108        if test -f "$p/$path" && test -x "$p/$path"; then
22109          new_path="$p/$path"
22110          break
22111        fi
22112      done
22113      IFS="$IFS_save"
22114    else
22115      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22116$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22117      new_path="$path"
22118    fi
22119
22120    if test "x$new_path" = x; then
22121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22122$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22123        has_space=`$ECHO "$complete" | $GREP " "`
22124        if test "x$has_space" != x; then
22125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22127        fi
22128        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22129      fi
22130  fi
22131
22132      # Now join together the path and the arguments once again
22133      if test "x$arguments" != xEOL; then
22134        new_complete="$new_path ${arguments% *}"
22135      else
22136        new_complete="$new_path"
22137      fi
22138
22139  if test "x$complete" != "x$new_complete"; then
22140      WINLD="$new_complete"
22141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22142$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22143    fi
22144
22145    printf "Windows linker was found at $WINLD\n"
22146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22147$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22148    "$WINLD" --version > /dev/null
22149    if test $? -eq 0 ; then
22150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22151$as_echo "no" >&6; }
22152      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22153    else
22154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22155$as_echo "yes" >&6; }
22156    fi
22157    LD="$WINLD"
22158    LDEXE="$WINLD"
22159    LDCXX="$WINLD"
22160    LDEXECXX="$WINLD"
22161
22162    # Extract the first word of "mt", so it can be a program name with args.
22163set dummy mt; ac_word=$2
22164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22165$as_echo_n "checking for $ac_word... " >&6; }
22166if test "${ac_cv_prog_MT+set}" = set; then :
22167  $as_echo_n "(cached) " >&6
22168else
22169  if test -n "$MT"; then
22170  ac_cv_prog_MT="$MT" # Let the user override the test.
22171else
22172  ac_prog_rejected=no
22173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22174for as_dir in $PATH
22175do
22176  IFS=$as_save_IFS
22177  test -z "$as_dir" && as_dir=.
22178    for ac_exec_ext in '' $ac_executable_extensions; do
22179  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22180    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22181       ac_prog_rejected=yes
22182       continue
22183     fi
22184    ac_cv_prog_MT="mt"
22185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22186    break 2
22187  fi
22188done
22189  done
22190IFS=$as_save_IFS
22191
22192if test $ac_prog_rejected = yes; then
22193  # We found a bogon in the path, so make sure we never use it.
22194  set dummy $ac_cv_prog_MT
22195  shift
22196  if test $# != 0; then
22197    # We chose a different compiler from the bogus one.
22198    # However, it has the same basename, so the bogon will be chosen
22199    # first if we set MT to just the basename; use the full file name.
22200    shift
22201    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22202  fi
22203fi
22204fi
22205fi
22206MT=$ac_cv_prog_MT
22207if test -n "$MT"; then
22208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22209$as_echo "$MT" >&6; }
22210else
22211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22212$as_echo "no" >&6; }
22213fi
22214
22215
22216
22217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22218
22219  # First separate the path from the arguments. This will split at the first
22220  # space.
22221  complete="$MT"
22222  path="${complete%% *}"
22223  tmp="$complete EOL"
22224  arguments="${tmp#* }"
22225
22226  # Input might be given as Windows format, start by converting to
22227  # unix format.
22228  new_path=`$CYGPATH -u "$path"`
22229
22230  # Now try to locate executable using which
22231  new_path=`$WHICH "$new_path" 2> /dev/null`
22232  # bat and cmd files are not always considered executable in cygwin causing which
22233  # to not find them
22234  if test "x$new_path" = x \
22235           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22236           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22237    new_path=`$CYGPATH -u "$path"`
22238  fi
22239  if test "x$new_path" = x; then
22240    # Oops. Which didn't find the executable.
22241    # The splitting of arguments from the executable at a space might have been incorrect,
22242    # since paths with space are more likely in Windows. Give it another try with the whole
22243    # argument.
22244    path="$complete"
22245    arguments="EOL"
22246    new_path=`$CYGPATH -u "$path"`
22247    new_path=`$WHICH "$new_path" 2> /dev/null`
22248    # bat and cmd files are not always considered executable in cygwin causing which
22249    # to not find them
22250    if test "x$new_path" = x \
22251             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22252             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22253      new_path=`$CYGPATH -u "$path"`
22254    fi
22255    if test "x$new_path" = x; then
22256      # It's still not found. Now this is an unrecoverable error.
22257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22258$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22259      has_space=`$ECHO "$complete" | $GREP " "`
22260      if test "x$has_space" != x; then
22261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22263      fi
22264      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22265    fi
22266  fi
22267
22268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22271  # "foo.exe" is OK but "foo" is an error.
22272  #
22273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22274  # It is also a way to make sure we got the proper file name for the real test later on.
22275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22276  if test "x$test_shortpath" = x; then
22277    # Short path failed, file does not exist as specified.
22278    # Try adding .exe or .cmd
22279    if test -f "${new_path}.exe"; then
22280       input_to_shortpath="${new_path}.exe"
22281    elif test -f "${new_path}.cmd"; then
22282       input_to_shortpath="${new_path}.cmd"
22283    else
22284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22285$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22288      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22289    fi
22290  else
22291    input_to_shortpath="$new_path"
22292  fi
22293
22294  # Call helper function which possibly converts this using DOS-style short mode.
22295  # If so, the updated path is stored in $new_path.
22296  new_path="$input_to_shortpath"
22297
22298  input_path="$input_to_shortpath"
22299  # Check if we need to convert this using DOS-style short mode. If the path
22300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22301  # take no chances and rewrite it.
22302  # Note: m4 eats our [], so we need to use [ and ] instead.
22303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22304  if test "x$has_forbidden_chars" != x; then
22305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22309      # Going to short mode and back again did indeed matter. Since short mode is
22310      # case insensitive, let's make it lowercase to improve readability.
22311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22312      # Now convert it back to Unix-stile (cygpath)
22313      input_path=`$CYGPATH -u "$shortmode_path"`
22314      new_path="$input_path"
22315    fi
22316  fi
22317
22318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22319  if test "x$test_cygdrive_prefix" = x; then
22320    # As a simple fix, exclude /usr/bin since it's not a real path.
22321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22323      # a path prefixed by /cygdrive for fixpath to work.
22324      new_path="$CYGWIN_ROOT_PATH$input_path"
22325    fi
22326  fi
22327
22328  # remove trailing .exe if any
22329  new_path="${new_path/%.exe/}"
22330
22331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22332
22333  # First separate the path from the arguments. This will split at the first
22334  # space.
22335  complete="$MT"
22336  path="${complete%% *}"
22337  tmp="$complete EOL"
22338  arguments="${tmp#* }"
22339
22340  # Input might be given as Windows format, start by converting to
22341  # unix format.
22342  new_path="$path"
22343
22344  windows_path="$new_path"
22345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22346    unix_path=`$CYGPATH -u "$windows_path"`
22347    new_path="$unix_path"
22348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22350    new_path="$unix_path"
22351  fi
22352
22353
22354  # Now try to locate executable using which
22355  new_path=`$WHICH "$new_path" 2> /dev/null`
22356
22357  if test "x$new_path" = x; then
22358    # Oops. Which didn't find the executable.
22359    # The splitting of arguments from the executable at a space might have been incorrect,
22360    # since paths with space are more likely in Windows. Give it another try with the whole
22361    # argument.
22362    path="$complete"
22363    arguments="EOL"
22364    new_path="$path"
22365
22366  windows_path="$new_path"
22367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22368    unix_path=`$CYGPATH -u "$windows_path"`
22369    new_path="$unix_path"
22370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22372    new_path="$unix_path"
22373  fi
22374
22375
22376    new_path=`$WHICH "$new_path" 2> /dev/null`
22377
22378    if test "x$new_path" = x; then
22379      # It's still not found. Now this is an unrecoverable error.
22380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22381$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22382      has_space=`$ECHO "$complete" | $GREP " "`
22383      if test "x$has_space" != x; then
22384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22386      fi
22387      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22388    fi
22389  fi
22390
22391  # Now new_path has a complete unix path to the binary
22392  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22393    # Keep paths in /bin as-is, but remove trailing .exe if any
22394    new_path="${new_path/%.exe/}"
22395    # Do not save /bin paths to all_fixpath_prefixes!
22396  else
22397    # Not in mixed or Windows style, start by that.
22398    new_path=`cmd //c echo $new_path`
22399
22400  input_path="$new_path"
22401  # Check if we need to convert this using DOS-style short mode. If the path
22402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22403  # take no chances and rewrite it.
22404  # Note: m4 eats our [], so we need to use [ and ] instead.
22405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22406  if test "x$has_forbidden_chars" != x; then
22407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22409  fi
22410
22411    # Output is in $new_path
22412
22413  windows_path="$new_path"
22414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22415    unix_path=`$CYGPATH -u "$windows_path"`
22416    new_path="$unix_path"
22417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22419    new_path="$unix_path"
22420  fi
22421
22422    # remove trailing .exe if any
22423    new_path="${new_path/%.exe/}"
22424
22425    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22426    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22427  fi
22428
22429  else
22430    # We're on a posix platform. Hooray! :)
22431    # First separate the path from the arguments. This will split at the first
22432    # space.
22433    complete="$MT"
22434    path="${complete%% *}"
22435    tmp="$complete EOL"
22436    arguments="${tmp#* }"
22437
22438    # Cannot rely on the command "which" here since it doesn't always work.
22439    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22440    if test -z "$is_absolute_path"; then
22441      # Path to executable is not absolute. Find it.
22442      IFS_save="$IFS"
22443      IFS=:
22444      for p in $PATH; do
22445        if test -f "$p/$path" && test -x "$p/$path"; then
22446          new_path="$p/$path"
22447          break
22448        fi
22449      done
22450      IFS="$IFS_save"
22451    else
22452      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22453$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22454      new_path="$path"
22455    fi
22456
22457    if test "x$new_path" = x; then
22458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22459$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22460        has_space=`$ECHO "$complete" | $GREP " "`
22461        if test "x$has_space" != x; then
22462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22464        fi
22465        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22466      fi
22467  fi
22468
22469      # Now join together the path and the arguments once again
22470      if test "x$arguments" != xEOL; then
22471        new_complete="$new_path ${arguments% *}"
22472      else
22473        new_complete="$new_path"
22474      fi
22475
22476  if test "x$complete" != "x$new_complete"; then
22477      MT="$new_complete"
22478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22479$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22480    fi
22481
22482    # The resource compiler
22483    # Extract the first word of "rc", so it can be a program name with args.
22484set dummy rc; ac_word=$2
22485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22486$as_echo_n "checking for $ac_word... " >&6; }
22487if test "${ac_cv_prog_RC+set}" = set; then :
22488  $as_echo_n "(cached) " >&6
22489else
22490  if test -n "$RC"; then
22491  ac_cv_prog_RC="$RC" # Let the user override the test.
22492else
22493  ac_prog_rejected=no
22494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22495for as_dir in $PATH
22496do
22497  IFS=$as_save_IFS
22498  test -z "$as_dir" && as_dir=.
22499    for ac_exec_ext in '' $ac_executable_extensions; do
22500  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22501    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22502       ac_prog_rejected=yes
22503       continue
22504     fi
22505    ac_cv_prog_RC="rc"
22506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507    break 2
22508  fi
22509done
22510  done
22511IFS=$as_save_IFS
22512
22513if test $ac_prog_rejected = yes; then
22514  # We found a bogon in the path, so make sure we never use it.
22515  set dummy $ac_cv_prog_RC
22516  shift
22517  if test $# != 0; then
22518    # We chose a different compiler from the bogus one.
22519    # However, it has the same basename, so the bogon will be chosen
22520    # first if we set RC to just the basename; use the full file name.
22521    shift
22522    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22523  fi
22524fi
22525fi
22526fi
22527RC=$ac_cv_prog_RC
22528if test -n "$RC"; then
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22530$as_echo "$RC" >&6; }
22531else
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533$as_echo "no" >&6; }
22534fi
22535
22536
22537
22538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22539
22540  # First separate the path from the arguments. This will split at the first
22541  # space.
22542  complete="$RC"
22543  path="${complete%% *}"
22544  tmp="$complete EOL"
22545  arguments="${tmp#* }"
22546
22547  # Input might be given as Windows format, start by converting to
22548  # unix format.
22549  new_path=`$CYGPATH -u "$path"`
22550
22551  # Now try to locate executable using which
22552  new_path=`$WHICH "$new_path" 2> /dev/null`
22553  # bat and cmd files are not always considered executable in cygwin causing which
22554  # to not find them
22555  if test "x$new_path" = x \
22556           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22557           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22558    new_path=`$CYGPATH -u "$path"`
22559  fi
22560  if test "x$new_path" = x; then
22561    # Oops. Which didn't find the executable.
22562    # The splitting of arguments from the executable at a space might have been incorrect,
22563    # since paths with space are more likely in Windows. Give it another try with the whole
22564    # argument.
22565    path="$complete"
22566    arguments="EOL"
22567    new_path=`$CYGPATH -u "$path"`
22568    new_path=`$WHICH "$new_path" 2> /dev/null`
22569    # bat and cmd files are not always considered executable in cygwin causing which
22570    # to not find them
22571    if test "x$new_path" = x \
22572             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22573             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22574      new_path=`$CYGPATH -u "$path"`
22575    fi
22576    if test "x$new_path" = x; then
22577      # It's still not found. Now this is an unrecoverable error.
22578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22579$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22580      has_space=`$ECHO "$complete" | $GREP " "`
22581      if test "x$has_space" != x; then
22582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22584      fi
22585      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22586    fi
22587  fi
22588
22589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22592  # "foo.exe" is OK but "foo" is an error.
22593  #
22594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22595  # It is also a way to make sure we got the proper file name for the real test later on.
22596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22597  if test "x$test_shortpath" = x; then
22598    # Short path failed, file does not exist as specified.
22599    # Try adding .exe or .cmd
22600    if test -f "${new_path}.exe"; then
22601       input_to_shortpath="${new_path}.exe"
22602    elif test -f "${new_path}.cmd"; then
22603       input_to_shortpath="${new_path}.cmd"
22604    else
22605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22606$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22609      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22610    fi
22611  else
22612    input_to_shortpath="$new_path"
22613  fi
22614
22615  # Call helper function which possibly converts this using DOS-style short mode.
22616  # If so, the updated path is stored in $new_path.
22617  new_path="$input_to_shortpath"
22618
22619  input_path="$input_to_shortpath"
22620  # Check if we need to convert this using DOS-style short mode. If the path
22621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22622  # take no chances and rewrite it.
22623  # Note: m4 eats our [], so we need to use [ and ] instead.
22624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22625  if test "x$has_forbidden_chars" != x; then
22626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22630      # Going to short mode and back again did indeed matter. Since short mode is
22631      # case insensitive, let's make it lowercase to improve readability.
22632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22633      # Now convert it back to Unix-stile (cygpath)
22634      input_path=`$CYGPATH -u "$shortmode_path"`
22635      new_path="$input_path"
22636    fi
22637  fi
22638
22639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22640  if test "x$test_cygdrive_prefix" = x; then
22641    # As a simple fix, exclude /usr/bin since it's not a real path.
22642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22644      # a path prefixed by /cygdrive for fixpath to work.
22645      new_path="$CYGWIN_ROOT_PATH$input_path"
22646    fi
22647  fi
22648
22649  # remove trailing .exe if any
22650  new_path="${new_path/%.exe/}"
22651
22652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22653
22654  # First separate the path from the arguments. This will split at the first
22655  # space.
22656  complete="$RC"
22657  path="${complete%% *}"
22658  tmp="$complete EOL"
22659  arguments="${tmp#* }"
22660
22661  # Input might be given as Windows format, start by converting to
22662  # unix format.
22663  new_path="$path"
22664
22665  windows_path="$new_path"
22666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22667    unix_path=`$CYGPATH -u "$windows_path"`
22668    new_path="$unix_path"
22669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22671    new_path="$unix_path"
22672  fi
22673
22674
22675  # Now try to locate executable using which
22676  new_path=`$WHICH "$new_path" 2> /dev/null`
22677
22678  if test "x$new_path" = x; then
22679    # Oops. Which didn't find the executable.
22680    # The splitting of arguments from the executable at a space might have been incorrect,
22681    # since paths with space are more likely in Windows. Give it another try with the whole
22682    # argument.
22683    path="$complete"
22684    arguments="EOL"
22685    new_path="$path"
22686
22687  windows_path="$new_path"
22688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22689    unix_path=`$CYGPATH -u "$windows_path"`
22690    new_path="$unix_path"
22691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22693    new_path="$unix_path"
22694  fi
22695
22696
22697    new_path=`$WHICH "$new_path" 2> /dev/null`
22698
22699    if test "x$new_path" = x; then
22700      # It's still not found. Now this is an unrecoverable error.
22701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22702$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22703      has_space=`$ECHO "$complete" | $GREP " "`
22704      if test "x$has_space" != x; then
22705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22707      fi
22708      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22709    fi
22710  fi
22711
22712  # Now new_path has a complete unix path to the binary
22713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22714    # Keep paths in /bin as-is, but remove trailing .exe if any
22715    new_path="${new_path/%.exe/}"
22716    # Do not save /bin paths to all_fixpath_prefixes!
22717  else
22718    # Not in mixed or Windows style, start by that.
22719    new_path=`cmd //c echo $new_path`
22720
22721  input_path="$new_path"
22722  # Check if we need to convert this using DOS-style short mode. If the path
22723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22724  # take no chances and rewrite it.
22725  # Note: m4 eats our [], so we need to use [ and ] instead.
22726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22727  if test "x$has_forbidden_chars" != x; then
22728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22730  fi
22731
22732    # Output is in $new_path
22733
22734  windows_path="$new_path"
22735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22736    unix_path=`$CYGPATH -u "$windows_path"`
22737    new_path="$unix_path"
22738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22740    new_path="$unix_path"
22741  fi
22742
22743    # remove trailing .exe if any
22744    new_path="${new_path/%.exe/}"
22745
22746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22748  fi
22749
22750  else
22751    # We're on a posix platform. Hooray! :)
22752    # First separate the path from the arguments. This will split at the first
22753    # space.
22754    complete="$RC"
22755    path="${complete%% *}"
22756    tmp="$complete EOL"
22757    arguments="${tmp#* }"
22758
22759    # Cannot rely on the command "which" here since it doesn't always work.
22760    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22761    if test -z "$is_absolute_path"; then
22762      # Path to executable is not absolute. Find it.
22763      IFS_save="$IFS"
22764      IFS=:
22765      for p in $PATH; do
22766        if test -f "$p/$path" && test -x "$p/$path"; then
22767          new_path="$p/$path"
22768          break
22769        fi
22770      done
22771      IFS="$IFS_save"
22772    else
22773      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22774$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22775      new_path="$path"
22776    fi
22777
22778    if test "x$new_path" = x; then
22779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22780$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22781        has_space=`$ECHO "$complete" | $GREP " "`
22782        if test "x$has_space" != x; then
22783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22785        fi
22786        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22787      fi
22788  fi
22789
22790      # Now join together the path and the arguments once again
22791      if test "x$arguments" != xEOL; then
22792        new_complete="$new_path ${arguments% *}"
22793      else
22794        new_complete="$new_path"
22795      fi
22796
22797  if test "x$complete" != "x$new_complete"; then
22798      RC="$new_complete"
22799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22800$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22801    fi
22802
22803
22804    # For hotspot, we need these in Windows mixed path,
22805    # so rewrite them all. Need added .exe suffix.
22806    HOTSPOT_CXX="$CXX.exe"
22807    HOTSPOT_LD="$LD.exe"
22808    HOTSPOT_MT="$MT.exe"
22809    HOTSPOT_RC="$RC.exe"
22810
22811  unix_path="$HOTSPOT_CXX"
22812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22813    windows_path=`$CYGPATH -m "$unix_path"`
22814    HOTSPOT_CXX="$windows_path"
22815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22816    windows_path=`cmd //c echo $unix_path`
22817    HOTSPOT_CXX="$windows_path"
22818  fi
22819
22820
22821  unix_path="$HOTSPOT_LD"
22822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22823    windows_path=`$CYGPATH -m "$unix_path"`
22824    HOTSPOT_LD="$windows_path"
22825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22826    windows_path=`cmd //c echo $unix_path`
22827    HOTSPOT_LD="$windows_path"
22828  fi
22829
22830
22831  unix_path="$HOTSPOT_MT"
22832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22833    windows_path=`$CYGPATH -m "$unix_path"`
22834    HOTSPOT_MT="$windows_path"
22835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22836    windows_path=`cmd //c echo $unix_path`
22837    HOTSPOT_MT="$windows_path"
22838  fi
22839
22840
22841  unix_path="$HOTSPOT_RC"
22842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843    windows_path=`$CYGPATH -m "$unix_path"`
22844    HOTSPOT_RC="$windows_path"
22845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22846    windows_path=`cmd //c echo $unix_path`
22847    HOTSPOT_RC="$windows_path"
22848  fi
22849
22850
22851
22852
22853    RC_FLAGS="-nologo -l 0x409 -r"
22854    if test "x$VARIANT" = xOPT; then :
22855
22856        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22857
22858fi
22859    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22860    if test "x$JDK_UPDATE_VERSION" = x; then :
22861
22862        JDK_UPDATE_VERSION_NOTNULL=0
22863
22864fi
22865    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22866    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22867    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22868    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22869    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22870    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22871    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22872
22873    # lib.exe is used to create static libraries.
22874    # Extract the first word of "lib", so it can be a program name with args.
22875set dummy lib; ac_word=$2
22876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22877$as_echo_n "checking for $ac_word... " >&6; }
22878if test "${ac_cv_prog_WINAR+set}" = set; then :
22879  $as_echo_n "(cached) " >&6
22880else
22881  if test -n "$WINAR"; then
22882  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22883else
22884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22885for as_dir in $PATH
22886do
22887  IFS=$as_save_IFS
22888  test -z "$as_dir" && as_dir=.
22889    for ac_exec_ext in '' $ac_executable_extensions; do
22890  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22891    ac_cv_prog_WINAR="lib"
22892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22893    break 2
22894  fi
22895done
22896  done
22897IFS=$as_save_IFS
22898
22899fi
22900fi
22901WINAR=$ac_cv_prog_WINAR
22902if test -n "$WINAR"; then
22903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22904$as_echo "$WINAR" >&6; }
22905else
22906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22907$as_echo "no" >&6; }
22908fi
22909
22910
22911
22912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22913
22914  # First separate the path from the arguments. This will split at the first
22915  # space.
22916  complete="$WINAR"
22917  path="${complete%% *}"
22918  tmp="$complete EOL"
22919  arguments="${tmp#* }"
22920
22921  # Input might be given as Windows format, start by converting to
22922  # unix format.
22923  new_path=`$CYGPATH -u "$path"`
22924
22925  # Now try to locate executable using which
22926  new_path=`$WHICH "$new_path" 2> /dev/null`
22927  # bat and cmd files are not always considered executable in cygwin causing which
22928  # to not find them
22929  if test "x$new_path" = x \
22930           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22931           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22932    new_path=`$CYGPATH -u "$path"`
22933  fi
22934  if test "x$new_path" = x; then
22935    # Oops. Which didn't find the executable.
22936    # The splitting of arguments from the executable at a space might have been incorrect,
22937    # since paths with space are more likely in Windows. Give it another try with the whole
22938    # argument.
22939    path="$complete"
22940    arguments="EOL"
22941    new_path=`$CYGPATH -u "$path"`
22942    new_path=`$WHICH "$new_path" 2> /dev/null`
22943    # bat and cmd files are not always considered executable in cygwin causing which
22944    # to not find them
22945    if test "x$new_path" = x \
22946             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22947             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22948      new_path=`$CYGPATH -u "$path"`
22949    fi
22950    if test "x$new_path" = x; then
22951      # It's still not found. Now this is an unrecoverable error.
22952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22953$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22954      has_space=`$ECHO "$complete" | $GREP " "`
22955      if test "x$has_space" != x; then
22956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22958      fi
22959      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22960    fi
22961  fi
22962
22963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22966  # "foo.exe" is OK but "foo" is an error.
22967  #
22968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22969  # It is also a way to make sure we got the proper file name for the real test later on.
22970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22971  if test "x$test_shortpath" = x; then
22972    # Short path failed, file does not exist as specified.
22973    # Try adding .exe or .cmd
22974    if test -f "${new_path}.exe"; then
22975       input_to_shortpath="${new_path}.exe"
22976    elif test -f "${new_path}.cmd"; then
22977       input_to_shortpath="${new_path}.cmd"
22978    else
22979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22980$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22983      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22984    fi
22985  else
22986    input_to_shortpath="$new_path"
22987  fi
22988
22989  # Call helper function which possibly converts this using DOS-style short mode.
22990  # If so, the updated path is stored in $new_path.
22991  new_path="$input_to_shortpath"
22992
22993  input_path="$input_to_shortpath"
22994  # Check if we need to convert this using DOS-style short mode. If the path
22995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22996  # take no chances and rewrite it.
22997  # Note: m4 eats our [], so we need to use [ and ] instead.
22998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22999  if test "x$has_forbidden_chars" != x; then
23000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23004      # Going to short mode and back again did indeed matter. Since short mode is
23005      # case insensitive, let's make it lowercase to improve readability.
23006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23007      # Now convert it back to Unix-stile (cygpath)
23008      input_path=`$CYGPATH -u "$shortmode_path"`
23009      new_path="$input_path"
23010    fi
23011  fi
23012
23013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23014  if test "x$test_cygdrive_prefix" = x; then
23015    # As a simple fix, exclude /usr/bin since it's not a real path.
23016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23018      # a path prefixed by /cygdrive for fixpath to work.
23019      new_path="$CYGWIN_ROOT_PATH$input_path"
23020    fi
23021  fi
23022
23023  # remove trailing .exe if any
23024  new_path="${new_path/%.exe/}"
23025
23026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23027
23028  # First separate the path from the arguments. This will split at the first
23029  # space.
23030  complete="$WINAR"
23031  path="${complete%% *}"
23032  tmp="$complete EOL"
23033  arguments="${tmp#* }"
23034
23035  # Input might be given as Windows format, start by converting to
23036  # unix format.
23037  new_path="$path"
23038
23039  windows_path="$new_path"
23040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23041    unix_path=`$CYGPATH -u "$windows_path"`
23042    new_path="$unix_path"
23043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23045    new_path="$unix_path"
23046  fi
23047
23048
23049  # Now try to locate executable using which
23050  new_path=`$WHICH "$new_path" 2> /dev/null`
23051
23052  if test "x$new_path" = x; then
23053    # Oops. Which didn't find the executable.
23054    # The splitting of arguments from the executable at a space might have been incorrect,
23055    # since paths with space are more likely in Windows. Give it another try with the whole
23056    # argument.
23057    path="$complete"
23058    arguments="EOL"
23059    new_path="$path"
23060
23061  windows_path="$new_path"
23062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23063    unix_path=`$CYGPATH -u "$windows_path"`
23064    new_path="$unix_path"
23065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23067    new_path="$unix_path"
23068  fi
23069
23070
23071    new_path=`$WHICH "$new_path" 2> /dev/null`
23072
23073    if test "x$new_path" = x; then
23074      # It's still not found. Now this is an unrecoverable error.
23075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23076$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23077      has_space=`$ECHO "$complete" | $GREP " "`
23078      if test "x$has_space" != x; then
23079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23081      fi
23082      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23083    fi
23084  fi
23085
23086  # Now new_path has a complete unix path to the binary
23087  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23088    # Keep paths in /bin as-is, but remove trailing .exe if any
23089    new_path="${new_path/%.exe/}"
23090    # Do not save /bin paths to all_fixpath_prefixes!
23091  else
23092    # Not in mixed or Windows style, start by that.
23093    new_path=`cmd //c echo $new_path`
23094
23095  input_path="$new_path"
23096  # Check if we need to convert this using DOS-style short mode. If the path
23097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23098  # take no chances and rewrite it.
23099  # Note: m4 eats our [], so we need to use [ and ] instead.
23100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23101  if test "x$has_forbidden_chars" != x; then
23102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23104  fi
23105
23106    # Output is in $new_path
23107
23108  windows_path="$new_path"
23109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23110    unix_path=`$CYGPATH -u "$windows_path"`
23111    new_path="$unix_path"
23112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23114    new_path="$unix_path"
23115  fi
23116
23117    # remove trailing .exe if any
23118    new_path="${new_path/%.exe/}"
23119
23120    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23121    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23122  fi
23123
23124  else
23125    # We're on a posix platform. Hooray! :)
23126    # First separate the path from the arguments. This will split at the first
23127    # space.
23128    complete="$WINAR"
23129    path="${complete%% *}"
23130    tmp="$complete EOL"
23131    arguments="${tmp#* }"
23132
23133    # Cannot rely on the command "which" here since it doesn't always work.
23134    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23135    if test -z "$is_absolute_path"; then
23136      # Path to executable is not absolute. Find it.
23137      IFS_save="$IFS"
23138      IFS=:
23139      for p in $PATH; do
23140        if test -f "$p/$path" && test -x "$p/$path"; then
23141          new_path="$p/$path"
23142          break
23143        fi
23144      done
23145      IFS="$IFS_save"
23146    else
23147      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23148$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23149      new_path="$path"
23150    fi
23151
23152    if test "x$new_path" = x; then
23153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23154$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23155        has_space=`$ECHO "$complete" | $GREP " "`
23156        if test "x$has_space" != x; then
23157          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23159        fi
23160        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23161      fi
23162  fi
23163
23164      # Now join together the path and the arguments once again
23165      if test "x$arguments" != xEOL; then
23166        new_complete="$new_path ${arguments% *}"
23167      else
23168        new_complete="$new_path"
23169      fi
23170
23171  if test "x$complete" != "x$new_complete"; then
23172      WINAR="$new_complete"
23173      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23174$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23175    fi
23176
23177    AR="$WINAR"
23178    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23179
23180    # Extract the first word of "dumpbin", so it can be a program name with args.
23181set dummy dumpbin; ac_word=$2
23182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23183$as_echo_n "checking for $ac_word... " >&6; }
23184if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23185  $as_echo_n "(cached) " >&6
23186else
23187  if test -n "$DUMPBIN"; then
23188  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23189else
23190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23191for as_dir in $PATH
23192do
23193  IFS=$as_save_IFS
23194  test -z "$as_dir" && as_dir=.
23195    for ac_exec_ext in '' $ac_executable_extensions; do
23196  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23197    ac_cv_prog_DUMPBIN="dumpbin"
23198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23199    break 2
23200  fi
23201done
23202  done
23203IFS=$as_save_IFS
23204
23205fi
23206fi
23207DUMPBIN=$ac_cv_prog_DUMPBIN
23208if test -n "$DUMPBIN"; then
23209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23210$as_echo "$DUMPBIN" >&6; }
23211else
23212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23213$as_echo "no" >&6; }
23214fi
23215
23216
23217
23218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23219
23220  # First separate the path from the arguments. This will split at the first
23221  # space.
23222  complete="$DUMPBIN"
23223  path="${complete%% *}"
23224  tmp="$complete EOL"
23225  arguments="${tmp#* }"
23226
23227  # Input might be given as Windows format, start by converting to
23228  # unix format.
23229  new_path=`$CYGPATH -u "$path"`
23230
23231  # Now try to locate executable using which
23232  new_path=`$WHICH "$new_path" 2> /dev/null`
23233  # bat and cmd files are not always considered executable in cygwin causing which
23234  # to not find them
23235  if test "x$new_path" = x \
23236           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23237           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23238    new_path=`$CYGPATH -u "$path"`
23239  fi
23240  if test "x$new_path" = x; then
23241    # Oops. Which didn't find the executable.
23242    # The splitting of arguments from the executable at a space might have been incorrect,
23243    # since paths with space are more likely in Windows. Give it another try with the whole
23244    # argument.
23245    path="$complete"
23246    arguments="EOL"
23247    new_path=`$CYGPATH -u "$path"`
23248    new_path=`$WHICH "$new_path" 2> /dev/null`
23249    # bat and cmd files are not always considered executable in cygwin causing which
23250    # to not find them
23251    if test "x$new_path" = x \
23252             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23253             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23254      new_path=`$CYGPATH -u "$path"`
23255    fi
23256    if test "x$new_path" = x; then
23257      # It's still not found. Now this is an unrecoverable error.
23258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23259$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23260      has_space=`$ECHO "$complete" | $GREP " "`
23261      if test "x$has_space" != x; then
23262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23264      fi
23265      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23266    fi
23267  fi
23268
23269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23272  # "foo.exe" is OK but "foo" is an error.
23273  #
23274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23275  # It is also a way to make sure we got the proper file name for the real test later on.
23276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23277  if test "x$test_shortpath" = x; then
23278    # Short path failed, file does not exist as specified.
23279    # Try adding .exe or .cmd
23280    if test -f "${new_path}.exe"; then
23281       input_to_shortpath="${new_path}.exe"
23282    elif test -f "${new_path}.cmd"; then
23283       input_to_shortpath="${new_path}.cmd"
23284    else
23285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23286$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23287      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23288$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23289      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23290    fi
23291  else
23292    input_to_shortpath="$new_path"
23293  fi
23294
23295  # Call helper function which possibly converts this using DOS-style short mode.
23296  # If so, the updated path is stored in $new_path.
23297  new_path="$input_to_shortpath"
23298
23299  input_path="$input_to_shortpath"
23300  # Check if we need to convert this using DOS-style short mode. If the path
23301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23302  # take no chances and rewrite it.
23303  # Note: m4 eats our [], so we need to use [ and ] instead.
23304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23305  if test "x$has_forbidden_chars" != x; then
23306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23310      # Going to short mode and back again did indeed matter. Since short mode is
23311      # case insensitive, let's make it lowercase to improve readability.
23312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23313      # Now convert it back to Unix-stile (cygpath)
23314      input_path=`$CYGPATH -u "$shortmode_path"`
23315      new_path="$input_path"
23316    fi
23317  fi
23318
23319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23320  if test "x$test_cygdrive_prefix" = x; then
23321    # As a simple fix, exclude /usr/bin since it's not a real path.
23322    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23324      # a path prefixed by /cygdrive for fixpath to work.
23325      new_path="$CYGWIN_ROOT_PATH$input_path"
23326    fi
23327  fi
23328
23329  # remove trailing .exe if any
23330  new_path="${new_path/%.exe/}"
23331
23332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23333
23334  # First separate the path from the arguments. This will split at the first
23335  # space.
23336  complete="$DUMPBIN"
23337  path="${complete%% *}"
23338  tmp="$complete EOL"
23339  arguments="${tmp#* }"
23340
23341  # Input might be given as Windows format, start by converting to
23342  # unix format.
23343  new_path="$path"
23344
23345  windows_path="$new_path"
23346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23347    unix_path=`$CYGPATH -u "$windows_path"`
23348    new_path="$unix_path"
23349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23351    new_path="$unix_path"
23352  fi
23353
23354
23355  # Now try to locate executable using which
23356  new_path=`$WHICH "$new_path" 2> /dev/null`
23357
23358  if test "x$new_path" = x; then
23359    # Oops. Which didn't find the executable.
23360    # The splitting of arguments from the executable at a space might have been incorrect,
23361    # since paths with space are more likely in Windows. Give it another try with the whole
23362    # argument.
23363    path="$complete"
23364    arguments="EOL"
23365    new_path="$path"
23366
23367  windows_path="$new_path"
23368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23369    unix_path=`$CYGPATH -u "$windows_path"`
23370    new_path="$unix_path"
23371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23373    new_path="$unix_path"
23374  fi
23375
23376
23377    new_path=`$WHICH "$new_path" 2> /dev/null`
23378
23379    if test "x$new_path" = x; then
23380      # It's still not found. Now this is an unrecoverable error.
23381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23382$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23383      has_space=`$ECHO "$complete" | $GREP " "`
23384      if test "x$has_space" != x; then
23385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23387      fi
23388      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23389    fi
23390  fi
23391
23392  # Now new_path has a complete unix path to the binary
23393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23394    # Keep paths in /bin as-is, but remove trailing .exe if any
23395    new_path="${new_path/%.exe/}"
23396    # Do not save /bin paths to all_fixpath_prefixes!
23397  else
23398    # Not in mixed or Windows style, start by that.
23399    new_path=`cmd //c echo $new_path`
23400
23401  input_path="$new_path"
23402  # Check if we need to convert this using DOS-style short mode. If the path
23403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23404  # take no chances and rewrite it.
23405  # Note: m4 eats our [], so we need to use [ and ] instead.
23406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23407  if test "x$has_forbidden_chars" != x; then
23408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23410  fi
23411
23412    # Output is in $new_path
23413
23414  windows_path="$new_path"
23415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23416    unix_path=`$CYGPATH -u "$windows_path"`
23417    new_path="$unix_path"
23418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23420    new_path="$unix_path"
23421  fi
23422
23423    # remove trailing .exe if any
23424    new_path="${new_path/%.exe/}"
23425
23426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23428  fi
23429
23430  else
23431    # We're on a posix platform. Hooray! :)
23432    # First separate the path from the arguments. This will split at the first
23433    # space.
23434    complete="$DUMPBIN"
23435    path="${complete%% *}"
23436    tmp="$complete EOL"
23437    arguments="${tmp#* }"
23438
23439    # Cannot rely on the command "which" here since it doesn't always work.
23440    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23441    if test -z "$is_absolute_path"; then
23442      # Path to executable is not absolute. Find it.
23443      IFS_save="$IFS"
23444      IFS=:
23445      for p in $PATH; do
23446        if test -f "$p/$path" && test -x "$p/$path"; then
23447          new_path="$p/$path"
23448          break
23449        fi
23450      done
23451      IFS="$IFS_save"
23452    else
23453      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23454$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23455      new_path="$path"
23456    fi
23457
23458    if test "x$new_path" = x; then
23459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23460$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23461        has_space=`$ECHO "$complete" | $GREP " "`
23462        if test "x$has_space" != x; then
23463          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23464$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23465        fi
23466        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23467      fi
23468  fi
23469
23470      # Now join together the path and the arguments once again
23471      if test "x$arguments" != xEOL; then
23472        new_complete="$new_path ${arguments% *}"
23473      else
23474        new_complete="$new_path"
23475      fi
23476
23477  if test "x$complete" != "x$new_complete"; then
23478      DUMPBIN="$new_complete"
23479      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23480$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23481    fi
23482
23483
23484    COMPILER_TYPE=CL
23485    CCXXFLAGS="$CCXXFLAGS -nologo"
23486
23487fi
23488
23489
23490
23491ac_ext=c
23492ac_cpp='$CPP $CPPFLAGS'
23493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23495ac_compiler_gnu=$ac_cv_c_compiler_gnu
23496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23497$as_echo_n "checking how to run the C preprocessor... " >&6; }
23498# On Suns, sometimes $CPP names a directory.
23499if test -n "$CPP" && test -d "$CPP"; then
23500  CPP=
23501fi
23502if test -z "$CPP"; then
23503  if test "${ac_cv_prog_CPP+set}" = set; then :
23504  $as_echo_n "(cached) " >&6
23505else
23506      # Double quotes because CPP needs to be expanded
23507    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23508    do
23509      ac_preproc_ok=false
23510for ac_c_preproc_warn_flag in '' yes
23511do
23512  # Use a header file that comes with gcc, so configuring glibc
23513  # with a fresh cross-compiler works.
23514  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23515  # <limits.h> exists even on freestanding compilers.
23516  # On the NeXT, cc -E runs the code through the compiler's parser,
23517  # not just through cpp. "Syntax error" is here to catch this case.
23518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23519/* end confdefs.h.  */
23520#ifdef __STDC__
23521# include <limits.h>
23522#else
23523# include <assert.h>
23524#endif
23525		     Syntax error
23526_ACEOF
23527if ac_fn_c_try_cpp "$LINENO"; then :
23528
23529else
23530  # Broken: fails on valid input.
23531continue
23532fi
23533rm -f conftest.err conftest.i conftest.$ac_ext
23534
23535  # OK, works on sane cases.  Now check whether nonexistent headers
23536  # can be detected and how.
23537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23538/* end confdefs.h.  */
23539#include <ac_nonexistent.h>
23540_ACEOF
23541if ac_fn_c_try_cpp "$LINENO"; then :
23542  # Broken: success on invalid input.
23543continue
23544else
23545  # Passes both tests.
23546ac_preproc_ok=:
23547break
23548fi
23549rm -f conftest.err conftest.i conftest.$ac_ext
23550
23551done
23552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23553rm -f conftest.i conftest.err conftest.$ac_ext
23554if $ac_preproc_ok; then :
23555  break
23556fi
23557
23558    done
23559    ac_cv_prog_CPP=$CPP
23560
23561fi
23562  CPP=$ac_cv_prog_CPP
23563else
23564  ac_cv_prog_CPP=$CPP
23565fi
23566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23567$as_echo "$CPP" >&6; }
23568ac_preproc_ok=false
23569for ac_c_preproc_warn_flag in '' yes
23570do
23571  # Use a header file that comes with gcc, so configuring glibc
23572  # with a fresh cross-compiler works.
23573  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23574  # <limits.h> exists even on freestanding compilers.
23575  # On the NeXT, cc -E runs the code through the compiler's parser,
23576  # not just through cpp. "Syntax error" is here to catch this case.
23577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23578/* end confdefs.h.  */
23579#ifdef __STDC__
23580# include <limits.h>
23581#else
23582# include <assert.h>
23583#endif
23584		     Syntax error
23585_ACEOF
23586if ac_fn_c_try_cpp "$LINENO"; then :
23587
23588else
23589  # Broken: fails on valid input.
23590continue
23591fi
23592rm -f conftest.err conftest.i conftest.$ac_ext
23593
23594  # OK, works on sane cases.  Now check whether nonexistent headers
23595  # can be detected and how.
23596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23597/* end confdefs.h.  */
23598#include <ac_nonexistent.h>
23599_ACEOF
23600if ac_fn_c_try_cpp "$LINENO"; then :
23601  # Broken: success on invalid input.
23602continue
23603else
23604  # Passes both tests.
23605ac_preproc_ok=:
23606break
23607fi
23608rm -f conftest.err conftest.i conftest.$ac_ext
23609
23610done
23611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23612rm -f conftest.i conftest.err conftest.$ac_ext
23613if $ac_preproc_ok; then :
23614
23615else
23616  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23618as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23619See \`config.log' for more details" "$LINENO" 5 ; }
23620fi
23621
23622ac_ext=cpp
23623ac_cpp='$CXXCPP $CPPFLAGS'
23624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23627
23628
23629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23630
23631  # First separate the path from the arguments. This will split at the first
23632  # space.
23633  complete="$CPP"
23634  path="${complete%% *}"
23635  tmp="$complete EOL"
23636  arguments="${tmp#* }"
23637
23638  # Input might be given as Windows format, start by converting to
23639  # unix format.
23640  new_path=`$CYGPATH -u "$path"`
23641
23642  # Now try to locate executable using which
23643  new_path=`$WHICH "$new_path" 2> /dev/null`
23644  # bat and cmd files are not always considered executable in cygwin causing which
23645  # to not find them
23646  if test "x$new_path" = x \
23647           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23648           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23649    new_path=`$CYGPATH -u "$path"`
23650  fi
23651  if test "x$new_path" = x; then
23652    # Oops. Which didn't find the executable.
23653    # The splitting of arguments from the executable at a space might have been incorrect,
23654    # since paths with space are more likely in Windows. Give it another try with the whole
23655    # argument.
23656    path="$complete"
23657    arguments="EOL"
23658    new_path=`$CYGPATH -u "$path"`
23659    new_path=`$WHICH "$new_path" 2> /dev/null`
23660    # bat and cmd files are not always considered executable in cygwin causing which
23661    # to not find them
23662    if test "x$new_path" = x \
23663             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23664             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23665      new_path=`$CYGPATH -u "$path"`
23666    fi
23667    if test "x$new_path" = x; then
23668      # It's still not found. Now this is an unrecoverable error.
23669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23670$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23671      has_space=`$ECHO "$complete" | $GREP " "`
23672      if test "x$has_space" != x; then
23673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23675      fi
23676      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23677    fi
23678  fi
23679
23680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23683  # "foo.exe" is OK but "foo" is an error.
23684  #
23685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23686  # It is also a way to make sure we got the proper file name for the real test later on.
23687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23688  if test "x$test_shortpath" = x; then
23689    # Short path failed, file does not exist as specified.
23690    # Try adding .exe or .cmd
23691    if test -f "${new_path}.exe"; then
23692       input_to_shortpath="${new_path}.exe"
23693    elif test -f "${new_path}.cmd"; then
23694       input_to_shortpath="${new_path}.cmd"
23695    else
23696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23697$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23698      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23699$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23700      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23701    fi
23702  else
23703    input_to_shortpath="$new_path"
23704  fi
23705
23706  # Call helper function which possibly converts this using DOS-style short mode.
23707  # If so, the updated path is stored in $new_path.
23708  new_path="$input_to_shortpath"
23709
23710  input_path="$input_to_shortpath"
23711  # Check if we need to convert this using DOS-style short mode. If the path
23712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23713  # take no chances and rewrite it.
23714  # Note: m4 eats our [], so we need to use [ and ] instead.
23715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23716  if test "x$has_forbidden_chars" != x; then
23717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23721      # Going to short mode and back again did indeed matter. Since short mode is
23722      # case insensitive, let's make it lowercase to improve readability.
23723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23724      # Now convert it back to Unix-stile (cygpath)
23725      input_path=`$CYGPATH -u "$shortmode_path"`
23726      new_path="$input_path"
23727    fi
23728  fi
23729
23730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23731  if test "x$test_cygdrive_prefix" = x; then
23732    # As a simple fix, exclude /usr/bin since it's not a real path.
23733    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23735      # a path prefixed by /cygdrive for fixpath to work.
23736      new_path="$CYGWIN_ROOT_PATH$input_path"
23737    fi
23738  fi
23739
23740  # remove trailing .exe if any
23741  new_path="${new_path/%.exe/}"
23742
23743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23744
23745  # First separate the path from the arguments. This will split at the first
23746  # space.
23747  complete="$CPP"
23748  path="${complete%% *}"
23749  tmp="$complete EOL"
23750  arguments="${tmp#* }"
23751
23752  # Input might be given as Windows format, start by converting to
23753  # unix format.
23754  new_path="$path"
23755
23756  windows_path="$new_path"
23757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23758    unix_path=`$CYGPATH -u "$windows_path"`
23759    new_path="$unix_path"
23760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23762    new_path="$unix_path"
23763  fi
23764
23765
23766  # Now try to locate executable using which
23767  new_path=`$WHICH "$new_path" 2> /dev/null`
23768
23769  if test "x$new_path" = x; then
23770    # Oops. Which didn't find the executable.
23771    # The splitting of arguments from the executable at a space might have been incorrect,
23772    # since paths with space are more likely in Windows. Give it another try with the whole
23773    # argument.
23774    path="$complete"
23775    arguments="EOL"
23776    new_path="$path"
23777
23778  windows_path="$new_path"
23779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23780    unix_path=`$CYGPATH -u "$windows_path"`
23781    new_path="$unix_path"
23782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23784    new_path="$unix_path"
23785  fi
23786
23787
23788    new_path=`$WHICH "$new_path" 2> /dev/null`
23789
23790    if test "x$new_path" = x; then
23791      # It's still not found. Now this is an unrecoverable error.
23792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23793$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23794      has_space=`$ECHO "$complete" | $GREP " "`
23795      if test "x$has_space" != x; then
23796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23798      fi
23799      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23800    fi
23801  fi
23802
23803  # Now new_path has a complete unix path to the binary
23804  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23805    # Keep paths in /bin as-is, but remove trailing .exe if any
23806    new_path="${new_path/%.exe/}"
23807    # Do not save /bin paths to all_fixpath_prefixes!
23808  else
23809    # Not in mixed or Windows style, start by that.
23810    new_path=`cmd //c echo $new_path`
23811
23812  input_path="$new_path"
23813  # Check if we need to convert this using DOS-style short mode. If the path
23814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815  # take no chances and rewrite it.
23816  # Note: m4 eats our [], so we need to use [ and ] instead.
23817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23818  if test "x$has_forbidden_chars" != x; then
23819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23821  fi
23822
23823    # Output is in $new_path
23824
23825  windows_path="$new_path"
23826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23827    unix_path=`$CYGPATH -u "$windows_path"`
23828    new_path="$unix_path"
23829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23831    new_path="$unix_path"
23832  fi
23833
23834    # remove trailing .exe if any
23835    new_path="${new_path/%.exe/}"
23836
23837    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23838    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23839  fi
23840
23841  else
23842    # We're on a posix platform. Hooray! :)
23843    # First separate the path from the arguments. This will split at the first
23844    # space.
23845    complete="$CPP"
23846    path="${complete%% *}"
23847    tmp="$complete EOL"
23848    arguments="${tmp#* }"
23849
23850    # Cannot rely on the command "which" here since it doesn't always work.
23851    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23852    if test -z "$is_absolute_path"; then
23853      # Path to executable is not absolute. Find it.
23854      IFS_save="$IFS"
23855      IFS=:
23856      for p in $PATH; do
23857        if test -f "$p/$path" && test -x "$p/$path"; then
23858          new_path="$p/$path"
23859          break
23860        fi
23861      done
23862      IFS="$IFS_save"
23863    else
23864      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23865$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23866      new_path="$path"
23867    fi
23868
23869    if test "x$new_path" = x; then
23870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23871$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23872        has_space=`$ECHO "$complete" | $GREP " "`
23873        if test "x$has_space" != x; then
23874          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23875$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23876        fi
23877        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23878      fi
23879  fi
23880
23881      # Now join together the path and the arguments once again
23882      if test "x$arguments" != xEOL; then
23883        new_complete="$new_path ${arguments% *}"
23884      else
23885        new_complete="$new_path"
23886      fi
23887
23888  if test "x$complete" != "x$new_complete"; then
23889      CPP="$new_complete"
23890      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23891$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23892    fi
23893
23894
23895ac_ext=cpp
23896ac_cpp='$CXXCPP $CPPFLAGS'
23897ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23898ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23899ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23901$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23902if test -z "$CXXCPP"; then
23903  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23904  $as_echo_n "(cached) " >&6
23905else
23906      # Double quotes because CXXCPP needs to be expanded
23907    for CXXCPP in "$CXX -E" "/lib/cpp"
23908    do
23909      ac_preproc_ok=false
23910for ac_cxx_preproc_warn_flag in '' yes
23911do
23912  # Use a header file that comes with gcc, so configuring glibc
23913  # with a fresh cross-compiler works.
23914  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23915  # <limits.h> exists even on freestanding compilers.
23916  # On the NeXT, cc -E runs the code through the compiler's parser,
23917  # not just through cpp. "Syntax error" is here to catch this case.
23918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23919/* end confdefs.h.  */
23920#ifdef __STDC__
23921# include <limits.h>
23922#else
23923# include <assert.h>
23924#endif
23925		     Syntax error
23926_ACEOF
23927if ac_fn_cxx_try_cpp "$LINENO"; then :
23928
23929else
23930  # Broken: fails on valid input.
23931continue
23932fi
23933rm -f conftest.err conftest.i conftest.$ac_ext
23934
23935  # OK, works on sane cases.  Now check whether nonexistent headers
23936  # can be detected and how.
23937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23938/* end confdefs.h.  */
23939#include <ac_nonexistent.h>
23940_ACEOF
23941if ac_fn_cxx_try_cpp "$LINENO"; then :
23942  # Broken: success on invalid input.
23943continue
23944else
23945  # Passes both tests.
23946ac_preproc_ok=:
23947break
23948fi
23949rm -f conftest.err conftest.i conftest.$ac_ext
23950
23951done
23952# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23953rm -f conftest.i conftest.err conftest.$ac_ext
23954if $ac_preproc_ok; then :
23955  break
23956fi
23957
23958    done
23959    ac_cv_prog_CXXCPP=$CXXCPP
23960
23961fi
23962  CXXCPP=$ac_cv_prog_CXXCPP
23963else
23964  ac_cv_prog_CXXCPP=$CXXCPP
23965fi
23966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23967$as_echo "$CXXCPP" >&6; }
23968ac_preproc_ok=false
23969for ac_cxx_preproc_warn_flag in '' yes
23970do
23971  # Use a header file that comes with gcc, so configuring glibc
23972  # with a fresh cross-compiler works.
23973  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23974  # <limits.h> exists even on freestanding compilers.
23975  # On the NeXT, cc -E runs the code through the compiler's parser,
23976  # not just through cpp. "Syntax error" is here to catch this case.
23977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23978/* end confdefs.h.  */
23979#ifdef __STDC__
23980# include <limits.h>
23981#else
23982# include <assert.h>
23983#endif
23984		     Syntax error
23985_ACEOF
23986if ac_fn_cxx_try_cpp "$LINENO"; then :
23987
23988else
23989  # Broken: fails on valid input.
23990continue
23991fi
23992rm -f conftest.err conftest.i conftest.$ac_ext
23993
23994  # OK, works on sane cases.  Now check whether nonexistent headers
23995  # can be detected and how.
23996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23997/* end confdefs.h.  */
23998#include <ac_nonexistent.h>
23999_ACEOF
24000if ac_fn_cxx_try_cpp "$LINENO"; then :
24001  # Broken: success on invalid input.
24002continue
24003else
24004  # Passes both tests.
24005ac_preproc_ok=:
24006break
24007fi
24008rm -f conftest.err conftest.i conftest.$ac_ext
24009
24010done
24011# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24012rm -f conftest.i conftest.err conftest.$ac_ext
24013if $ac_preproc_ok; then :
24014
24015else
24016  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24018as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24019See \`config.log' for more details" "$LINENO" 5 ; }
24020fi
24021
24022ac_ext=cpp
24023ac_cpp='$CXXCPP $CPPFLAGS'
24024ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24025ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24026ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24027
24028
24029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24030
24031  # First separate the path from the arguments. This will split at the first
24032  # space.
24033  complete="$CXXCPP"
24034  path="${complete%% *}"
24035  tmp="$complete EOL"
24036  arguments="${tmp#* }"
24037
24038  # Input might be given as Windows format, start by converting to
24039  # unix format.
24040  new_path=`$CYGPATH -u "$path"`
24041
24042  # Now try to locate executable using which
24043  new_path=`$WHICH "$new_path" 2> /dev/null`
24044  # bat and cmd files are not always considered executable in cygwin causing which
24045  # to not find them
24046  if test "x$new_path" = x \
24047           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24048           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24049    new_path=`$CYGPATH -u "$path"`
24050  fi
24051  if test "x$new_path" = x; then
24052    # Oops. Which didn't find the executable.
24053    # The splitting of arguments from the executable at a space might have been incorrect,
24054    # since paths with space are more likely in Windows. Give it another try with the whole
24055    # argument.
24056    path="$complete"
24057    arguments="EOL"
24058    new_path=`$CYGPATH -u "$path"`
24059    new_path=`$WHICH "$new_path" 2> /dev/null`
24060    # bat and cmd files are not always considered executable in cygwin causing which
24061    # to not find them
24062    if test "x$new_path" = x \
24063             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24064             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24065      new_path=`$CYGPATH -u "$path"`
24066    fi
24067    if test "x$new_path" = x; then
24068      # It's still not found. Now this is an unrecoverable error.
24069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24070$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24071      has_space=`$ECHO "$complete" | $GREP " "`
24072      if test "x$has_space" != x; then
24073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24075      fi
24076      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24077    fi
24078  fi
24079
24080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24083  # "foo.exe" is OK but "foo" is an error.
24084  #
24085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24086  # It is also a way to make sure we got the proper file name for the real test later on.
24087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24088  if test "x$test_shortpath" = x; then
24089    # Short path failed, file does not exist as specified.
24090    # Try adding .exe or .cmd
24091    if test -f "${new_path}.exe"; then
24092       input_to_shortpath="${new_path}.exe"
24093    elif test -f "${new_path}.cmd"; then
24094       input_to_shortpath="${new_path}.cmd"
24095    else
24096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24097$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24098      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24099$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24100      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24101    fi
24102  else
24103    input_to_shortpath="$new_path"
24104  fi
24105
24106  # Call helper function which possibly converts this using DOS-style short mode.
24107  # If so, the updated path is stored in $new_path.
24108  new_path="$input_to_shortpath"
24109
24110  input_path="$input_to_shortpath"
24111  # Check if we need to convert this using DOS-style short mode. If the path
24112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24113  # take no chances and rewrite it.
24114  # Note: m4 eats our [], so we need to use [ and ] instead.
24115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24116  if test "x$has_forbidden_chars" != x; then
24117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24121      # Going to short mode and back again did indeed matter. Since short mode is
24122      # case insensitive, let's make it lowercase to improve readability.
24123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24124      # Now convert it back to Unix-stile (cygpath)
24125      input_path=`$CYGPATH -u "$shortmode_path"`
24126      new_path="$input_path"
24127    fi
24128  fi
24129
24130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24131  if test "x$test_cygdrive_prefix" = x; then
24132    # As a simple fix, exclude /usr/bin since it's not a real path.
24133    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24135      # a path prefixed by /cygdrive for fixpath to work.
24136      new_path="$CYGWIN_ROOT_PATH$input_path"
24137    fi
24138  fi
24139
24140  # remove trailing .exe if any
24141  new_path="${new_path/%.exe/}"
24142
24143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24144
24145  # First separate the path from the arguments. This will split at the first
24146  # space.
24147  complete="$CXXCPP"
24148  path="${complete%% *}"
24149  tmp="$complete EOL"
24150  arguments="${tmp#* }"
24151
24152  # Input might be given as Windows format, start by converting to
24153  # unix format.
24154  new_path="$path"
24155
24156  windows_path="$new_path"
24157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24158    unix_path=`$CYGPATH -u "$windows_path"`
24159    new_path="$unix_path"
24160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24162    new_path="$unix_path"
24163  fi
24164
24165
24166  # Now try to locate executable using which
24167  new_path=`$WHICH "$new_path" 2> /dev/null`
24168
24169  if test "x$new_path" = x; then
24170    # Oops. Which didn't find the executable.
24171    # The splitting of arguments from the executable at a space might have been incorrect,
24172    # since paths with space are more likely in Windows. Give it another try with the whole
24173    # argument.
24174    path="$complete"
24175    arguments="EOL"
24176    new_path="$path"
24177
24178  windows_path="$new_path"
24179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24180    unix_path=`$CYGPATH -u "$windows_path"`
24181    new_path="$unix_path"
24182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24184    new_path="$unix_path"
24185  fi
24186
24187
24188    new_path=`$WHICH "$new_path" 2> /dev/null`
24189
24190    if test "x$new_path" = x; then
24191      # It's still not found. Now this is an unrecoverable error.
24192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24193$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24194      has_space=`$ECHO "$complete" | $GREP " "`
24195      if test "x$has_space" != x; then
24196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24198      fi
24199      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24200    fi
24201  fi
24202
24203  # Now new_path has a complete unix path to the binary
24204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24205    # Keep paths in /bin as-is, but remove trailing .exe if any
24206    new_path="${new_path/%.exe/}"
24207    # Do not save /bin paths to all_fixpath_prefixes!
24208  else
24209    # Not in mixed or Windows style, start by that.
24210    new_path=`cmd //c echo $new_path`
24211
24212  input_path="$new_path"
24213  # Check if we need to convert this using DOS-style short mode. If the path
24214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24215  # take no chances and rewrite it.
24216  # Note: m4 eats our [], so we need to use [ and ] instead.
24217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24218  if test "x$has_forbidden_chars" != x; then
24219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24221  fi
24222
24223    # Output is in $new_path
24224
24225  windows_path="$new_path"
24226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24227    unix_path=`$CYGPATH -u "$windows_path"`
24228    new_path="$unix_path"
24229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24231    new_path="$unix_path"
24232  fi
24233
24234    # remove trailing .exe if any
24235    new_path="${new_path/%.exe/}"
24236
24237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24239  fi
24240
24241  else
24242    # We're on a posix platform. Hooray! :)
24243    # First separate the path from the arguments. This will split at the first
24244    # space.
24245    complete="$CXXCPP"
24246    path="${complete%% *}"
24247    tmp="$complete EOL"
24248    arguments="${tmp#* }"
24249
24250    # Cannot rely on the command "which" here since it doesn't always work.
24251    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24252    if test -z "$is_absolute_path"; then
24253      # Path to executable is not absolute. Find it.
24254      IFS_save="$IFS"
24255      IFS=:
24256      for p in $PATH; do
24257        if test -f "$p/$path" && test -x "$p/$path"; then
24258          new_path="$p/$path"
24259          break
24260        fi
24261      done
24262      IFS="$IFS_save"
24263    else
24264      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24265$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24266      new_path="$path"
24267    fi
24268
24269    if test "x$new_path" = x; then
24270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24271$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24272        has_space=`$ECHO "$complete" | $GREP " "`
24273        if test "x$has_space" != x; then
24274          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24276        fi
24277        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24278      fi
24279  fi
24280
24281      # Now join together the path and the arguments once again
24282      if test "x$arguments" != xEOL; then
24283        new_complete="$new_path ${arguments% *}"
24284      else
24285        new_complete="$new_path"
24286      fi
24287
24288  if test "x$complete" != "x$new_complete"; then
24289      CXXCPP="$new_complete"
24290      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24291$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24292    fi
24293
24294
24295if test "x$COMPILE_TYPE" != "xcross"; then
24296    # If we are not cross compiling, use the same compilers for
24297    # building the build platform executables. The cross-compilation
24298    # case needed to be done earlier, but this can only be done after
24299    # the native tools have been localized.
24300    BUILD_CC="$CC"
24301    BUILD_CXX="$CXX"
24302    BUILD_LD="$LD"
24303fi
24304
24305# for solaris we really need solaris tools, and not gnu equivalent
24306#   these seems to normally reside in /usr/ccs/bin so add that to path before
24307#   starting to probe
24308#
24309#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24310#         so that it can be overriden --with-tools-dir
24311if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24312    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24313fi
24314
24315# Find the right assembler.
24316if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24317    # Extract the first word of "as", so it can be a program name with args.
24318set dummy as; ac_word=$2
24319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24320$as_echo_n "checking for $ac_word... " >&6; }
24321if test "${ac_cv_path_AS+set}" = set; then :
24322  $as_echo_n "(cached) " >&6
24323else
24324  case $AS in
24325  [\\/]* | ?:[\\/]*)
24326  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24327  ;;
24328  *)
24329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24330for as_dir in $PATH
24331do
24332  IFS=$as_save_IFS
24333  test -z "$as_dir" && as_dir=.
24334    for ac_exec_ext in '' $ac_executable_extensions; do
24335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24336    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24338    break 2
24339  fi
24340done
24341  done
24342IFS=$as_save_IFS
24343
24344  ;;
24345esac
24346fi
24347AS=$ac_cv_path_AS
24348if test -n "$AS"; then
24349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24350$as_echo "$AS" >&6; }
24351else
24352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24353$as_echo "no" >&6; }
24354fi
24355
24356
24357
24358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24359
24360  # First separate the path from the arguments. This will split at the first
24361  # space.
24362  complete="$AS"
24363  path="${complete%% *}"
24364  tmp="$complete EOL"
24365  arguments="${tmp#* }"
24366
24367  # Input might be given as Windows format, start by converting to
24368  # unix format.
24369  new_path=`$CYGPATH -u "$path"`
24370
24371  # Now try to locate executable using which
24372  new_path=`$WHICH "$new_path" 2> /dev/null`
24373  # bat and cmd files are not always considered executable in cygwin causing which
24374  # to not find them
24375  if test "x$new_path" = x \
24376           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24377           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24378    new_path=`$CYGPATH -u "$path"`
24379  fi
24380  if test "x$new_path" = x; then
24381    # Oops. Which didn't find the executable.
24382    # The splitting of arguments from the executable at a space might have been incorrect,
24383    # since paths with space are more likely in Windows. Give it another try with the whole
24384    # argument.
24385    path="$complete"
24386    arguments="EOL"
24387    new_path=`$CYGPATH -u "$path"`
24388    new_path=`$WHICH "$new_path" 2> /dev/null`
24389    # bat and cmd files are not always considered executable in cygwin causing which
24390    # to not find them
24391    if test "x$new_path" = x \
24392             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24393             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24394      new_path=`$CYGPATH -u "$path"`
24395    fi
24396    if test "x$new_path" = x; then
24397      # It's still not found. Now this is an unrecoverable error.
24398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24399$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24400      has_space=`$ECHO "$complete" | $GREP " "`
24401      if test "x$has_space" != x; then
24402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24404      fi
24405      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24406    fi
24407  fi
24408
24409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24412  # "foo.exe" is OK but "foo" is an error.
24413  #
24414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24415  # It is also a way to make sure we got the proper file name for the real test later on.
24416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24417  if test "x$test_shortpath" = x; then
24418    # Short path failed, file does not exist as specified.
24419    # Try adding .exe or .cmd
24420    if test -f "${new_path}.exe"; then
24421       input_to_shortpath="${new_path}.exe"
24422    elif test -f "${new_path}.cmd"; then
24423       input_to_shortpath="${new_path}.cmd"
24424    else
24425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24426$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24427      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24428$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24429      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24430    fi
24431  else
24432    input_to_shortpath="$new_path"
24433  fi
24434
24435  # Call helper function which possibly converts this using DOS-style short mode.
24436  # If so, the updated path is stored in $new_path.
24437  new_path="$input_to_shortpath"
24438
24439  input_path="$input_to_shortpath"
24440  # Check if we need to convert this using DOS-style short mode. If the path
24441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24442  # take no chances and rewrite it.
24443  # Note: m4 eats our [], so we need to use [ and ] instead.
24444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24445  if test "x$has_forbidden_chars" != x; then
24446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24450      # Going to short mode and back again did indeed matter. Since short mode is
24451      # case insensitive, let's make it lowercase to improve readability.
24452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24453      # Now convert it back to Unix-stile (cygpath)
24454      input_path=`$CYGPATH -u "$shortmode_path"`
24455      new_path="$input_path"
24456    fi
24457  fi
24458
24459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24460  if test "x$test_cygdrive_prefix" = x; then
24461    # As a simple fix, exclude /usr/bin since it's not a real path.
24462    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24464      # a path prefixed by /cygdrive for fixpath to work.
24465      new_path="$CYGWIN_ROOT_PATH$input_path"
24466    fi
24467  fi
24468
24469  # remove trailing .exe if any
24470  new_path="${new_path/%.exe/}"
24471
24472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24473
24474  # First separate the path from the arguments. This will split at the first
24475  # space.
24476  complete="$AS"
24477  path="${complete%% *}"
24478  tmp="$complete EOL"
24479  arguments="${tmp#* }"
24480
24481  # Input might be given as Windows format, start by converting to
24482  # unix format.
24483  new_path="$path"
24484
24485  windows_path="$new_path"
24486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24487    unix_path=`$CYGPATH -u "$windows_path"`
24488    new_path="$unix_path"
24489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24491    new_path="$unix_path"
24492  fi
24493
24494
24495  # Now try to locate executable using which
24496  new_path=`$WHICH "$new_path" 2> /dev/null`
24497
24498  if test "x$new_path" = x; then
24499    # Oops. Which didn't find the executable.
24500    # The splitting of arguments from the executable at a space might have been incorrect,
24501    # since paths with space are more likely in Windows. Give it another try with the whole
24502    # argument.
24503    path="$complete"
24504    arguments="EOL"
24505    new_path="$path"
24506
24507  windows_path="$new_path"
24508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24509    unix_path=`$CYGPATH -u "$windows_path"`
24510    new_path="$unix_path"
24511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24513    new_path="$unix_path"
24514  fi
24515
24516
24517    new_path=`$WHICH "$new_path" 2> /dev/null`
24518
24519    if test "x$new_path" = x; then
24520      # It's still not found. Now this is an unrecoverable error.
24521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24522$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24523      has_space=`$ECHO "$complete" | $GREP " "`
24524      if test "x$has_space" != x; then
24525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24527      fi
24528      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24529    fi
24530  fi
24531
24532  # Now new_path has a complete unix path to the binary
24533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24534    # Keep paths in /bin as-is, but remove trailing .exe if any
24535    new_path="${new_path/%.exe/}"
24536    # Do not save /bin paths to all_fixpath_prefixes!
24537  else
24538    # Not in mixed or Windows style, start by that.
24539    new_path=`cmd //c echo $new_path`
24540
24541  input_path="$new_path"
24542  # Check if we need to convert this using DOS-style short mode. If the path
24543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24544  # take no chances and rewrite it.
24545  # Note: m4 eats our [], so we need to use [ and ] instead.
24546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24547  if test "x$has_forbidden_chars" != x; then
24548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24550  fi
24551
24552    # Output is in $new_path
24553
24554  windows_path="$new_path"
24555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24556    unix_path=`$CYGPATH -u "$windows_path"`
24557    new_path="$unix_path"
24558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24560    new_path="$unix_path"
24561  fi
24562
24563    # remove trailing .exe if any
24564    new_path="${new_path/%.exe/}"
24565
24566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24568  fi
24569
24570  else
24571    # We're on a posix platform. Hooray! :)
24572    # First separate the path from the arguments. This will split at the first
24573    # space.
24574    complete="$AS"
24575    path="${complete%% *}"
24576    tmp="$complete EOL"
24577    arguments="${tmp#* }"
24578
24579    # Cannot rely on the command "which" here since it doesn't always work.
24580    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24581    if test -z "$is_absolute_path"; then
24582      # Path to executable is not absolute. Find it.
24583      IFS_save="$IFS"
24584      IFS=:
24585      for p in $PATH; do
24586        if test -f "$p/$path" && test -x "$p/$path"; then
24587          new_path="$p/$path"
24588          break
24589        fi
24590      done
24591      IFS="$IFS_save"
24592    else
24593      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24594$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24595      new_path="$path"
24596    fi
24597
24598    if test "x$new_path" = x; then
24599        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24600$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24601        has_space=`$ECHO "$complete" | $GREP " "`
24602        if test "x$has_space" != x; then
24603          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24604$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24605        fi
24606        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24607      fi
24608  fi
24609
24610      # Now join together the path and the arguments once again
24611      if test "x$arguments" != xEOL; then
24612        new_complete="$new_path ${arguments% *}"
24613      else
24614        new_complete="$new_path"
24615      fi
24616
24617  if test "x$complete" != "x$new_complete"; then
24618      AS="$new_complete"
24619      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24620$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24621    fi
24622
24623else
24624    AS="$CC -c"
24625fi
24626
24627
24628if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24629    for ac_prog in gnm nm
24630do
24631  # Extract the first word of "$ac_prog", so it can be a program name with args.
24632set dummy $ac_prog; ac_word=$2
24633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24634$as_echo_n "checking for $ac_word... " >&6; }
24635if test "${ac_cv_path_NM+set}" = set; then :
24636  $as_echo_n "(cached) " >&6
24637else
24638  case $NM in
24639  [\\/]* | ?:[\\/]*)
24640  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24641  ;;
24642  *)
24643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24644for as_dir in $PATH
24645do
24646  IFS=$as_save_IFS
24647  test -z "$as_dir" && as_dir=.
24648    for ac_exec_ext in '' $ac_executable_extensions; do
24649  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24650    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24652    break 2
24653  fi
24654done
24655  done
24656IFS=$as_save_IFS
24657
24658  ;;
24659esac
24660fi
24661NM=$ac_cv_path_NM
24662if test -n "$NM"; then
24663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24664$as_echo "$NM" >&6; }
24665else
24666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24667$as_echo "no" >&6; }
24668fi
24669
24670
24671  test -n "$NM" && break
24672done
24673
24674
24675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24676
24677  # First separate the path from the arguments. This will split at the first
24678  # space.
24679  complete="$NM"
24680  path="${complete%% *}"
24681  tmp="$complete EOL"
24682  arguments="${tmp#* }"
24683
24684  # Input might be given as Windows format, start by converting to
24685  # unix format.
24686  new_path=`$CYGPATH -u "$path"`
24687
24688  # Now try to locate executable using which
24689  new_path=`$WHICH "$new_path" 2> /dev/null`
24690  # bat and cmd files are not always considered executable in cygwin causing which
24691  # to not find them
24692  if test "x$new_path" = x \
24693           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24694           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24695    new_path=`$CYGPATH -u "$path"`
24696  fi
24697  if test "x$new_path" = x; then
24698    # Oops. Which didn't find the executable.
24699    # The splitting of arguments from the executable at a space might have been incorrect,
24700    # since paths with space are more likely in Windows. Give it another try with the whole
24701    # argument.
24702    path="$complete"
24703    arguments="EOL"
24704    new_path=`$CYGPATH -u "$path"`
24705    new_path=`$WHICH "$new_path" 2> /dev/null`
24706    # bat and cmd files are not always considered executable in cygwin causing which
24707    # to not find them
24708    if test "x$new_path" = x \
24709             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24710             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24711      new_path=`$CYGPATH -u "$path"`
24712    fi
24713    if test "x$new_path" = x; then
24714      # It's still not found. Now this is an unrecoverable error.
24715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24716$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24717      has_space=`$ECHO "$complete" | $GREP " "`
24718      if test "x$has_space" != x; then
24719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24721      fi
24722      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24723    fi
24724  fi
24725
24726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24729  # "foo.exe" is OK but "foo" is an error.
24730  #
24731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24732  # It is also a way to make sure we got the proper file name for the real test later on.
24733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24734  if test "x$test_shortpath" = x; then
24735    # Short path failed, file does not exist as specified.
24736    # Try adding .exe or .cmd
24737    if test -f "${new_path}.exe"; then
24738       input_to_shortpath="${new_path}.exe"
24739    elif test -f "${new_path}.cmd"; then
24740       input_to_shortpath="${new_path}.cmd"
24741    else
24742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24743$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24746      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24747    fi
24748  else
24749    input_to_shortpath="$new_path"
24750  fi
24751
24752  # Call helper function which possibly converts this using DOS-style short mode.
24753  # If so, the updated path is stored in $new_path.
24754  new_path="$input_to_shortpath"
24755
24756  input_path="$input_to_shortpath"
24757  # Check if we need to convert this using DOS-style short mode. If the path
24758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24759  # take no chances and rewrite it.
24760  # Note: m4 eats our [], so we need to use [ and ] instead.
24761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24762  if test "x$has_forbidden_chars" != x; then
24763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24767      # Going to short mode and back again did indeed matter. Since short mode is
24768      # case insensitive, let's make it lowercase to improve readability.
24769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24770      # Now convert it back to Unix-stile (cygpath)
24771      input_path=`$CYGPATH -u "$shortmode_path"`
24772      new_path="$input_path"
24773    fi
24774  fi
24775
24776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24777  if test "x$test_cygdrive_prefix" = x; then
24778    # As a simple fix, exclude /usr/bin since it's not a real path.
24779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24781      # a path prefixed by /cygdrive for fixpath to work.
24782      new_path="$CYGWIN_ROOT_PATH$input_path"
24783    fi
24784  fi
24785
24786  # remove trailing .exe if any
24787  new_path="${new_path/%.exe/}"
24788
24789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24790
24791  # First separate the path from the arguments. This will split at the first
24792  # space.
24793  complete="$NM"
24794  path="${complete%% *}"
24795  tmp="$complete EOL"
24796  arguments="${tmp#* }"
24797
24798  # Input might be given as Windows format, start by converting to
24799  # unix format.
24800  new_path="$path"
24801
24802  windows_path="$new_path"
24803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24804    unix_path=`$CYGPATH -u "$windows_path"`
24805    new_path="$unix_path"
24806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24808    new_path="$unix_path"
24809  fi
24810
24811
24812  # Now try to locate executable using which
24813  new_path=`$WHICH "$new_path" 2> /dev/null`
24814
24815  if test "x$new_path" = x; then
24816    # Oops. Which didn't find the executable.
24817    # The splitting of arguments from the executable at a space might have been incorrect,
24818    # since paths with space are more likely in Windows. Give it another try with the whole
24819    # argument.
24820    path="$complete"
24821    arguments="EOL"
24822    new_path="$path"
24823
24824  windows_path="$new_path"
24825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24826    unix_path=`$CYGPATH -u "$windows_path"`
24827    new_path="$unix_path"
24828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24830    new_path="$unix_path"
24831  fi
24832
24833
24834    new_path=`$WHICH "$new_path" 2> /dev/null`
24835
24836    if test "x$new_path" = x; then
24837      # It's still not found. Now this is an unrecoverable error.
24838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24839$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24840      has_space=`$ECHO "$complete" | $GREP " "`
24841      if test "x$has_space" != x; then
24842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24844      fi
24845      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24846    fi
24847  fi
24848
24849  # Now new_path has a complete unix path to the binary
24850  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24851    # Keep paths in /bin as-is, but remove trailing .exe if any
24852    new_path="${new_path/%.exe/}"
24853    # Do not save /bin paths to all_fixpath_prefixes!
24854  else
24855    # Not in mixed or Windows style, start by that.
24856    new_path=`cmd //c echo $new_path`
24857
24858  input_path="$new_path"
24859  # Check if we need to convert this using DOS-style short mode. If the path
24860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24861  # take no chances and rewrite it.
24862  # Note: m4 eats our [], so we need to use [ and ] instead.
24863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24864  if test "x$has_forbidden_chars" != x; then
24865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24867  fi
24868
24869    # Output is in $new_path
24870
24871  windows_path="$new_path"
24872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24873    unix_path=`$CYGPATH -u "$windows_path"`
24874    new_path="$unix_path"
24875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24877    new_path="$unix_path"
24878  fi
24879
24880    # remove trailing .exe if any
24881    new_path="${new_path/%.exe/}"
24882
24883    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24884    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24885  fi
24886
24887  else
24888    # We're on a posix platform. Hooray! :)
24889    # First separate the path from the arguments. This will split at the first
24890    # space.
24891    complete="$NM"
24892    path="${complete%% *}"
24893    tmp="$complete EOL"
24894    arguments="${tmp#* }"
24895
24896    # Cannot rely on the command "which" here since it doesn't always work.
24897    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24898    if test -z "$is_absolute_path"; then
24899      # Path to executable is not absolute. Find it.
24900      IFS_save="$IFS"
24901      IFS=:
24902      for p in $PATH; do
24903        if test -f "$p/$path" && test -x "$p/$path"; then
24904          new_path="$p/$path"
24905          break
24906        fi
24907      done
24908      IFS="$IFS_save"
24909    else
24910      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24911$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24912      new_path="$path"
24913    fi
24914
24915    if test "x$new_path" = x; then
24916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24917$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24918        has_space=`$ECHO "$complete" | $GREP " "`
24919        if test "x$has_space" != x; then
24920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24922        fi
24923        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24924      fi
24925  fi
24926
24927      # Now join together the path and the arguments once again
24928      if test "x$arguments" != xEOL; then
24929        new_complete="$new_path ${arguments% *}"
24930      else
24931        new_complete="$new_path"
24932      fi
24933
24934  if test "x$complete" != "x$new_complete"; then
24935      NM="$new_complete"
24936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24937$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24938    fi
24939
24940    # Extract the first word of "strip", so it can be a program name with args.
24941set dummy strip; ac_word=$2
24942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24943$as_echo_n "checking for $ac_word... " >&6; }
24944if test "${ac_cv_path_STRIP+set}" = set; then :
24945  $as_echo_n "(cached) " >&6
24946else
24947  case $STRIP in
24948  [\\/]* | ?:[\\/]*)
24949  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24950  ;;
24951  *)
24952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24953for as_dir in $PATH
24954do
24955  IFS=$as_save_IFS
24956  test -z "$as_dir" && as_dir=.
24957    for ac_exec_ext in '' $ac_executable_extensions; do
24958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24959    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24961    break 2
24962  fi
24963done
24964  done
24965IFS=$as_save_IFS
24966
24967  ;;
24968esac
24969fi
24970STRIP=$ac_cv_path_STRIP
24971if test -n "$STRIP"; then
24972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24973$as_echo "$STRIP" >&6; }
24974else
24975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24976$as_echo "no" >&6; }
24977fi
24978
24979
24980
24981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24982
24983  # First separate the path from the arguments. This will split at the first
24984  # space.
24985  complete="$STRIP"
24986  path="${complete%% *}"
24987  tmp="$complete EOL"
24988  arguments="${tmp#* }"
24989
24990  # Input might be given as Windows format, start by converting to
24991  # unix format.
24992  new_path=`$CYGPATH -u "$path"`
24993
24994  # Now try to locate executable using which
24995  new_path=`$WHICH "$new_path" 2> /dev/null`
24996  # bat and cmd files are not always considered executable in cygwin causing which
24997  # to not find them
24998  if test "x$new_path" = x \
24999           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25000           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25001    new_path=`$CYGPATH -u "$path"`
25002  fi
25003  if test "x$new_path" = x; then
25004    # Oops. Which didn't find the executable.
25005    # The splitting of arguments from the executable at a space might have been incorrect,
25006    # since paths with space are more likely in Windows. Give it another try with the whole
25007    # argument.
25008    path="$complete"
25009    arguments="EOL"
25010    new_path=`$CYGPATH -u "$path"`
25011    new_path=`$WHICH "$new_path" 2> /dev/null`
25012    # bat and cmd files are not always considered executable in cygwin causing which
25013    # to not find them
25014    if test "x$new_path" = x \
25015             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25016             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25017      new_path=`$CYGPATH -u "$path"`
25018    fi
25019    if test "x$new_path" = x; then
25020      # It's still not found. Now this is an unrecoverable error.
25021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25022$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25023      has_space=`$ECHO "$complete" | $GREP " "`
25024      if test "x$has_space" != x; then
25025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25027      fi
25028      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25029    fi
25030  fi
25031
25032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25035  # "foo.exe" is OK but "foo" is an error.
25036  #
25037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25038  # It is also a way to make sure we got the proper file name for the real test later on.
25039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25040  if test "x$test_shortpath" = x; then
25041    # Short path failed, file does not exist as specified.
25042    # Try adding .exe or .cmd
25043    if test -f "${new_path}.exe"; then
25044       input_to_shortpath="${new_path}.exe"
25045    elif test -f "${new_path}.cmd"; then
25046       input_to_shortpath="${new_path}.cmd"
25047    else
25048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25049$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25052      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25053    fi
25054  else
25055    input_to_shortpath="$new_path"
25056  fi
25057
25058  # Call helper function which possibly converts this using DOS-style short mode.
25059  # If so, the updated path is stored in $new_path.
25060  new_path="$input_to_shortpath"
25061
25062  input_path="$input_to_shortpath"
25063  # Check if we need to convert this using DOS-style short mode. If the path
25064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25065  # take no chances and rewrite it.
25066  # Note: m4 eats our [], so we need to use [ and ] instead.
25067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25068  if test "x$has_forbidden_chars" != x; then
25069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25073      # Going to short mode and back again did indeed matter. Since short mode is
25074      # case insensitive, let's make it lowercase to improve readability.
25075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25076      # Now convert it back to Unix-stile (cygpath)
25077      input_path=`$CYGPATH -u "$shortmode_path"`
25078      new_path="$input_path"
25079    fi
25080  fi
25081
25082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25083  if test "x$test_cygdrive_prefix" = x; then
25084    # As a simple fix, exclude /usr/bin since it's not a real path.
25085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25087      # a path prefixed by /cygdrive for fixpath to work.
25088      new_path="$CYGWIN_ROOT_PATH$input_path"
25089    fi
25090  fi
25091
25092  # remove trailing .exe if any
25093  new_path="${new_path/%.exe/}"
25094
25095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25096
25097  # First separate the path from the arguments. This will split at the first
25098  # space.
25099  complete="$STRIP"
25100  path="${complete%% *}"
25101  tmp="$complete EOL"
25102  arguments="${tmp#* }"
25103
25104  # Input might be given as Windows format, start by converting to
25105  # unix format.
25106  new_path="$path"
25107
25108  windows_path="$new_path"
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110    unix_path=`$CYGPATH -u "$windows_path"`
25111    new_path="$unix_path"
25112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114    new_path="$unix_path"
25115  fi
25116
25117
25118  # Now try to locate executable using which
25119  new_path=`$WHICH "$new_path" 2> /dev/null`
25120
25121  if test "x$new_path" = x; then
25122    # Oops. Which didn't find the executable.
25123    # The splitting of arguments from the executable at a space might have been incorrect,
25124    # since paths with space are more likely in Windows. Give it another try with the whole
25125    # argument.
25126    path="$complete"
25127    arguments="EOL"
25128    new_path="$path"
25129
25130  windows_path="$new_path"
25131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25132    unix_path=`$CYGPATH -u "$windows_path"`
25133    new_path="$unix_path"
25134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25136    new_path="$unix_path"
25137  fi
25138
25139
25140    new_path=`$WHICH "$new_path" 2> /dev/null`
25141
25142    if test "x$new_path" = x; then
25143      # It's still not found. Now this is an unrecoverable error.
25144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25145$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25146      has_space=`$ECHO "$complete" | $GREP " "`
25147      if test "x$has_space" != x; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25150      fi
25151      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25152    fi
25153  fi
25154
25155  # Now new_path has a complete unix path to the binary
25156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25157    # Keep paths in /bin as-is, but remove trailing .exe if any
25158    new_path="${new_path/%.exe/}"
25159    # Do not save /bin paths to all_fixpath_prefixes!
25160  else
25161    # Not in mixed or Windows style, start by that.
25162    new_path=`cmd //c echo $new_path`
25163
25164  input_path="$new_path"
25165  # Check if we need to convert this using DOS-style short mode. If the path
25166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25167  # take no chances and rewrite it.
25168  # Note: m4 eats our [], so we need to use [ and ] instead.
25169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25170  if test "x$has_forbidden_chars" != x; then
25171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25173  fi
25174
25175    # Output is in $new_path
25176
25177  windows_path="$new_path"
25178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25179    unix_path=`$CYGPATH -u "$windows_path"`
25180    new_path="$unix_path"
25181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25183    new_path="$unix_path"
25184  fi
25185
25186    # remove trailing .exe if any
25187    new_path="${new_path/%.exe/}"
25188
25189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25191  fi
25192
25193  else
25194    # We're on a posix platform. Hooray! :)
25195    # First separate the path from the arguments. This will split at the first
25196    # space.
25197    complete="$STRIP"
25198    path="${complete%% *}"
25199    tmp="$complete EOL"
25200    arguments="${tmp#* }"
25201
25202    # Cannot rely on the command "which" here since it doesn't always work.
25203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25204    if test -z "$is_absolute_path"; then
25205      # Path to executable is not absolute. Find it.
25206      IFS_save="$IFS"
25207      IFS=:
25208      for p in $PATH; do
25209        if test -f "$p/$path" && test -x "$p/$path"; then
25210          new_path="$p/$path"
25211          break
25212        fi
25213      done
25214      IFS="$IFS_save"
25215    else
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25217$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25218      new_path="$path"
25219    fi
25220
25221    if test "x$new_path" = x; then
25222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25223$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25224        has_space=`$ECHO "$complete" | $GREP " "`
25225        if test "x$has_space" != x; then
25226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25228        fi
25229        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25230      fi
25231  fi
25232
25233      # Now join together the path and the arguments once again
25234      if test "x$arguments" != xEOL; then
25235        new_complete="$new_path ${arguments% *}"
25236      else
25237        new_complete="$new_path"
25238      fi
25239
25240  if test "x$complete" != "x$new_complete"; then
25241      STRIP="$new_complete"
25242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25243$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25244    fi
25245
25246    # Extract the first word of "mcs", so it can be a program name with args.
25247set dummy mcs; ac_word=$2
25248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25249$as_echo_n "checking for $ac_word... " >&6; }
25250if test "${ac_cv_path_MCS+set}" = set; then :
25251  $as_echo_n "(cached) " >&6
25252else
25253  case $MCS in
25254  [\\/]* | ?:[\\/]*)
25255  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25256  ;;
25257  *)
25258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25259for as_dir in $PATH
25260do
25261  IFS=$as_save_IFS
25262  test -z "$as_dir" && as_dir=.
25263    for ac_exec_ext in '' $ac_executable_extensions; do
25264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25265    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25267    break 2
25268  fi
25269done
25270  done
25271IFS=$as_save_IFS
25272
25273  ;;
25274esac
25275fi
25276MCS=$ac_cv_path_MCS
25277if test -n "$MCS"; then
25278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25279$as_echo "$MCS" >&6; }
25280else
25281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25282$as_echo "no" >&6; }
25283fi
25284
25285
25286
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288
25289  # First separate the path from the arguments. This will split at the first
25290  # space.
25291  complete="$MCS"
25292  path="${complete%% *}"
25293  tmp="$complete EOL"
25294  arguments="${tmp#* }"
25295
25296  # Input might be given as Windows format, start by converting to
25297  # unix format.
25298  new_path=`$CYGPATH -u "$path"`
25299
25300  # Now try to locate executable using which
25301  new_path=`$WHICH "$new_path" 2> /dev/null`
25302  # bat and cmd files are not always considered executable in cygwin causing which
25303  # to not find them
25304  if test "x$new_path" = x \
25305           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25306           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25307    new_path=`$CYGPATH -u "$path"`
25308  fi
25309  if test "x$new_path" = x; then
25310    # Oops. Which didn't find the executable.
25311    # The splitting of arguments from the executable at a space might have been incorrect,
25312    # since paths with space are more likely in Windows. Give it another try with the whole
25313    # argument.
25314    path="$complete"
25315    arguments="EOL"
25316    new_path=`$CYGPATH -u "$path"`
25317    new_path=`$WHICH "$new_path" 2> /dev/null`
25318    # bat and cmd files are not always considered executable in cygwin causing which
25319    # to not find them
25320    if test "x$new_path" = x \
25321             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25322             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25323      new_path=`$CYGPATH -u "$path"`
25324    fi
25325    if test "x$new_path" = x; then
25326      # It's still not found. Now this is an unrecoverable error.
25327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25328$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25329      has_space=`$ECHO "$complete" | $GREP " "`
25330      if test "x$has_space" != x; then
25331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25333      fi
25334      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25335    fi
25336  fi
25337
25338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25341  # "foo.exe" is OK but "foo" is an error.
25342  #
25343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25344  # It is also a way to make sure we got the proper file name for the real test later on.
25345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25346  if test "x$test_shortpath" = x; then
25347    # Short path failed, file does not exist as specified.
25348    # Try adding .exe or .cmd
25349    if test -f "${new_path}.exe"; then
25350       input_to_shortpath="${new_path}.exe"
25351    elif test -f "${new_path}.cmd"; then
25352       input_to_shortpath="${new_path}.cmd"
25353    else
25354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25355$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25358      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25359    fi
25360  else
25361    input_to_shortpath="$new_path"
25362  fi
25363
25364  # Call helper function which possibly converts this using DOS-style short mode.
25365  # If so, the updated path is stored in $new_path.
25366  new_path="$input_to_shortpath"
25367
25368  input_path="$input_to_shortpath"
25369  # Check if we need to convert this using DOS-style short mode. If the path
25370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25371  # take no chances and rewrite it.
25372  # Note: m4 eats our [], so we need to use [ and ] instead.
25373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25374  if test "x$has_forbidden_chars" != x; then
25375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25379      # Going to short mode and back again did indeed matter. Since short mode is
25380      # case insensitive, let's make it lowercase to improve readability.
25381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25382      # Now convert it back to Unix-stile (cygpath)
25383      input_path=`$CYGPATH -u "$shortmode_path"`
25384      new_path="$input_path"
25385    fi
25386  fi
25387
25388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25389  if test "x$test_cygdrive_prefix" = x; then
25390    # As a simple fix, exclude /usr/bin since it's not a real path.
25391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25393      # a path prefixed by /cygdrive for fixpath to work.
25394      new_path="$CYGWIN_ROOT_PATH$input_path"
25395    fi
25396  fi
25397
25398  # remove trailing .exe if any
25399  new_path="${new_path/%.exe/}"
25400
25401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25402
25403  # First separate the path from the arguments. This will split at the first
25404  # space.
25405  complete="$MCS"
25406  path="${complete%% *}"
25407  tmp="$complete EOL"
25408  arguments="${tmp#* }"
25409
25410  # Input might be given as Windows format, start by converting to
25411  # unix format.
25412  new_path="$path"
25413
25414  windows_path="$new_path"
25415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25416    unix_path=`$CYGPATH -u "$windows_path"`
25417    new_path="$unix_path"
25418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25420    new_path="$unix_path"
25421  fi
25422
25423
25424  # Now try to locate executable using which
25425  new_path=`$WHICH "$new_path" 2> /dev/null`
25426
25427  if test "x$new_path" = x; then
25428    # Oops. Which didn't find the executable.
25429    # The splitting of arguments from the executable at a space might have been incorrect,
25430    # since paths with space are more likely in Windows. Give it another try with the whole
25431    # argument.
25432    path="$complete"
25433    arguments="EOL"
25434    new_path="$path"
25435
25436  windows_path="$new_path"
25437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25438    unix_path=`$CYGPATH -u "$windows_path"`
25439    new_path="$unix_path"
25440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25442    new_path="$unix_path"
25443  fi
25444
25445
25446    new_path=`$WHICH "$new_path" 2> /dev/null`
25447
25448    if test "x$new_path" = x; then
25449      # It's still not found. Now this is an unrecoverable error.
25450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25451$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25452      has_space=`$ECHO "$complete" | $GREP " "`
25453      if test "x$has_space" != x; then
25454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25456      fi
25457      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25458    fi
25459  fi
25460
25461  # Now new_path has a complete unix path to the binary
25462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25463    # Keep paths in /bin as-is, but remove trailing .exe if any
25464    new_path="${new_path/%.exe/}"
25465    # Do not save /bin paths to all_fixpath_prefixes!
25466  else
25467    # Not in mixed or Windows style, start by that.
25468    new_path=`cmd //c echo $new_path`
25469
25470  input_path="$new_path"
25471  # Check if we need to convert this using DOS-style short mode. If the path
25472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25473  # take no chances and rewrite it.
25474  # Note: m4 eats our [], so we need to use [ and ] instead.
25475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25476  if test "x$has_forbidden_chars" != x; then
25477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25479  fi
25480
25481    # Output is in $new_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    # remove trailing .exe if any
25493    new_path="${new_path/%.exe/}"
25494
25495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25497  fi
25498
25499  else
25500    # We're on a posix platform. Hooray! :)
25501    # First separate the path from the arguments. This will split at the first
25502    # space.
25503    complete="$MCS"
25504    path="${complete%% *}"
25505    tmp="$complete EOL"
25506    arguments="${tmp#* }"
25507
25508    # Cannot rely on the command "which" here since it doesn't always work.
25509    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25510    if test -z "$is_absolute_path"; then
25511      # Path to executable is not absolute. Find it.
25512      IFS_save="$IFS"
25513      IFS=:
25514      for p in $PATH; do
25515        if test -f "$p/$path" && test -x "$p/$path"; then
25516          new_path="$p/$path"
25517          break
25518        fi
25519      done
25520      IFS="$IFS_save"
25521    else
25522      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25523$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25524      new_path="$path"
25525    fi
25526
25527    if test "x$new_path" = x; then
25528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25529$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25530        has_space=`$ECHO "$complete" | $GREP " "`
25531        if test "x$has_space" != x; then
25532          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25533$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25534        fi
25535        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25536      fi
25537  fi
25538
25539      # Now join together the path and the arguments once again
25540      if test "x$arguments" != xEOL; then
25541        new_complete="$new_path ${arguments% *}"
25542      else
25543        new_complete="$new_path"
25544      fi
25545
25546  if test "x$complete" != "x$new_complete"; then
25547      MCS="$new_complete"
25548      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25549$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25550    fi
25551
25552elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25553    if test -n "$ac_tool_prefix"; then
25554  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25555set dummy ${ac_tool_prefix}nm; ac_word=$2
25556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25557$as_echo_n "checking for $ac_word... " >&6; }
25558if test "${ac_cv_prog_NM+set}" = set; then :
25559  $as_echo_n "(cached) " >&6
25560else
25561  if test -n "$NM"; then
25562  ac_cv_prog_NM="$NM" # Let the user override the test.
25563else
25564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25565for as_dir in $PATH
25566do
25567  IFS=$as_save_IFS
25568  test -z "$as_dir" && as_dir=.
25569    for ac_exec_ext in '' $ac_executable_extensions; do
25570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25571    ac_cv_prog_NM="${ac_tool_prefix}nm"
25572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25573    break 2
25574  fi
25575done
25576  done
25577IFS=$as_save_IFS
25578
25579fi
25580fi
25581NM=$ac_cv_prog_NM
25582if test -n "$NM"; then
25583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25584$as_echo "$NM" >&6; }
25585else
25586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25587$as_echo "no" >&6; }
25588fi
25589
25590
25591fi
25592if test -z "$ac_cv_prog_NM"; then
25593  ac_ct_NM=$NM
25594  # Extract the first word of "nm", so it can be a program name with args.
25595set dummy nm; ac_word=$2
25596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25597$as_echo_n "checking for $ac_word... " >&6; }
25598if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25599  $as_echo_n "(cached) " >&6
25600else
25601  if test -n "$ac_ct_NM"; then
25602  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25603else
25604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25605for as_dir in $PATH
25606do
25607  IFS=$as_save_IFS
25608  test -z "$as_dir" && as_dir=.
25609    for ac_exec_ext in '' $ac_executable_extensions; do
25610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25611    ac_cv_prog_ac_ct_NM="nm"
25612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25613    break 2
25614  fi
25615done
25616  done
25617IFS=$as_save_IFS
25618
25619fi
25620fi
25621ac_ct_NM=$ac_cv_prog_ac_ct_NM
25622if test -n "$ac_ct_NM"; then
25623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25624$as_echo "$ac_ct_NM" >&6; }
25625else
25626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25627$as_echo "no" >&6; }
25628fi
25629
25630  if test "x$ac_ct_NM" = x; then
25631    NM=""
25632  else
25633    case $cross_compiling:$ac_tool_warned in
25634yes:)
25635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25637ac_tool_warned=yes ;;
25638esac
25639    NM=$ac_ct_NM
25640  fi
25641else
25642  NM="$ac_cv_prog_NM"
25643fi
25644
25645
25646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25647
25648  # First separate the path from the arguments. This will split at the first
25649  # space.
25650  complete="$NM"
25651  path="${complete%% *}"
25652  tmp="$complete EOL"
25653  arguments="${tmp#* }"
25654
25655  # Input might be given as Windows format, start by converting to
25656  # unix format.
25657  new_path=`$CYGPATH -u "$path"`
25658
25659  # Now try to locate executable using which
25660  new_path=`$WHICH "$new_path" 2> /dev/null`
25661  # bat and cmd files are not always considered executable in cygwin causing which
25662  # to not find them
25663  if test "x$new_path" = x \
25664           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25665           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25666    new_path=`$CYGPATH -u "$path"`
25667  fi
25668  if test "x$new_path" = x; then
25669    # Oops. Which didn't find the executable.
25670    # The splitting of arguments from the executable at a space might have been incorrect,
25671    # since paths with space are more likely in Windows. Give it another try with the whole
25672    # argument.
25673    path="$complete"
25674    arguments="EOL"
25675    new_path=`$CYGPATH -u "$path"`
25676    new_path=`$WHICH "$new_path" 2> /dev/null`
25677    # bat and cmd files are not always considered executable in cygwin causing which
25678    # to not find them
25679    if test "x$new_path" = x \
25680             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25681             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25682      new_path=`$CYGPATH -u "$path"`
25683    fi
25684    if test "x$new_path" = x; then
25685      # It's still not found. Now this is an unrecoverable error.
25686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25687$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25688      has_space=`$ECHO "$complete" | $GREP " "`
25689      if test "x$has_space" != x; then
25690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25692      fi
25693      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25694    fi
25695  fi
25696
25697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25700  # "foo.exe" is OK but "foo" is an error.
25701  #
25702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25703  # It is also a way to make sure we got the proper file name for the real test later on.
25704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25705  if test "x$test_shortpath" = x; then
25706    # Short path failed, file does not exist as specified.
25707    # Try adding .exe or .cmd
25708    if test -f "${new_path}.exe"; then
25709       input_to_shortpath="${new_path}.exe"
25710    elif test -f "${new_path}.cmd"; then
25711       input_to_shortpath="${new_path}.cmd"
25712    else
25713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25714$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25717      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25718    fi
25719  else
25720    input_to_shortpath="$new_path"
25721  fi
25722
25723  # Call helper function which possibly converts this using DOS-style short mode.
25724  # If so, the updated path is stored in $new_path.
25725  new_path="$input_to_shortpath"
25726
25727  input_path="$input_to_shortpath"
25728  # Check if we need to convert this using DOS-style short mode. If the path
25729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25730  # take no chances and rewrite it.
25731  # Note: m4 eats our [], so we need to use [ and ] instead.
25732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25733  if test "x$has_forbidden_chars" != x; then
25734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25738      # Going to short mode and back again did indeed matter. Since short mode is
25739      # case insensitive, let's make it lowercase to improve readability.
25740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25741      # Now convert it back to Unix-stile (cygpath)
25742      input_path=`$CYGPATH -u "$shortmode_path"`
25743      new_path="$input_path"
25744    fi
25745  fi
25746
25747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25748  if test "x$test_cygdrive_prefix" = x; then
25749    # As a simple fix, exclude /usr/bin since it's not a real path.
25750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25752      # a path prefixed by /cygdrive for fixpath to work.
25753      new_path="$CYGWIN_ROOT_PATH$input_path"
25754    fi
25755  fi
25756
25757  # remove trailing .exe if any
25758  new_path="${new_path/%.exe/}"
25759
25760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25761
25762  # First separate the path from the arguments. This will split at the first
25763  # space.
25764  complete="$NM"
25765  path="${complete%% *}"
25766  tmp="$complete EOL"
25767  arguments="${tmp#* }"
25768
25769  # Input might be given as Windows format, start by converting to
25770  # unix format.
25771  new_path="$path"
25772
25773  windows_path="$new_path"
25774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25775    unix_path=`$CYGPATH -u "$windows_path"`
25776    new_path="$unix_path"
25777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25779    new_path="$unix_path"
25780  fi
25781
25782
25783  # Now try to locate executable using which
25784  new_path=`$WHICH "$new_path" 2> /dev/null`
25785
25786  if test "x$new_path" = x; then
25787    # Oops. Which didn't find the executable.
25788    # The splitting of arguments from the executable at a space might have been incorrect,
25789    # since paths with space are more likely in Windows. Give it another try with the whole
25790    # argument.
25791    path="$complete"
25792    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
25806
25807    if test "x$new_path" = x; then
25808      # It's still not found. Now this is an unrecoverable error.
25809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25810$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25811      has_space=`$ECHO "$complete" | $GREP " "`
25812      if test "x$has_space" != x; then
25813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25815      fi
25816      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25817    fi
25818  fi
25819
25820  # Now new_path has a complete unix path to the binary
25821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25822    # Keep paths in /bin as-is, but remove trailing .exe if any
25823    new_path="${new_path/%.exe/}"
25824    # Do not save /bin paths to all_fixpath_prefixes!
25825  else
25826    # Not in mixed or Windows style, start by that.
25827    new_path=`cmd //c echo $new_path`
25828
25829  input_path="$new_path"
25830  # Check if we need to convert this using DOS-style short mode. If the path
25831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25832  # take no chances and rewrite it.
25833  # Note: m4 eats our [], so we need to use [ and ] instead.
25834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25835  if test "x$has_forbidden_chars" != x; then
25836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25838  fi
25839
25840    # Output is in $new_path
25841
25842  windows_path="$new_path"
25843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25844    unix_path=`$CYGPATH -u "$windows_path"`
25845    new_path="$unix_path"
25846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25848    new_path="$unix_path"
25849  fi
25850
25851    # remove trailing .exe if any
25852    new_path="${new_path/%.exe/}"
25853
25854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25856  fi
25857
25858  else
25859    # We're on a posix platform. Hooray! :)
25860    # First separate the path from the arguments. This will split at the first
25861    # space.
25862    complete="$NM"
25863    path="${complete%% *}"
25864    tmp="$complete EOL"
25865    arguments="${tmp#* }"
25866
25867    # Cannot rely on the command "which" here since it doesn't always work.
25868    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25869    if test -z "$is_absolute_path"; then
25870      # Path to executable is not absolute. Find it.
25871      IFS_save="$IFS"
25872      IFS=:
25873      for p in $PATH; do
25874        if test -f "$p/$path" && test -x "$p/$path"; then
25875          new_path="$p/$path"
25876          break
25877        fi
25878      done
25879      IFS="$IFS_save"
25880    else
25881      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25882$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25883      new_path="$path"
25884    fi
25885
25886    if test "x$new_path" = x; then
25887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25888$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25889        has_space=`$ECHO "$complete" | $GREP " "`
25890        if test "x$has_space" != x; then
25891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25893        fi
25894        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25895      fi
25896  fi
25897
25898      # Now join together the path and the arguments once again
25899      if test "x$arguments" != xEOL; then
25900        new_complete="$new_path ${arguments% *}"
25901      else
25902        new_complete="$new_path"
25903      fi
25904
25905  if test "x$complete" != "x$new_complete"; then
25906      NM="$new_complete"
25907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25908$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25909    fi
25910
25911    if test -n "$ac_tool_prefix"; then
25912  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25913set dummy ${ac_tool_prefix}strip; ac_word=$2
25914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25915$as_echo_n "checking for $ac_word... " >&6; }
25916if test "${ac_cv_prog_STRIP+set}" = set; then :
25917  $as_echo_n "(cached) " >&6
25918else
25919  if test -n "$STRIP"; then
25920  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25921else
25922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25923for as_dir in $PATH
25924do
25925  IFS=$as_save_IFS
25926  test -z "$as_dir" && as_dir=.
25927    for ac_exec_ext in '' $ac_executable_extensions; do
25928  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25929    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25931    break 2
25932  fi
25933done
25934  done
25935IFS=$as_save_IFS
25936
25937fi
25938fi
25939STRIP=$ac_cv_prog_STRIP
25940if test -n "$STRIP"; then
25941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25942$as_echo "$STRIP" >&6; }
25943else
25944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25945$as_echo "no" >&6; }
25946fi
25947
25948
25949fi
25950if test -z "$ac_cv_prog_STRIP"; then
25951  ac_ct_STRIP=$STRIP
25952  # Extract the first word of "strip", so it can be a program name with args.
25953set dummy strip; ac_word=$2
25954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25955$as_echo_n "checking for $ac_word... " >&6; }
25956if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25957  $as_echo_n "(cached) " >&6
25958else
25959  if test -n "$ac_ct_STRIP"; then
25960  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25961else
25962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25963for as_dir in $PATH
25964do
25965  IFS=$as_save_IFS
25966  test -z "$as_dir" && as_dir=.
25967    for ac_exec_ext in '' $ac_executable_extensions; do
25968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25969    ac_cv_prog_ac_ct_STRIP="strip"
25970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25971    break 2
25972  fi
25973done
25974  done
25975IFS=$as_save_IFS
25976
25977fi
25978fi
25979ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25980if test -n "$ac_ct_STRIP"; then
25981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25982$as_echo "$ac_ct_STRIP" >&6; }
25983else
25984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25985$as_echo "no" >&6; }
25986fi
25987
25988  if test "x$ac_ct_STRIP" = x; then
25989    STRIP=""
25990  else
25991    case $cross_compiling:$ac_tool_warned in
25992yes:)
25993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25995ac_tool_warned=yes ;;
25996esac
25997    STRIP=$ac_ct_STRIP
25998  fi
25999else
26000  STRIP="$ac_cv_prog_STRIP"
26001fi
26002
26003
26004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26005
26006  # First separate the path from the arguments. This will split at the first
26007  # space.
26008  complete="$STRIP"
26009  path="${complete%% *}"
26010  tmp="$complete EOL"
26011  arguments="${tmp#* }"
26012
26013  # Input might be given as Windows format, start by converting to
26014  # unix format.
26015  new_path=`$CYGPATH -u "$path"`
26016
26017  # Now try to locate executable using which
26018  new_path=`$WHICH "$new_path" 2> /dev/null`
26019  # bat and cmd files are not always considered executable in cygwin causing which
26020  # to not find them
26021  if test "x$new_path" = x \
26022           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26023           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26024    new_path=`$CYGPATH -u "$path"`
26025  fi
26026  if test "x$new_path" = x; then
26027    # Oops. Which didn't find the executable.
26028    # The splitting of arguments from the executable at a space might have been incorrect,
26029    # since paths with space are more likely in Windows. Give it another try with the whole
26030    # argument.
26031    path="$complete"
26032    arguments="EOL"
26033    new_path=`$CYGPATH -u "$path"`
26034    new_path=`$WHICH "$new_path" 2> /dev/null`
26035    # bat and cmd files are not always considered executable in cygwin causing which
26036    # to not find them
26037    if test "x$new_path" = x \
26038             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26039             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26040      new_path=`$CYGPATH -u "$path"`
26041    fi
26042    if test "x$new_path" = x; then
26043      # It's still not found. Now this is an unrecoverable error.
26044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26045$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26046      has_space=`$ECHO "$complete" | $GREP " "`
26047      if test "x$has_space" != x; then
26048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26050      fi
26051      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26052    fi
26053  fi
26054
26055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26058  # "foo.exe" is OK but "foo" is an error.
26059  #
26060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26061  # It is also a way to make sure we got the proper file name for the real test later on.
26062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26063  if test "x$test_shortpath" = x; then
26064    # Short path failed, file does not exist as specified.
26065    # Try adding .exe or .cmd
26066    if test -f "${new_path}.exe"; then
26067       input_to_shortpath="${new_path}.exe"
26068    elif test -f "${new_path}.cmd"; then
26069       input_to_shortpath="${new_path}.cmd"
26070    else
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26072$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26073      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26074$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26075      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26076    fi
26077  else
26078    input_to_shortpath="$new_path"
26079  fi
26080
26081  # Call helper function which possibly converts this using DOS-style short mode.
26082  # If so, the updated path is stored in $new_path.
26083  new_path="$input_to_shortpath"
26084
26085  input_path="$input_to_shortpath"
26086  # Check if we need to convert this using DOS-style short mode. If the path
26087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26088  # take no chances and rewrite it.
26089  # Note: m4 eats our [], so we need to use [ and ] instead.
26090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26091  if test "x$has_forbidden_chars" != x; then
26092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26096      # Going to short mode and back again did indeed matter. Since short mode is
26097      # case insensitive, let's make it lowercase to improve readability.
26098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26099      # Now convert it back to Unix-stile (cygpath)
26100      input_path=`$CYGPATH -u "$shortmode_path"`
26101      new_path="$input_path"
26102    fi
26103  fi
26104
26105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26106  if test "x$test_cygdrive_prefix" = x; then
26107    # As a simple fix, exclude /usr/bin since it's not a real path.
26108    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26110      # a path prefixed by /cygdrive for fixpath to work.
26111      new_path="$CYGWIN_ROOT_PATH$input_path"
26112    fi
26113  fi
26114
26115  # remove trailing .exe if any
26116  new_path="${new_path/%.exe/}"
26117
26118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26119
26120  # First separate the path from the arguments. This will split at the first
26121  # space.
26122  complete="$STRIP"
26123  path="${complete%% *}"
26124  tmp="$complete EOL"
26125  arguments="${tmp#* }"
26126
26127  # Input might be given as Windows format, start by converting to
26128  # unix format.
26129  new_path="$path"
26130
26131  windows_path="$new_path"
26132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26133    unix_path=`$CYGPATH -u "$windows_path"`
26134    new_path="$unix_path"
26135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26137    new_path="$unix_path"
26138  fi
26139
26140
26141  # Now try to locate executable using which
26142  new_path=`$WHICH "$new_path" 2> /dev/null`
26143
26144  if test "x$new_path" = x; then
26145    # Oops. Which didn't find the executable.
26146    # The splitting of arguments from the executable at a space might have been incorrect,
26147    # since paths with space are more likely in Windows. Give it another try with the whole
26148    # argument.
26149    path="$complete"
26150    arguments="EOL"
26151    new_path="$path"
26152
26153  windows_path="$new_path"
26154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26155    unix_path=`$CYGPATH -u "$windows_path"`
26156    new_path="$unix_path"
26157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26159    new_path="$unix_path"
26160  fi
26161
26162
26163    new_path=`$WHICH "$new_path" 2> /dev/null`
26164
26165    if test "x$new_path" = x; then
26166      # It's still not found. Now this is an unrecoverable error.
26167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26168$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26169      has_space=`$ECHO "$complete" | $GREP " "`
26170      if test "x$has_space" != x; then
26171        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26172$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26173      fi
26174      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26175    fi
26176  fi
26177
26178  # Now new_path has a complete unix path to the binary
26179  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26180    # Keep paths in /bin as-is, but remove trailing .exe if any
26181    new_path="${new_path/%.exe/}"
26182    # Do not save /bin paths to all_fixpath_prefixes!
26183  else
26184    # Not in mixed or Windows style, start by that.
26185    new_path=`cmd //c echo $new_path`
26186
26187  input_path="$new_path"
26188  # Check if we need to convert this using DOS-style short mode. If the path
26189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26190  # take no chances and rewrite it.
26191  # Note: m4 eats our [], so we need to use [ and ] instead.
26192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26193  if test "x$has_forbidden_chars" != x; then
26194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26196  fi
26197
26198    # Output is in $new_path
26199
26200  windows_path="$new_path"
26201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26202    unix_path=`$CYGPATH -u "$windows_path"`
26203    new_path="$unix_path"
26204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26206    new_path="$unix_path"
26207  fi
26208
26209    # remove trailing .exe if any
26210    new_path="${new_path/%.exe/}"
26211
26212    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26213    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26214  fi
26215
26216  else
26217    # We're on a posix platform. Hooray! :)
26218    # First separate the path from the arguments. This will split at the first
26219    # space.
26220    complete="$STRIP"
26221    path="${complete%% *}"
26222    tmp="$complete EOL"
26223    arguments="${tmp#* }"
26224
26225    # Cannot rely on the command "which" here since it doesn't always work.
26226    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26227    if test -z "$is_absolute_path"; then
26228      # Path to executable is not absolute. Find it.
26229      IFS_save="$IFS"
26230      IFS=:
26231      for p in $PATH; do
26232        if test -f "$p/$path" && test -x "$p/$path"; then
26233          new_path="$p/$path"
26234          break
26235        fi
26236      done
26237      IFS="$IFS_save"
26238    else
26239      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26240$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26241      new_path="$path"
26242    fi
26243
26244    if test "x$new_path" = x; then
26245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26246$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26247        has_space=`$ECHO "$complete" | $GREP " "`
26248        if test "x$has_space" != x; then
26249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26251        fi
26252        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26253      fi
26254  fi
26255
26256      # Now join together the path and the arguments once again
26257      if test "x$arguments" != xEOL; then
26258        new_complete="$new_path ${arguments% *}"
26259      else
26260        new_complete="$new_path"
26261      fi
26262
26263  if test "x$complete" != "x$new_complete"; then
26264      STRIP="$new_complete"
26265      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26266$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26267    fi
26268
26269fi
26270
26271# objcopy is used for moving debug symbols to separate files when
26272# full debug symbols are enabled.
26273if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26274    if test -n "$ac_tool_prefix"; then
26275  for ac_prog in gobjcopy objcopy
26276  do
26277    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26278set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26280$as_echo_n "checking for $ac_word... " >&6; }
26281if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26282  $as_echo_n "(cached) " >&6
26283else
26284  if test -n "$OBJCOPY"; then
26285  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26286else
26287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26288for as_dir in $PATH
26289do
26290  IFS=$as_save_IFS
26291  test -z "$as_dir" && as_dir=.
26292    for ac_exec_ext in '' $ac_executable_extensions; do
26293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26294    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26296    break 2
26297  fi
26298done
26299  done
26300IFS=$as_save_IFS
26301
26302fi
26303fi
26304OBJCOPY=$ac_cv_prog_OBJCOPY
26305if test -n "$OBJCOPY"; then
26306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26307$as_echo "$OBJCOPY" >&6; }
26308else
26309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26310$as_echo "no" >&6; }
26311fi
26312
26313
26314    test -n "$OBJCOPY" && break
26315  done
26316fi
26317if test -z "$OBJCOPY"; then
26318  ac_ct_OBJCOPY=$OBJCOPY
26319  for ac_prog in gobjcopy objcopy
26320do
26321  # Extract the first word of "$ac_prog", so it can be a program name with args.
26322set dummy $ac_prog; ac_word=$2
26323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26324$as_echo_n "checking for $ac_word... " >&6; }
26325if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26326  $as_echo_n "(cached) " >&6
26327else
26328  if test -n "$ac_ct_OBJCOPY"; then
26329  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26330else
26331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26332for as_dir in $PATH
26333do
26334  IFS=$as_save_IFS
26335  test -z "$as_dir" && as_dir=.
26336    for ac_exec_ext in '' $ac_executable_extensions; do
26337  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26338    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26340    break 2
26341  fi
26342done
26343  done
26344IFS=$as_save_IFS
26345
26346fi
26347fi
26348ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26349if test -n "$ac_ct_OBJCOPY"; then
26350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26351$as_echo "$ac_ct_OBJCOPY" >&6; }
26352else
26353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26354$as_echo "no" >&6; }
26355fi
26356
26357
26358  test -n "$ac_ct_OBJCOPY" && break
26359done
26360
26361  if test "x$ac_ct_OBJCOPY" = x; then
26362    OBJCOPY=""
26363  else
26364    case $cross_compiling:$ac_tool_warned in
26365yes:)
26366{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26367$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26368ac_tool_warned=yes ;;
26369esac
26370    OBJCOPY=$ac_ct_OBJCOPY
26371  fi
26372fi
26373
26374    # Only call fixup if objcopy was found.
26375    if test -n "$OBJCOPY"; then
26376
26377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26378
26379  # First separate the path from the arguments. This will split at the first
26380  # space.
26381  complete="$OBJCOPY"
26382  path="${complete%% *}"
26383  tmp="$complete EOL"
26384  arguments="${tmp#* }"
26385
26386  # Input might be given as Windows format, start by converting to
26387  # unix format.
26388  new_path=`$CYGPATH -u "$path"`
26389
26390  # Now try to locate executable using which
26391  new_path=`$WHICH "$new_path" 2> /dev/null`
26392  # bat and cmd files are not always considered executable in cygwin causing which
26393  # to not find them
26394  if test "x$new_path" = x \
26395           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26396           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26397    new_path=`$CYGPATH -u "$path"`
26398  fi
26399  if test "x$new_path" = x; then
26400    # Oops. Which didn't find the executable.
26401    # The splitting of arguments from the executable at a space might have been incorrect,
26402    # since paths with space are more likely in Windows. Give it another try with the whole
26403    # argument.
26404    path="$complete"
26405    arguments="EOL"
26406    new_path=`$CYGPATH -u "$path"`
26407    new_path=`$WHICH "$new_path" 2> /dev/null`
26408    # bat and cmd files are not always considered executable in cygwin causing which
26409    # to not find them
26410    if test "x$new_path" = x \
26411             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26412             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26413      new_path=`$CYGPATH -u "$path"`
26414    fi
26415    if test "x$new_path" = x; then
26416      # It's still not found. Now this is an unrecoverable error.
26417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26418$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26419      has_space=`$ECHO "$complete" | $GREP " "`
26420      if test "x$has_space" != x; then
26421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26423      fi
26424      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26425    fi
26426  fi
26427
26428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26431  # "foo.exe" is OK but "foo" is an error.
26432  #
26433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26434  # It is also a way to make sure we got the proper file name for the real test later on.
26435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26436  if test "x$test_shortpath" = x; then
26437    # Short path failed, file does not exist as specified.
26438    # Try adding .exe or .cmd
26439    if test -f "${new_path}.exe"; then
26440       input_to_shortpath="${new_path}.exe"
26441    elif test -f "${new_path}.cmd"; then
26442       input_to_shortpath="${new_path}.cmd"
26443    else
26444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26445$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26446      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26447$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26448      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26449    fi
26450  else
26451    input_to_shortpath="$new_path"
26452  fi
26453
26454  # Call helper function which possibly converts this using DOS-style short mode.
26455  # If so, the updated path is stored in $new_path.
26456  new_path="$input_to_shortpath"
26457
26458  input_path="$input_to_shortpath"
26459  # Check if we need to convert this using DOS-style short mode. If the path
26460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26461  # take no chances and rewrite it.
26462  # Note: m4 eats our [], so we need to use [ and ] instead.
26463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26464  if test "x$has_forbidden_chars" != x; then
26465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26469      # Going to short mode and back again did indeed matter. Since short mode is
26470      # case insensitive, let's make it lowercase to improve readability.
26471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26472      # Now convert it back to Unix-stile (cygpath)
26473      input_path=`$CYGPATH -u "$shortmode_path"`
26474      new_path="$input_path"
26475    fi
26476  fi
26477
26478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26479  if test "x$test_cygdrive_prefix" = x; then
26480    # As a simple fix, exclude /usr/bin since it's not a real path.
26481    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26483      # a path prefixed by /cygdrive for fixpath to work.
26484      new_path="$CYGWIN_ROOT_PATH$input_path"
26485    fi
26486  fi
26487
26488  # remove trailing .exe if any
26489  new_path="${new_path/%.exe/}"
26490
26491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26492
26493  # First separate the path from the arguments. This will split at the first
26494  # space.
26495  complete="$OBJCOPY"
26496  path="${complete%% *}"
26497  tmp="$complete EOL"
26498  arguments="${tmp#* }"
26499
26500  # Input might be given as Windows format, start by converting to
26501  # unix format.
26502  new_path="$path"
26503
26504  windows_path="$new_path"
26505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26506    unix_path=`$CYGPATH -u "$windows_path"`
26507    new_path="$unix_path"
26508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26510    new_path="$unix_path"
26511  fi
26512
26513
26514  # Now try to locate executable using which
26515  new_path=`$WHICH "$new_path" 2> /dev/null`
26516
26517  if test "x$new_path" = x; then
26518    # Oops. Which didn't find the executable.
26519    # The splitting of arguments from the executable at a space might have been incorrect,
26520    # since paths with space are more likely in Windows. Give it another try with the whole
26521    # argument.
26522    path="$complete"
26523    arguments="EOL"
26524    new_path="$path"
26525
26526  windows_path="$new_path"
26527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26528    unix_path=`$CYGPATH -u "$windows_path"`
26529    new_path="$unix_path"
26530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26532    new_path="$unix_path"
26533  fi
26534
26535
26536    new_path=`$WHICH "$new_path" 2> /dev/null`
26537
26538    if test "x$new_path" = x; then
26539      # It's still not found. Now this is an unrecoverable error.
26540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26541$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26542      has_space=`$ECHO "$complete" | $GREP " "`
26543      if test "x$has_space" != x; then
26544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26546      fi
26547      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26548    fi
26549  fi
26550
26551  # Now new_path has a complete unix path to the binary
26552  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26553    # Keep paths in /bin as-is, but remove trailing .exe if any
26554    new_path="${new_path/%.exe/}"
26555    # Do not save /bin paths to all_fixpath_prefixes!
26556  else
26557    # Not in mixed or Windows style, start by that.
26558    new_path=`cmd //c echo $new_path`
26559
26560  input_path="$new_path"
26561  # Check if we need to convert this using DOS-style short mode. If the path
26562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26563  # take no chances and rewrite it.
26564  # Note: m4 eats our [], so we need to use [ and ] instead.
26565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26566  if test "x$has_forbidden_chars" != x; then
26567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26569  fi
26570
26571    # Output is in $new_path
26572
26573  windows_path="$new_path"
26574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26575    unix_path=`$CYGPATH -u "$windows_path"`
26576    new_path="$unix_path"
26577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26579    new_path="$unix_path"
26580  fi
26581
26582    # remove trailing .exe if any
26583    new_path="${new_path/%.exe/}"
26584
26585    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26586    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26587  fi
26588
26589  else
26590    # We're on a posix platform. Hooray! :)
26591    # First separate the path from the arguments. This will split at the first
26592    # space.
26593    complete="$OBJCOPY"
26594    path="${complete%% *}"
26595    tmp="$complete EOL"
26596    arguments="${tmp#* }"
26597
26598    # Cannot rely on the command "which" here since it doesn't always work.
26599    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26600    if test -z "$is_absolute_path"; then
26601      # Path to executable is not absolute. Find it.
26602      IFS_save="$IFS"
26603      IFS=:
26604      for p in $PATH; do
26605        if test -f "$p/$path" && test -x "$p/$path"; then
26606          new_path="$p/$path"
26607          break
26608        fi
26609      done
26610      IFS="$IFS_save"
26611    else
26612      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26613$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26614      new_path="$path"
26615    fi
26616
26617    if test "x$new_path" = x; then
26618        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26619$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26620        has_space=`$ECHO "$complete" | $GREP " "`
26621        if test "x$has_space" != x; then
26622          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26623$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26624        fi
26625        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26626      fi
26627  fi
26628
26629      # Now join together the path and the arguments once again
26630      if test "x$arguments" != xEOL; then
26631        new_complete="$new_path ${arguments% *}"
26632      else
26633        new_complete="$new_path"
26634      fi
26635
26636  if test "x$complete" != "x$new_complete"; then
26637      OBJCOPY="$new_complete"
26638      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26639$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26640    fi
26641
26642    fi
26643fi
26644
26645if test -n "$ac_tool_prefix"; then
26646  for ac_prog in gobjdump objdump
26647  do
26648    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26649set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26651$as_echo_n "checking for $ac_word... " >&6; }
26652if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26653  $as_echo_n "(cached) " >&6
26654else
26655  if test -n "$OBJDUMP"; then
26656  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26657else
26658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26659for as_dir in $PATH
26660do
26661  IFS=$as_save_IFS
26662  test -z "$as_dir" && as_dir=.
26663    for ac_exec_ext in '' $ac_executable_extensions; do
26664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26665    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26667    break 2
26668  fi
26669done
26670  done
26671IFS=$as_save_IFS
26672
26673fi
26674fi
26675OBJDUMP=$ac_cv_prog_OBJDUMP
26676if test -n "$OBJDUMP"; then
26677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26678$as_echo "$OBJDUMP" >&6; }
26679else
26680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26681$as_echo "no" >&6; }
26682fi
26683
26684
26685    test -n "$OBJDUMP" && break
26686  done
26687fi
26688if test -z "$OBJDUMP"; then
26689  ac_ct_OBJDUMP=$OBJDUMP
26690  for ac_prog in gobjdump objdump
26691do
26692  # Extract the first word of "$ac_prog", so it can be a program name with args.
26693set dummy $ac_prog; ac_word=$2
26694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26695$as_echo_n "checking for $ac_word... " >&6; }
26696if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26697  $as_echo_n "(cached) " >&6
26698else
26699  if test -n "$ac_ct_OBJDUMP"; then
26700  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26701else
26702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26703for as_dir in $PATH
26704do
26705  IFS=$as_save_IFS
26706  test -z "$as_dir" && as_dir=.
26707    for ac_exec_ext in '' $ac_executable_extensions; do
26708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26709    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26711    break 2
26712  fi
26713done
26714  done
26715IFS=$as_save_IFS
26716
26717fi
26718fi
26719ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26720if test -n "$ac_ct_OBJDUMP"; then
26721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26722$as_echo "$ac_ct_OBJDUMP" >&6; }
26723else
26724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26725$as_echo "no" >&6; }
26726fi
26727
26728
26729  test -n "$ac_ct_OBJDUMP" && break
26730done
26731
26732  if test "x$ac_ct_OBJDUMP" = x; then
26733    OBJDUMP=""
26734  else
26735    case $cross_compiling:$ac_tool_warned in
26736yes:)
26737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26739ac_tool_warned=yes ;;
26740esac
26741    OBJDUMP=$ac_ct_OBJDUMP
26742  fi
26743fi
26744
26745if test "x$OBJDUMP" != x; then
26746  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26747
26748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26749
26750  # First separate the path from the arguments. This will split at the first
26751  # space.
26752  complete="$OBJDUMP"
26753  path="${complete%% *}"
26754  tmp="$complete EOL"
26755  arguments="${tmp#* }"
26756
26757  # Input might be given as Windows format, start by converting to
26758  # unix format.
26759  new_path=`$CYGPATH -u "$path"`
26760
26761  # Now try to locate executable using which
26762  new_path=`$WHICH "$new_path" 2> /dev/null`
26763  # bat and cmd files are not always considered executable in cygwin causing which
26764  # to not find them
26765  if test "x$new_path" = x \
26766           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26767           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26768    new_path=`$CYGPATH -u "$path"`
26769  fi
26770  if test "x$new_path" = x; then
26771    # Oops. Which didn't find the executable.
26772    # The splitting of arguments from the executable at a space might have been incorrect,
26773    # since paths with space are more likely in Windows. Give it another try with the whole
26774    # argument.
26775    path="$complete"
26776    arguments="EOL"
26777    new_path=`$CYGPATH -u "$path"`
26778    new_path=`$WHICH "$new_path" 2> /dev/null`
26779    # bat and cmd files are not always considered executable in cygwin causing which
26780    # to not find them
26781    if test "x$new_path" = x \
26782             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26783             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26784      new_path=`$CYGPATH -u "$path"`
26785    fi
26786    if test "x$new_path" = x; then
26787      # It's still not found. Now this is an unrecoverable error.
26788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26789$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26790      has_space=`$ECHO "$complete" | $GREP " "`
26791      if test "x$has_space" != x; then
26792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26794      fi
26795      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26796    fi
26797  fi
26798
26799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26802  # "foo.exe" is OK but "foo" is an error.
26803  #
26804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26805  # It is also a way to make sure we got the proper file name for the real test later on.
26806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26807  if test "x$test_shortpath" = x; then
26808    # Short path failed, file does not exist as specified.
26809    # Try adding .exe or .cmd
26810    if test -f "${new_path}.exe"; then
26811       input_to_shortpath="${new_path}.exe"
26812    elif test -f "${new_path}.cmd"; then
26813       input_to_shortpath="${new_path}.cmd"
26814    else
26815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26816$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26819      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26820    fi
26821  else
26822    input_to_shortpath="$new_path"
26823  fi
26824
26825  # Call helper function which possibly converts this using DOS-style short mode.
26826  # If so, the updated path is stored in $new_path.
26827  new_path="$input_to_shortpath"
26828
26829  input_path="$input_to_shortpath"
26830  # Check if we need to convert this using DOS-style short mode. If the path
26831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26832  # take no chances and rewrite it.
26833  # Note: m4 eats our [], so we need to use [ and ] instead.
26834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26835  if test "x$has_forbidden_chars" != x; then
26836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26840      # Going to short mode and back again did indeed matter. Since short mode is
26841      # case insensitive, let's make it lowercase to improve readability.
26842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26843      # Now convert it back to Unix-stile (cygpath)
26844      input_path=`$CYGPATH -u "$shortmode_path"`
26845      new_path="$input_path"
26846    fi
26847  fi
26848
26849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26850  if test "x$test_cygdrive_prefix" = x; then
26851    # As a simple fix, exclude /usr/bin since it's not a real path.
26852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26854      # a path prefixed by /cygdrive for fixpath to work.
26855      new_path="$CYGWIN_ROOT_PATH$input_path"
26856    fi
26857  fi
26858
26859  # remove trailing .exe if any
26860  new_path="${new_path/%.exe/}"
26861
26862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26863
26864  # First separate the path from the arguments. This will split at the first
26865  # space.
26866  complete="$OBJDUMP"
26867  path="${complete%% *}"
26868  tmp="$complete EOL"
26869  arguments="${tmp#* }"
26870
26871  # Input might be given as Windows format, start by converting to
26872  # unix format.
26873  new_path="$path"
26874
26875  windows_path="$new_path"
26876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26877    unix_path=`$CYGPATH -u "$windows_path"`
26878    new_path="$unix_path"
26879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26881    new_path="$unix_path"
26882  fi
26883
26884
26885  # Now try to locate executable using which
26886  new_path=`$WHICH "$new_path" 2> /dev/null`
26887
26888  if test "x$new_path" = x; then
26889    # Oops. Which didn't find the executable.
26890    # The splitting of arguments from the executable at a space might have been incorrect,
26891    # since paths with space are more likely in Windows. Give it another try with the whole
26892    # argument.
26893    path="$complete"
26894    arguments="EOL"
26895    new_path="$path"
26896
26897  windows_path="$new_path"
26898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26899    unix_path=`$CYGPATH -u "$windows_path"`
26900    new_path="$unix_path"
26901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26903    new_path="$unix_path"
26904  fi
26905
26906
26907    new_path=`$WHICH "$new_path" 2> /dev/null`
26908
26909    if test "x$new_path" = x; then
26910      # It's still not found. Now this is an unrecoverable error.
26911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26912$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26913      has_space=`$ECHO "$complete" | $GREP " "`
26914      if test "x$has_space" != x; then
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26917      fi
26918      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26919    fi
26920  fi
26921
26922  # Now new_path has a complete unix path to the binary
26923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26924    # Keep paths in /bin as-is, but remove trailing .exe if any
26925    new_path="${new_path/%.exe/}"
26926    # Do not save /bin paths to all_fixpath_prefixes!
26927  else
26928    # Not in mixed or Windows style, start by that.
26929    new_path=`cmd //c echo $new_path`
26930
26931  input_path="$new_path"
26932  # Check if we need to convert this using DOS-style short mode. If the path
26933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26934  # take no chances and rewrite it.
26935  # Note: m4 eats our [], so we need to use [ and ] instead.
26936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26937  if test "x$has_forbidden_chars" != x; then
26938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26940  fi
26941
26942    # Output is in $new_path
26943
26944  windows_path="$new_path"
26945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946    unix_path=`$CYGPATH -u "$windows_path"`
26947    new_path="$unix_path"
26948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26950    new_path="$unix_path"
26951  fi
26952
26953    # remove trailing .exe if any
26954    new_path="${new_path/%.exe/}"
26955
26956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26958  fi
26959
26960  else
26961    # We're on a posix platform. Hooray! :)
26962    # First separate the path from the arguments. This will split at the first
26963    # space.
26964    complete="$OBJDUMP"
26965    path="${complete%% *}"
26966    tmp="$complete EOL"
26967    arguments="${tmp#* }"
26968
26969    # Cannot rely on the command "which" here since it doesn't always work.
26970    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26971    if test -z "$is_absolute_path"; then
26972      # Path to executable is not absolute. Find it.
26973      IFS_save="$IFS"
26974      IFS=:
26975      for p in $PATH; do
26976        if test -f "$p/$path" && test -x "$p/$path"; then
26977          new_path="$p/$path"
26978          break
26979        fi
26980      done
26981      IFS="$IFS_save"
26982    else
26983      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26984$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26985      new_path="$path"
26986    fi
26987
26988    if test "x$new_path" = x; then
26989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26990$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26991        has_space=`$ECHO "$complete" | $GREP " "`
26992        if test "x$has_space" != x; then
26993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26995        fi
26996        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26997      fi
26998  fi
26999
27000      # Now join together the path and the arguments once again
27001      if test "x$arguments" != xEOL; then
27002        new_complete="$new_path ${arguments% *}"
27003      else
27004        new_complete="$new_path"
27005      fi
27006
27007  if test "x$complete" != "x$new_complete"; then
27008      OBJDUMP="$new_complete"
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27010$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27011    fi
27012
27013fi
27014
27015if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27016   # Extract the first word of "lipo", so it can be a program name with args.
27017set dummy lipo; ac_word=$2
27018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27019$as_echo_n "checking for $ac_word... " >&6; }
27020if test "${ac_cv_path_LIPO+set}" = set; then :
27021  $as_echo_n "(cached) " >&6
27022else
27023  case $LIPO in
27024  [\\/]* | ?:[\\/]*)
27025  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27026  ;;
27027  *)
27028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27029for as_dir in $PATH
27030do
27031  IFS=$as_save_IFS
27032  test -z "$as_dir" && as_dir=.
27033    for ac_exec_ext in '' $ac_executable_extensions; do
27034  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27035    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27037    break 2
27038  fi
27039done
27040  done
27041IFS=$as_save_IFS
27042
27043  ;;
27044esac
27045fi
27046LIPO=$ac_cv_path_LIPO
27047if test -n "$LIPO"; then
27048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27049$as_echo "$LIPO" >&6; }
27050else
27051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27052$as_echo "no" >&6; }
27053fi
27054
27055
27056
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058
27059  # First separate the path from the arguments. This will split at the first
27060  # space.
27061  complete="$LIPO"
27062  path="${complete%% *}"
27063  tmp="$complete EOL"
27064  arguments="${tmp#* }"
27065
27066  # Input might be given as Windows format, start by converting to
27067  # unix format.
27068  new_path=`$CYGPATH -u "$path"`
27069
27070  # Now try to locate executable using which
27071  new_path=`$WHICH "$new_path" 2> /dev/null`
27072  # bat and cmd files are not always considered executable in cygwin causing which
27073  # to not find them
27074  if test "x$new_path" = x \
27075           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27076           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27077    new_path=`$CYGPATH -u "$path"`
27078  fi
27079  if test "x$new_path" = x; then
27080    # Oops. Which didn't find the executable.
27081    # The splitting of arguments from the executable at a space might have been incorrect,
27082    # since paths with space are more likely in Windows. Give it another try with the whole
27083    # argument.
27084    path="$complete"
27085    arguments="EOL"
27086    new_path=`$CYGPATH -u "$path"`
27087    new_path=`$WHICH "$new_path" 2> /dev/null`
27088    # bat and cmd files are not always considered executable in cygwin causing which
27089    # to not find them
27090    if test "x$new_path" = x \
27091             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27092             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27093      new_path=`$CYGPATH -u "$path"`
27094    fi
27095    if test "x$new_path" = x; then
27096      # It's still not found. Now this is an unrecoverable error.
27097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27098$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27099      has_space=`$ECHO "$complete" | $GREP " "`
27100      if test "x$has_space" != x; then
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27103      fi
27104      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27105    fi
27106  fi
27107
27108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27111  # "foo.exe" is OK but "foo" is an error.
27112  #
27113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27114  # It is also a way to make sure we got the proper file name for the real test later on.
27115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27116  if test "x$test_shortpath" = x; then
27117    # Short path failed, file does not exist as specified.
27118    # Try adding .exe or .cmd
27119    if test -f "${new_path}.exe"; then
27120       input_to_shortpath="${new_path}.exe"
27121    elif test -f "${new_path}.cmd"; then
27122       input_to_shortpath="${new_path}.cmd"
27123    else
27124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27125$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27127$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27128      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27129    fi
27130  else
27131    input_to_shortpath="$new_path"
27132  fi
27133
27134  # Call helper function which possibly converts this using DOS-style short mode.
27135  # If so, the updated path is stored in $new_path.
27136  new_path="$input_to_shortpath"
27137
27138  input_path="$input_to_shortpath"
27139  # Check if we need to convert this using DOS-style short mode. If the path
27140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27141  # take no chances and rewrite it.
27142  # Note: m4 eats our [], so we need to use [ and ] instead.
27143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27144  if test "x$has_forbidden_chars" != x; then
27145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27149      # Going to short mode and back again did indeed matter. Since short mode is
27150      # case insensitive, let's make it lowercase to improve readability.
27151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27152      # Now convert it back to Unix-stile (cygpath)
27153      input_path=`$CYGPATH -u "$shortmode_path"`
27154      new_path="$input_path"
27155    fi
27156  fi
27157
27158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27159  if test "x$test_cygdrive_prefix" = x; then
27160    # As a simple fix, exclude /usr/bin since it's not a real path.
27161    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27163      # a path prefixed by /cygdrive for fixpath to work.
27164      new_path="$CYGWIN_ROOT_PATH$input_path"
27165    fi
27166  fi
27167
27168  # remove trailing .exe if any
27169  new_path="${new_path/%.exe/}"
27170
27171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27172
27173  # First separate the path from the arguments. This will split at the first
27174  # space.
27175  complete="$LIPO"
27176  path="${complete%% *}"
27177  tmp="$complete EOL"
27178  arguments="${tmp#* }"
27179
27180  # Input might be given as Windows format, start by converting to
27181  # unix format.
27182  new_path="$path"
27183
27184  windows_path="$new_path"
27185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27186    unix_path=`$CYGPATH -u "$windows_path"`
27187    new_path="$unix_path"
27188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27190    new_path="$unix_path"
27191  fi
27192
27193
27194  # Now try to locate executable using which
27195  new_path=`$WHICH "$new_path" 2> /dev/null`
27196
27197  if test "x$new_path" = x; then
27198    # Oops. Which didn't find the executable.
27199    # The splitting of arguments from the executable at a space might have been incorrect,
27200    # since paths with space are more likely in Windows. Give it another try with the whole
27201    # argument.
27202    path="$complete"
27203    arguments="EOL"
27204    new_path="$path"
27205
27206  windows_path="$new_path"
27207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27208    unix_path=`$CYGPATH -u "$windows_path"`
27209    new_path="$unix_path"
27210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27212    new_path="$unix_path"
27213  fi
27214
27215
27216    new_path=`$WHICH "$new_path" 2> /dev/null`
27217
27218    if test "x$new_path" = x; then
27219      # It's still not found. Now this is an unrecoverable error.
27220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27221$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27222      has_space=`$ECHO "$complete" | $GREP " "`
27223      if test "x$has_space" != x; then
27224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27226      fi
27227      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27228    fi
27229  fi
27230
27231  # Now new_path has a complete unix path to the binary
27232  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27233    # Keep paths in /bin as-is, but remove trailing .exe if any
27234    new_path="${new_path/%.exe/}"
27235    # Do not save /bin paths to all_fixpath_prefixes!
27236  else
27237    # Not in mixed or Windows style, start by that.
27238    new_path=`cmd //c echo $new_path`
27239
27240  input_path="$new_path"
27241  # Check if we need to convert this using DOS-style short mode. If the path
27242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27243  # take no chances and rewrite it.
27244  # Note: m4 eats our [], so we need to use [ and ] instead.
27245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27246  if test "x$has_forbidden_chars" != x; then
27247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27249  fi
27250
27251    # Output is in $new_path
27252
27253  windows_path="$new_path"
27254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27255    unix_path=`$CYGPATH -u "$windows_path"`
27256    new_path="$unix_path"
27257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27259    new_path="$unix_path"
27260  fi
27261
27262    # remove trailing .exe if any
27263    new_path="${new_path/%.exe/}"
27264
27265    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27266    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27267  fi
27268
27269  else
27270    # We're on a posix platform. Hooray! :)
27271    # First separate the path from the arguments. This will split at the first
27272    # space.
27273    complete="$LIPO"
27274    path="${complete%% *}"
27275    tmp="$complete EOL"
27276    arguments="${tmp#* }"
27277
27278    # Cannot rely on the command "which" here since it doesn't always work.
27279    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27280    if test -z "$is_absolute_path"; then
27281      # Path to executable is not absolute. Find it.
27282      IFS_save="$IFS"
27283      IFS=:
27284      for p in $PATH; do
27285        if test -f "$p/$path" && test -x "$p/$path"; then
27286          new_path="$p/$path"
27287          break
27288        fi
27289      done
27290      IFS="$IFS_save"
27291    else
27292      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27293$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27294      new_path="$path"
27295    fi
27296
27297    if test "x$new_path" = x; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27299$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27300        has_space=`$ECHO "$complete" | $GREP " "`
27301        if test "x$has_space" != x; then
27302          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27303$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27304        fi
27305        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27306      fi
27307  fi
27308
27309      # Now join together the path and the arguments once again
27310      if test "x$arguments" != xEOL; then
27311        new_complete="$new_path ${arguments% *}"
27312      else
27313        new_complete="$new_path"
27314      fi
27315
27316  if test "x$complete" != "x$new_complete"; then
27317      LIPO="$new_complete"
27318      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27319$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27320    fi
27321
27322fi
27323
27324# Restore old path without tools dir
27325PATH="$OLD_PATH"
27326
27327
27328# FIXME: Currently we must test this after paths but before flags. Fix!
27329
27330# And we can test some aspects on the target using configure macros.
27331
27332
27333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27334$as_echo_n "checking for ANSI C header files... " >&6; }
27335if test "${ac_cv_header_stdc+set}" = set; then :
27336  $as_echo_n "(cached) " >&6
27337else
27338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27339/* end confdefs.h.  */
27340#include <stdlib.h>
27341#include <stdarg.h>
27342#include <string.h>
27343#include <float.h>
27344
27345int
27346main ()
27347{
27348
27349  ;
27350  return 0;
27351}
27352_ACEOF
27353if ac_fn_cxx_try_compile "$LINENO"; then :
27354  ac_cv_header_stdc=yes
27355else
27356  ac_cv_header_stdc=no
27357fi
27358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27359
27360if test $ac_cv_header_stdc = yes; then
27361  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27363/* end confdefs.h.  */
27364#include <string.h>
27365
27366_ACEOF
27367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27368  $EGREP "memchr" >/dev/null 2>&1; then :
27369
27370else
27371  ac_cv_header_stdc=no
27372fi
27373rm -f conftest*
27374
27375fi
27376
27377if test $ac_cv_header_stdc = yes; then
27378  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27380/* end confdefs.h.  */
27381#include <stdlib.h>
27382
27383_ACEOF
27384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27385  $EGREP "free" >/dev/null 2>&1; then :
27386
27387else
27388  ac_cv_header_stdc=no
27389fi
27390rm -f conftest*
27391
27392fi
27393
27394if test $ac_cv_header_stdc = yes; then
27395  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27396  if test "$cross_compiling" = yes; then :
27397  :
27398else
27399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27400/* end confdefs.h.  */
27401#include <ctype.h>
27402#include <stdlib.h>
27403#if ((' ' & 0x0FF) == 0x020)
27404# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27405# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27406#else
27407# define ISLOWER(c) \
27408		   (('a' <= (c) && (c) <= 'i') \
27409		     || ('j' <= (c) && (c) <= 'r') \
27410		     || ('s' <= (c) && (c) <= 'z'))
27411# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27412#endif
27413
27414#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27415int
27416main ()
27417{
27418  int i;
27419  for (i = 0; i < 256; i++)
27420    if (XOR (islower (i), ISLOWER (i))
27421	|| toupper (i) != TOUPPER (i))
27422      return 2;
27423  return 0;
27424}
27425_ACEOF
27426if ac_fn_cxx_try_run "$LINENO"; then :
27427
27428else
27429  ac_cv_header_stdc=no
27430fi
27431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27432  conftest.$ac_objext conftest.beam conftest.$ac_ext
27433fi
27434
27435fi
27436fi
27437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27438$as_echo "$ac_cv_header_stdc" >&6; }
27439if test $ac_cv_header_stdc = yes; then
27440
27441$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27442
27443fi
27444
27445# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27446for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27447		  inttypes.h stdint.h unistd.h
27448do :
27449  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27450ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27451"
27452if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27453  cat >>confdefs.h <<_ACEOF
27454#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27455_ACEOF
27456
27457fi
27458
27459done
27460
27461
27462
27463###############################################################################
27464#
27465# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27466# (The JVM can use 32 or 64 bit Java pointers but that decision
27467# is made at runtime.)
27468#
27469if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27470  # Always specify -m flags on Solaris
27471
27472  # keep track of c/cxx flags that we added outselves...
27473  #   to prevent emitting warning...
27474  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27475  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27476  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27477
27478  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27479  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27480  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27481
27482  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27483  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27484  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27485
27486elif test "x$COMPILE_TYPE" = xreduced; then
27487  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27488    # Specify -m if running reduced on other Posix platforms
27489
27490  # keep track of c/cxx flags that we added outselves...
27491  #   to prevent emitting warning...
27492  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27493  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27494  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27495
27496  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27497  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27498  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27499
27500  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27501  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27502  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27503
27504  fi
27505fi
27506
27507# Make compilation sanity check
27508for ac_header in stdio.h
27509do :
27510  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27511if test "x$ac_cv_header_stdio_h" = x""yes; then :
27512  cat >>confdefs.h <<_ACEOF
27513#define HAVE_STDIO_H 1
27514_ACEOF
27515
27516else
27517
27518  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27519$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27520  if test "x$COMPILE_TYPE" = xreduced; then
27521    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27522$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27523  elif test "x$COMPILE_TYPE" = xcross; then
27524    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27525$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27526  fi
27527  as_fn_error $? "Cannot continue." "$LINENO" 5
27528
27529fi
27530
27531done
27532
27533
27534# The cast to long int works around a bug in the HP C Compiler
27535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27537# This bug is HP SR number 8606223364.
27538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27539$as_echo_n "checking size of int *... " >&6; }
27540if test "${ac_cv_sizeof_int_p+set}" = set; then :
27541  $as_echo_n "(cached) " >&6
27542else
27543  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27544
27545else
27546  if test "$ac_cv_type_int_p" = yes; then
27547     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27549as_fn_error 77 "cannot compute sizeof (int *)
27550See \`config.log' for more details" "$LINENO" 5 ; }
27551   else
27552     ac_cv_sizeof_int_p=0
27553   fi
27554fi
27555
27556fi
27557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27558$as_echo "$ac_cv_sizeof_int_p" >&6; }
27559
27560
27561
27562cat >>confdefs.h <<_ACEOF
27563#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27564_ACEOF
27565
27566
27567
27568if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27569  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27570  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27571fi
27572
27573if test "x$SIZEOF_INT_P" = x; then
27574    # The test failed, lets stick to the assumed value.
27575    { $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
27576$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27577else
27578    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27579
27580    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27581        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
27582    fi
27583fi
27584
27585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27586$as_echo_n "checking for target address size... " >&6; }
27587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27588$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27589
27590
27591###############################################################################
27592#
27593# Is the target little of big endian?
27594#
27595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27596$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27597if test "${ac_cv_c_bigendian+set}" = set; then :
27598  $as_echo_n "(cached) " >&6
27599else
27600  ac_cv_c_bigendian=unknown
27601    # See if we're dealing with a universal compiler.
27602    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27603/* end confdefs.h.  */
27604#ifndef __APPLE_CC__
27605	       not a universal capable compiler
27606	     #endif
27607	     typedef int dummy;
27608
27609_ACEOF
27610if ac_fn_cxx_try_compile "$LINENO"; then :
27611
27612	# Check for potential -arch flags.  It is not universal unless
27613	# there are at least two -arch flags with different values.
27614	ac_arch=
27615	ac_prev=
27616	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27617	 if test -n "$ac_prev"; then
27618	   case $ac_word in
27619	     i?86 | x86_64 | ppc | ppc64)
27620	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27621		 ac_arch=$ac_word
27622	       else
27623		 ac_cv_c_bigendian=universal
27624		 break
27625	       fi
27626	       ;;
27627	   esac
27628	   ac_prev=
27629	 elif test "x$ac_word" = "x-arch"; then
27630	   ac_prev=arch
27631	 fi
27632       done
27633fi
27634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27635    if test $ac_cv_c_bigendian = unknown; then
27636      # See if sys/param.h defines the BYTE_ORDER macro.
27637      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27638/* end confdefs.h.  */
27639#include <sys/types.h>
27640	     #include <sys/param.h>
27641
27642int
27643main ()
27644{
27645#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27646		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27647		     && LITTLE_ENDIAN)
27648	      bogus endian macros
27649	     #endif
27650
27651  ;
27652  return 0;
27653}
27654_ACEOF
27655if ac_fn_cxx_try_compile "$LINENO"; then :
27656  # It does; now see whether it defined to BIG_ENDIAN or not.
27657	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27658/* end confdefs.h.  */
27659#include <sys/types.h>
27660		#include <sys/param.h>
27661
27662int
27663main ()
27664{
27665#if BYTE_ORDER != BIG_ENDIAN
27666		 not big endian
27667		#endif
27668
27669  ;
27670  return 0;
27671}
27672_ACEOF
27673if ac_fn_cxx_try_compile "$LINENO"; then :
27674  ac_cv_c_bigendian=yes
27675else
27676  ac_cv_c_bigendian=no
27677fi
27678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27679fi
27680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27681    fi
27682    if test $ac_cv_c_bigendian = unknown; then
27683      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27684      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27685/* end confdefs.h.  */
27686#include <limits.h>
27687
27688int
27689main ()
27690{
27691#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27692	      bogus endian macros
27693	     #endif
27694
27695  ;
27696  return 0;
27697}
27698_ACEOF
27699if ac_fn_cxx_try_compile "$LINENO"; then :
27700  # It does; now see whether it defined to _BIG_ENDIAN or not.
27701	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27702/* end confdefs.h.  */
27703#include <limits.h>
27704
27705int
27706main ()
27707{
27708#ifndef _BIG_ENDIAN
27709		 not big endian
27710		#endif
27711
27712  ;
27713  return 0;
27714}
27715_ACEOF
27716if ac_fn_cxx_try_compile "$LINENO"; then :
27717  ac_cv_c_bigendian=yes
27718else
27719  ac_cv_c_bigendian=no
27720fi
27721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27722fi
27723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27724    fi
27725    if test $ac_cv_c_bigendian = unknown; then
27726      # Compile a test program.
27727      if test "$cross_compiling" = yes; then :
27728  # Try to guess by grepping values from an object file.
27729	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27730/* end confdefs.h.  */
27731short int ascii_mm[] =
27732		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27733		short int ascii_ii[] =
27734		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27735		int use_ascii (int i) {
27736		  return ascii_mm[i] + ascii_ii[i];
27737		}
27738		short int ebcdic_ii[] =
27739		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27740		short int ebcdic_mm[] =
27741		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27742		int use_ebcdic (int i) {
27743		  return ebcdic_mm[i] + ebcdic_ii[i];
27744		}
27745		extern int foo;
27746
27747int
27748main ()
27749{
27750return use_ascii (foo) == use_ebcdic (foo);
27751  ;
27752  return 0;
27753}
27754_ACEOF
27755if ac_fn_cxx_try_compile "$LINENO"; then :
27756  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27757	      ac_cv_c_bigendian=yes
27758	    fi
27759	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27760	      if test "$ac_cv_c_bigendian" = unknown; then
27761		ac_cv_c_bigendian=no
27762	      else
27763		# finding both strings is unlikely to happen, but who knows?
27764		ac_cv_c_bigendian=unknown
27765	      fi
27766	    fi
27767fi
27768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27769else
27770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27771/* end confdefs.h.  */
27772$ac_includes_default
27773int
27774main ()
27775{
27776
27777	     /* Are we little or big endian?  From Harbison&Steele.  */
27778	     union
27779	     {
27780	       long int l;
27781	       char c[sizeof (long int)];
27782	     } u;
27783	     u.l = 1;
27784	     return u.c[sizeof (long int) - 1] == 1;
27785
27786  ;
27787  return 0;
27788}
27789_ACEOF
27790if ac_fn_cxx_try_run "$LINENO"; then :
27791  ac_cv_c_bigendian=no
27792else
27793  ac_cv_c_bigendian=yes
27794fi
27795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27796  conftest.$ac_objext conftest.beam conftest.$ac_ext
27797fi
27798
27799    fi
27800fi
27801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27802$as_echo "$ac_cv_c_bigendian" >&6; }
27803 case $ac_cv_c_bigendian in #(
27804   yes)
27805     ENDIAN="big";; #(
27806   no)
27807     ENDIAN="little" ;; #(
27808   universal)
27809     ENDIAN="universal_endianness"
27810     ;; #(
27811   *)
27812     ENDIAN="unknown" ;;
27813 esac
27814
27815
27816if test "x$ENDIAN" = xuniversal_endianness; then
27817    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27818fi
27819if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27820    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
27821fi
27822
27823
27824# Configure flags for the tools
27825
27826
27827###############################################################################
27828#
27829# How to compile shared libraries.
27830#
27831
27832if test "x$GCC" = xyes; then
27833    COMPILER_NAME=gcc
27834    PICFLAG="-fPIC"
27835    LIBRARY_PREFIX=lib
27836    SHARED_LIBRARY='lib$1.so'
27837    STATIC_LIBRARY='lib$1.a'
27838    SHARED_LIBRARY_FLAGS="-shared"
27839    SHARED_LIBRARY_SUFFIX='.so'
27840    STATIC_LIBRARY_SUFFIX='.a'
27841    OBJ_SUFFIX='.o'
27842    EXE_SUFFIX=''
27843    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27844    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27845    C_FLAG_REORDER=''
27846    CXX_FLAG_REORDER=''
27847    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27848    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27849    LD="$CC"
27850    LDEXE="$CC"
27851    LDCXX="$CXX"
27852    LDEXECXX="$CXX"
27853    POST_STRIP_CMD="$STRIP -g"
27854
27855    # Linking is different on MacOSX
27856    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27857        # Might change in the future to clang.
27858        COMPILER_NAME=gcc
27859        SHARED_LIBRARY='lib$1.dylib'
27860        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27861        SHARED_LIBRARY_SUFFIX='.dylib'
27862        EXE_SUFFIX=''
27863        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27864        SET_SHARED_LIBRARY_MAPFILE=''
27865        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27866        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27867        POST_STRIP_CMD="$STRIP -S"
27868    fi
27869else
27870    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27871        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27872        COMPILER_NAME=ossc
27873        PICFLAG="-KPIC"
27874        LIBRARY_PREFIX=lib
27875        SHARED_LIBRARY='lib$1.so'
27876        STATIC_LIBRARY='lib$1.a'
27877        SHARED_LIBRARY_FLAGS="-G"
27878        SHARED_LIBRARY_SUFFIX='.so'
27879        STATIC_LIBRARY_SUFFIX='.a'
27880        OBJ_SUFFIX='.o'
27881        EXE_SUFFIX=''
27882        SET_SHARED_LIBRARY_NAME=''
27883        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27884	C_FLAG_REORDER='-xF'
27885	CXX_FLAG_REORDER='-xF'
27886        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27887        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27888        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27889        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27890        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27891        POST_STRIP_CMD="$STRIP -x"
27892        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27893    fi
27894    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27895        # If it is not gcc, then assume it is the MS Visual Studio compiler
27896        COMPILER_NAME=cl
27897        PICFLAG=""
27898        LIBRARY_PREFIX=
27899        SHARED_LIBRARY='$1.dll'
27900        STATIC_LIBRARY='$1.lib'
27901        SHARED_LIBRARY_FLAGS="-LD"
27902        SHARED_LIBRARY_SUFFIX='.dll'
27903        STATIC_LIBRARY_SUFFIX='.lib'
27904        OBJ_SUFFIX='.obj'
27905        EXE_SUFFIX='.exe'
27906        SET_SHARED_LIBRARY_NAME=''
27907        SET_SHARED_LIBRARY_MAPFILE=''
27908        SET_SHARED_LIBRARY_ORIGIN=''
27909        SET_EXECUTABLE_ORIGIN=''
27910    fi
27911fi
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930# The (cross) compiler is now configured, we can now test capabilities
27931# of the target platform.
27932
27933
27934
27935###############################################################################
27936#
27937# Setup the opt flags for different compilers
27938# and different operating systems.
27939#
27940
27941#
27942# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27943#
27944if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27945    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27946    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27947    CFLAGS="$CFLAGS -mstackrealign"
27948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27949$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27950    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27951/* end confdefs.h.  */
27952int main() { return 0; }
27953_ACEOF
27954if ac_fn_cxx_try_link "$LINENO"; then :
27955
27956		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27957$as_echo "yes" >&6; }
27958
27959else
27960
27961		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27962$as_echo "no" >&6; }
27963	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27964
27965fi
27966rm -f core conftest.err conftest.$ac_objext \
27967    conftest$ac_exeext conftest.$ac_ext
27968fi
27969
27970C_FLAG_DEPS="-MMD -MF"
27971CXX_FLAG_DEPS="-MMD -MF"
27972
27973case $COMPILER_TYPE in
27974  CC )
27975    D_FLAG="-g"
27976    case $COMPILER_NAME in
27977      gcc )
27978      	case $OPENJDK_TARGET_OS in
27979	  macosx )
27980	    # On MacOSX we optimize for size, something
27981	    # we should do for all platforms?
27982	    C_O_FLAG_HI="-Os"
27983	    C_O_FLAG_NORM="-Os"
27984	    C_O_FLAG_NONE=""
27985	    ;;
27986	  *)
27987	    C_O_FLAG_HI="-O3"
27988	    C_O_FLAG_NORM="-O2"
27989	    C_O_FLAG_NONE="-O0"
27990	    CFLAGS_DEBUG_SYMBOLS="-g"
27991	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27992	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27993	       CFLAGS_DEBUG_SYMBOLS="-g1"
27994	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27995	    fi
27996	    ;;
27997	esac
27998        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27999        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28000        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28001        ;;
28002      ossc )
28003        #
28004        # Forte has different names for this with their C++ compiler...
28005        #
28006        C_FLAG_DEPS="-xMMD -xMF"
28007        CXX_FLAG_DEPS="-xMMD -xMF"
28008
28009        # Extra options used with HIGHEST
28010        #
28011        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28012        #          done with care, there are some assumptions below that need to
28013        #          be understood about the use of pointers, and IEEE behavior.
28014        #
28015        # Use non-standard floating point mode (not IEEE 754)
28016        CC_HIGHEST="$CC_HIGHEST -fns"
28017        # Do some simplification of floating point arithmetic (not IEEE 754)
28018        CC_HIGHEST="$CC_HIGHEST -fsimple"
28019        # Use single precision floating point with 'float'
28020        CC_HIGHEST="$CC_HIGHEST -fsingle"
28021        # Assume memory references via basic pointer types do not alias
28022        #   (Source with excessing pointer casting and data access with mixed
28023        #    pointer types are not recommended)
28024        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28025        # Use intrinsic or inline versions for math/std functions
28026        #   (If you expect perfect errno behavior, do not use this)
28027        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28028        # Loop data dependency optimizations (need -xO3 or higher)
28029        CC_HIGHEST="$CC_HIGHEST -xdepend"
28030        # Pointer parameters to functions do not overlap
28031        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28032        #    If you pass in multiple pointers to the same data, do not use this)
28033        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28034        # Inline some library routines
28035        #   (If you expect perfect errno behavior, do not use this)
28036        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28037        # Use optimized math routines
28038        #   (If you expect perfect errno behavior, do not use this)
28039        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28040        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28041
28042        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28043          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28044          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28045        fi
28046
28047        case $OPENJDK_TARGET_CPU_ARCH in
28048          x86)
28049            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28050            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28051            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28052            C_O_FLAG_NONE="-xregs=no%frameptr"
28053            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28054            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28055            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28056            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28057            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28058               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28059               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28060            fi
28061            ;;
28062          sparc)
28063            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28064            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28065            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28066            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28067            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28068            C_O_FLAG_NONE=""
28069            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28070            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28071            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28072            CXX_O_FLAG_NONE=""
28073            ;;
28074        esac
28075
28076    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28077    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28078    esac
28079    ;;
28080  CL )
28081    D_FLAG=
28082    C_O_FLAG_HIGHEST="-O2"
28083    C_O_FLAG_HI="-O1"
28084    C_O_FLAG_NORM="-O1"
28085    C_O_FLAG_NONE="-Od"
28086    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28087    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28088    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28089    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28090    ;;
28091esac
28092
28093if test -z "$C_O_FLAG_HIGHEST"; then
28094   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28095fi
28096
28097if test -z "$CXX_O_FLAG_HIGHEST"; then
28098   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28099fi
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28115   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28116$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28117fi
28118
28119if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28120   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28121$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28122fi
28123
28124if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28126$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28127fi
28128
28129
28130# Check whether --with-extra-cflags was given.
28131if test "${with_extra_cflags+set}" = set; then :
28132  withval=$with_extra_cflags;
28133fi
28134
28135
28136
28137# Check whether --with-extra-cxxflags was given.
28138if test "${with_extra_cxxflags+set}" = set; then :
28139  withval=$with_extra_cxxflags;
28140fi
28141
28142
28143
28144# Check whether --with-extra-ldflags was given.
28145if test "${with_extra_ldflags+set}" = set; then :
28146  withval=$with_extra_ldflags;
28147fi
28148
28149
28150CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28151CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28152LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28153
28154# Hotspot needs these set in their legacy form
28155LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28156LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28157LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28158
28159
28160
28161
28162
28163###############################################################################
28164#
28165# Now setup the CFLAGS and LDFLAGS for the JDK build.
28166# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28167#
28168case $COMPILER_NAME in
28169      gcc )
28170      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28171                          -pipe \
28172                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28173	  case $OPENJDK_TARGET_CPU_ARCH in
28174	  arm )
28175            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28176	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28177	  ;;
28178	  ppc )
28179            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28180	  ;;
28181	  * )
28182	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28183	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28184          ;;
28185	  esac
28186          ;;
28187      ossc )
28188          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28189          case $OPENJDK_TARGET_CPU_ARCH in
28190          x86 )
28191            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28192       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28193          ;;
28194          esac
28195
28196      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28197      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28198
28199          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28200          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28201          ;;
28202      cl )
28203          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28204               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28205	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28206	       -DWIN32 -DIAL"
28207          case $OPENJDK_TARGET_CPU in
28208              x86 )
28209                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28210                  ;;
28211              x86_64 )
28212                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28213                  ;;
28214          esac
28215          ;;
28216esac
28217
28218###############################################################################
28219
28220CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28221
28222# The package path is used only on macosx?
28223PACKAGE_PATH=/opt/local
28224
28225
28226if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28227    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28228    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28229    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28230    #   Note: -Dmacro         is the same as    #define macro 1
28231    #         -Dmacro=	    is the same as    #define macro
28232    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28233        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28234    else
28235        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28236    fi
28237else
28238    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28239fi
28240if test "x$OPENJDK_TARGET_OS" = xlinux; then
28241    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28242fi
28243if test "x$OPENJDK_TARGET_OS" = xwindows; then
28244    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28245fi
28246if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28247    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28248fi
28249if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28250    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28251fi
28252if test "x$OPENJDK_TARGET_OS" = xbsd; then
28253    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28254fi
28255if test "x$DEBUG_LEVEL" = xrelease; then
28256    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28257    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28258        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28259    fi
28260else
28261    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28262fi
28263
28264CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28265CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28266
28267CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28268        -I${JDK_OUTPUTDIR}/include \
28269        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28270        -I${JDK_TOPDIR}/src/share/javavm/export \
28271        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28272        -I${JDK_TOPDIR}/src/share/native/common \
28273        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28274
28275# The shared libraries are compiled using the picflag.
28276CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28277CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28278
28279# Executable flags
28280CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28281CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28282
28283# Now this is odd. The JDK native libraries have to link against libjvm.so
28284# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28285# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28286# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28287# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28288# libraries will link to whatever is in memory. Yuck.
28289#
28290# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28291if test "x$COMPILER_NAME" = xcl; then
28292    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28293    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28294        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28295    fi
28296    # TODO: make -debug optional "--disable-full-debug-symbols"
28297    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28298    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28299    LDFLAGS_JDKLIB_SUFFIX=""
28300    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28301        LDFLAGS_STACK_SIZE=1048576
28302    else
28303        LDFLAGS_STACK_SIZE=327680
28304    fi
28305    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28306else
28307    if test "x$COMPILER_NAME" = xgcc; then
28308        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28309        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28310        if test -n "$HAS_GNU_HASH"; then
28311            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28312        fi
28313        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28314          # And since we now know that the linker is gnu, then add -z defs, to forbid
28315          # undefined symbols in object files.
28316          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28317          if test "x$DEBUG_LEVEL" = "xrelease"; then
28318              # When building release libraries, tell the linker optimize them.
28319              # Should this be supplied to the OSS linker as well?
28320              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28321          fi
28322        fi
28323    fi
28324    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28325                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28326
28327    # On some platforms (mac) the linker warns about non existing -L dirs.
28328    # Add server first if available. Linking aginst client does not always produce the same results.
28329    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28330    # Default to server for other variants.
28331    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28332        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28333    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28334        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28335    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28336        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28337    else
28338        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28339    fi
28340
28341    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28342    if test "x$COMPILER_NAME" = xossc; then
28343        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28344    fi
28345
28346    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28347    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28348        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28349    fi
28350fi
28351
28352# Adjust flags according to debug level.
28353case $DEBUG_LEVEL in
28354      fastdebug )
28355              CFLAGS="$CFLAGS $D_FLAG"
28356              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28357              ;;
28358      slowdebug )
28359              CFLAGS="$CFLAGS $D_FLAG"
28360	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28361	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28362	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28363	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28364              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28365              ;;
28366esac
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382# Setup debug symbols (need objcopy from the toolchain for that)
28383
28384#
28385# ENABLE_DEBUG_SYMBOLS
28386# This must be done after the toolchain is setup, since we're looking at objcopy.
28387#
28388# Check whether --enable-debug-symbols was given.
28389if test "${enable_debug_symbols+set}" = set; then :
28390  enableval=$enable_debug_symbols;
28391fi
28392
28393
28394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28395$as_echo_n "checking if we should generate debug symbols... " >&6; }
28396
28397if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28398   # explicit enabling of enable-debug-symbols and can't find objcopy
28399   #   this is an error
28400   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28401fi
28402
28403if test "x$enable_debug_symbols" = "xyes"; then
28404  ENABLE_DEBUG_SYMBOLS=true
28405elif test "x$enable_debug_symbols" = "xno"; then
28406  ENABLE_DEBUG_SYMBOLS=false
28407else
28408  # default on macosx is false
28409  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28410    ENABLE_DEBUG_SYMBOLS=false
28411  # Default is on if objcopy is found, otherwise off
28412  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28413    ENABLE_DEBUG_SYMBOLS=true
28414  else
28415    ENABLE_DEBUG_SYMBOLS=false
28416  fi
28417fi
28418
28419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28420$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28421
28422#
28423# ZIP_DEBUGINFO_FILES
28424#
28425# Check whether --enable-zip-debug-info was given.
28426if test "${enable_zip_debug_info+set}" = set; then :
28427  enableval=$enable_zip_debug_info;
28428fi
28429
28430
28431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28432$as_echo_n "checking if we should zip debug-info files... " >&6; }
28433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28434$as_echo "${enable_zip_debug_info}" >&6; }
28435
28436if test "x${enable_zip_debug_info}" = "xno"; then
28437   ZIP_DEBUGINFO_FILES=false
28438else
28439   ZIP_DEBUGINFO_FILES=true
28440fi
28441
28442
28443
28444
28445
28446
28447
28448###############################################################################
28449#
28450# Check dependencies for external and internal libraries.
28451#
28452###############################################################################
28453
28454
28455
28456###############################################################################
28457#
28458# OS specific settings that we never will need to probe.
28459#
28460if test "x$OPENJDK_TARGET_OS" = xlinux; then
28461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28462$as_echo_n "checking what is not needed on Linux?... " >&6; }
28463    PULSE_NOT_NEEDED=yes
28464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28465$as_echo "pulse" >&6; }
28466fi
28467
28468if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28470$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28471    ALSA_NOT_NEEDED=yes
28472    PULSE_NOT_NEEDED=yes
28473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28474$as_echo "alsa pulse" >&6; }
28475fi
28476
28477if test "x$OPENJDK_TARGET_OS" = xwindows; then
28478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28479$as_echo_n "checking what is not needed on Windows?... " >&6; }
28480    CUPS_NOT_NEEDED=yes
28481    ALSA_NOT_NEEDED=yes
28482    PULSE_NOT_NEEDED=yes
28483    X11_NOT_NEEDED=yes
28484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28485$as_echo "alsa cups pulse x11" >&6; }
28486fi
28487
28488if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28490$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28491    ALSA_NOT_NEEDED=yes
28492    PULSE_NOT_NEEDED=yes
28493    X11_NOT_NEEDED=yes
28494    FREETYPE2_NOT_NEEDED=yes
28495    # If the java runtime framework is disabled, then we need X11.
28496    # This will be adjusted below.
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28498$as_echo "alsa pulse x11" >&6; }
28499fi
28500
28501if test "x$OPENJDK_TARGET_OS" = xbsd; then
28502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28503$as_echo_n "checking what is not needed on bsd?... " >&6; }
28504    ALSA_NOT_NEEDED=yes
28505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28506$as_echo "alsa" >&6; }
28507fi
28508
28509if test "x$OPENJDK" = "xfalse"; then
28510    FREETYPE2_NOT_NEEDED=yes
28511fi
28512
28513if test "x$SUPPORT_HEADFUL" = xno; then
28514    X11_NOT_NEEDED=yes
28515fi
28516
28517###############################################################################
28518#
28519# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28520# that uses this API.
28521#
28522# Check whether --enable-macosx-runtime-support was given.
28523if test "${enable_macosx_runtime_support+set}" = set; then :
28524  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28525else
28526  MACOSX_RUNTIME_SUPPORT="no"
28527fi
28528
28529
28530USE_MACOSX_RUNTIME_SUPPORT=no
28531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28532$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28533if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28534    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28535        MACOSX_RUNTIME_SUPPORT=yes
28536        USE_MACOSX_RUNTIME_SUPPORT=yes
28537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28538$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28539    else
28540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28541$as_echo "yes, but explicitly disabled." >&6; }
28542    fi
28543else
28544    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28545$as_echo "no" >&6; }
28546fi
28547
28548if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28550$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28551    X11_NOT_NEEDED=
28552    FREETYPE2_NOT_NEEDED=
28553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28554$as_echo "alsa pulse" >&6; }
28555fi
28556
28557
28558
28559
28560###############################################################################
28561#
28562# Check for X Windows
28563#
28564
28565# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28566# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28567# --x-libraries for the sysroot, if that seems to be correct.
28568if test "x$SYS_ROOT" != "x/"; then
28569  if test "x$x_includes" = xNONE; then
28570    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28571      x_includes="$SYS_ROOT/usr/X11R6/include"
28572    fi
28573  fi
28574  if test "x$x_libraries" = xNONE; then
28575    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28576      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28577    fi
28578  fi
28579fi
28580
28581# Now let autoconf do it's magic
28582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28583$as_echo_n "checking for X... " >&6; }
28584
28585
28586# Check whether --with-x was given.
28587if test "${with_x+set}" = set; then :
28588  withval=$with_x;
28589fi
28590
28591# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28592if test "x$with_x" = xno; then
28593  # The user explicitly disabled X.
28594  have_x=disabled
28595else
28596  case $x_includes,$x_libraries in #(
28597    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28598    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28599  $as_echo_n "(cached) " >&6
28600else
28601  # One or both of the vars are not set, and there is no cached value.
28602ac_x_includes=no ac_x_libraries=no
28603rm -f -r conftest.dir
28604if mkdir conftest.dir; then
28605  cd conftest.dir
28606  cat >Imakefile <<'_ACEOF'
28607incroot:
28608	@echo incroot='${INCROOT}'
28609usrlibdir:
28610	@echo usrlibdir='${USRLIBDIR}'
28611libdir:
28612	@echo libdir='${LIBDIR}'
28613_ACEOF
28614  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28615    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28616    for ac_var in incroot usrlibdir libdir; do
28617      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28618    done
28619    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28620    for ac_extension in a so sl dylib la dll; do
28621      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28622	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28623	ac_im_usrlibdir=$ac_im_libdir; break
28624      fi
28625    done
28626    # Screen out bogus values from the imake configuration.  They are
28627    # bogus both because they are the default anyway, and because
28628    # using them would break gcc on systems where it needs fixed includes.
28629    case $ac_im_incroot in
28630	/usr/include) ac_x_includes= ;;
28631	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28632    esac
28633    case $ac_im_usrlibdir in
28634	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28635	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28636    esac
28637  fi
28638  cd ..
28639  rm -f -r conftest.dir
28640fi
28641
28642# Standard set of common directories for X headers.
28643# Check X11 before X11Rn because it is often a symlink to the current release.
28644ac_x_header_dirs='
28645/usr/X11/include
28646/usr/X11R7/include
28647/usr/X11R6/include
28648/usr/X11R5/include
28649/usr/X11R4/include
28650
28651/usr/include/X11
28652/usr/include/X11R7
28653/usr/include/X11R6
28654/usr/include/X11R5
28655/usr/include/X11R4
28656
28657/usr/local/X11/include
28658/usr/local/X11R7/include
28659/usr/local/X11R6/include
28660/usr/local/X11R5/include
28661/usr/local/X11R4/include
28662
28663/usr/local/include/X11
28664/usr/local/include/X11R7
28665/usr/local/include/X11R6
28666/usr/local/include/X11R5
28667/usr/local/include/X11R4
28668
28669/usr/X386/include
28670/usr/x386/include
28671/usr/XFree86/include/X11
28672
28673/usr/include
28674/usr/local/include
28675/usr/unsupported/include
28676/usr/athena/include
28677/usr/local/x11r5/include
28678/usr/lpp/Xamples/include
28679
28680/usr/openwin/include
28681/usr/openwin/share/include'
28682
28683if test "$ac_x_includes" = no; then
28684  # Guess where to find include files, by looking for Xlib.h.
28685  # First, try using that file with no special directory specified.
28686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28687/* end confdefs.h.  */
28688#include <X11/Xlib.h>
28689_ACEOF
28690if ac_fn_cxx_try_cpp "$LINENO"; then :
28691  # We can compile using X headers with no special include directory.
28692ac_x_includes=
28693else
28694  for ac_dir in $ac_x_header_dirs; do
28695  if test -r "$ac_dir/X11/Xlib.h"; then
28696    ac_x_includes=$ac_dir
28697    break
28698  fi
28699done
28700fi
28701rm -f conftest.err conftest.i conftest.$ac_ext
28702fi # $ac_x_includes = no
28703
28704if test "$ac_x_libraries" = no; then
28705  # Check for the libraries.
28706  # See if we find them without any special options.
28707  # Don't add to $LIBS permanently.
28708  ac_save_LIBS=$LIBS
28709  LIBS="-lX11 $LIBS"
28710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28711/* end confdefs.h.  */
28712#include <X11/Xlib.h>
28713int
28714main ()
28715{
28716XrmInitialize ()
28717  ;
28718  return 0;
28719}
28720_ACEOF
28721if ac_fn_cxx_try_link "$LINENO"; then :
28722  LIBS=$ac_save_LIBS
28723# We can link X programs with no special library path.
28724ac_x_libraries=
28725else
28726  LIBS=$ac_save_LIBS
28727for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28728do
28729  # Don't even attempt the hair of trying to link an X program!
28730  for ac_extension in a so sl dylib la dll; do
28731    if test -r "$ac_dir/libX11.$ac_extension"; then
28732      ac_x_libraries=$ac_dir
28733      break 2
28734    fi
28735  done
28736done
28737fi
28738rm -f core conftest.err conftest.$ac_objext \
28739    conftest$ac_exeext conftest.$ac_ext
28740fi # $ac_x_libraries = no
28741
28742case $ac_x_includes,$ac_x_libraries in #(
28743  no,* | *,no | *\'*)
28744    # Didn't find X, or a directory has "'" in its name.
28745    ac_cv_have_x="have_x=no";; #(
28746  *)
28747    # Record where we found X for the cache.
28748    ac_cv_have_x="have_x=yes\
28749	ac_x_includes='$ac_x_includes'\
28750	ac_x_libraries='$ac_x_libraries'"
28751esac
28752fi
28753;; #(
28754    *) have_x=yes;;
28755  esac
28756  eval "$ac_cv_have_x"
28757fi # $with_x != no
28758
28759if test "$have_x" != yes; then
28760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28761$as_echo "$have_x" >&6; }
28762  no_x=yes
28763else
28764  # If each of the values was on the command line, it overrides each guess.
28765  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28766  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28767  # Update the cache value to reflect the command line values.
28768  ac_cv_have_x="have_x=yes\
28769	ac_x_includes='$x_includes'\
28770	ac_x_libraries='$x_libraries'"
28771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28772$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28773fi
28774
28775if test "$no_x" = yes; then
28776  # Not all programs may use this symbol, but it does not hurt to define it.
28777
28778$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28779
28780  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28781else
28782  if test -n "$x_includes"; then
28783    X_CFLAGS="$X_CFLAGS -I$x_includes"
28784  fi
28785
28786  # It would also be nice to do this for all -L options, not just this one.
28787  if test -n "$x_libraries"; then
28788    X_LIBS="$X_LIBS -L$x_libraries"
28789    # For Solaris; some versions of Sun CC require a space after -R and
28790    # others require no space.  Words are not sufficient . . . .
28791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28792$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28793    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28794    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28795    ac_cxx_werror_flag=yes
28796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28797/* end confdefs.h.  */
28798
28799int
28800main ()
28801{
28802
28803  ;
28804  return 0;
28805}
28806_ACEOF
28807if ac_fn_cxx_try_link "$LINENO"; then :
28808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28809$as_echo "no" >&6; }
28810       X_LIBS="$X_LIBS -R$x_libraries"
28811else
28812  LIBS="$ac_xsave_LIBS -R $x_libraries"
28813       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28814/* end confdefs.h.  */
28815
28816int
28817main ()
28818{
28819
28820  ;
28821  return 0;
28822}
28823_ACEOF
28824if ac_fn_cxx_try_link "$LINENO"; then :
28825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28826$as_echo "yes" >&6; }
28827	  X_LIBS="$X_LIBS -R $x_libraries"
28828else
28829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28830$as_echo "neither works" >&6; }
28831fi
28832rm -f core conftest.err conftest.$ac_objext \
28833    conftest$ac_exeext conftest.$ac_ext
28834fi
28835rm -f core conftest.err conftest.$ac_objext \
28836    conftest$ac_exeext conftest.$ac_ext
28837    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28838    LIBS=$ac_xsave_LIBS
28839  fi
28840
28841  # Check for system-dependent libraries X programs must link with.
28842  # Do this before checking for the system-independent R6 libraries
28843  # (-lICE), since we may need -lsocket or whatever for X linking.
28844
28845  if test "$ISC" = yes; then
28846    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28847  else
28848    # Martyn Johnson says this is needed for Ultrix, if the X
28849    # libraries were built with DECnet support.  And Karl Berry says
28850    # the Alpha needs dnet_stub (dnet does not exist).
28851    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28852    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28853/* end confdefs.h.  */
28854
28855/* Override any GCC internal prototype to avoid an error.
28856   Use char because int might match the return type of a GCC
28857   builtin and then its argument prototype would still apply.  */
28858#ifdef __cplusplus
28859extern "C"
28860#endif
28861char XOpenDisplay ();
28862int
28863main ()
28864{
28865return XOpenDisplay ();
28866  ;
28867  return 0;
28868}
28869_ACEOF
28870if ac_fn_cxx_try_link "$LINENO"; then :
28871
28872else
28873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28874$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28875if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28876  $as_echo_n "(cached) " >&6
28877else
28878  ac_check_lib_save_LIBS=$LIBS
28879LIBS="-ldnet  $LIBS"
28880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28881/* end confdefs.h.  */
28882
28883/* Override any GCC internal prototype to avoid an error.
28884   Use char because int might match the return type of a GCC
28885   builtin and then its argument prototype would still apply.  */
28886#ifdef __cplusplus
28887extern "C"
28888#endif
28889char dnet_ntoa ();
28890int
28891main ()
28892{
28893return dnet_ntoa ();
28894  ;
28895  return 0;
28896}
28897_ACEOF
28898if ac_fn_cxx_try_link "$LINENO"; then :
28899  ac_cv_lib_dnet_dnet_ntoa=yes
28900else
28901  ac_cv_lib_dnet_dnet_ntoa=no
28902fi
28903rm -f core conftest.err conftest.$ac_objext \
28904    conftest$ac_exeext conftest.$ac_ext
28905LIBS=$ac_check_lib_save_LIBS
28906fi
28907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28908$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28909if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28910  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28911fi
28912
28913    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28915$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28916if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28917  $as_echo_n "(cached) " >&6
28918else
28919  ac_check_lib_save_LIBS=$LIBS
28920LIBS="-ldnet_stub  $LIBS"
28921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28922/* end confdefs.h.  */
28923
28924/* Override any GCC internal prototype to avoid an error.
28925   Use char because int might match the return type of a GCC
28926   builtin and then its argument prototype would still apply.  */
28927#ifdef __cplusplus
28928extern "C"
28929#endif
28930char dnet_ntoa ();
28931int
28932main ()
28933{
28934return dnet_ntoa ();
28935  ;
28936  return 0;
28937}
28938_ACEOF
28939if ac_fn_cxx_try_link "$LINENO"; then :
28940  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28941else
28942  ac_cv_lib_dnet_stub_dnet_ntoa=no
28943fi
28944rm -f core conftest.err conftest.$ac_objext \
28945    conftest$ac_exeext conftest.$ac_ext
28946LIBS=$ac_check_lib_save_LIBS
28947fi
28948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28949$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28950if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28951  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28952fi
28953
28954    fi
28955fi
28956rm -f core conftest.err conftest.$ac_objext \
28957    conftest$ac_exeext conftest.$ac_ext
28958    LIBS="$ac_xsave_LIBS"
28959
28960    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28961    # to get the SysV transport functions.
28962    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28963    # needs -lnsl.
28964    # The nsl library prevents programs from opening the X display
28965    # on Irix 5.2, according to T.E. Dickey.
28966    # The functions gethostbyname, getservbyname, and inet_addr are
28967    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28968    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28969if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28970
28971fi
28972
28973    if test $ac_cv_func_gethostbyname = no; then
28974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28975$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28976if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28977  $as_echo_n "(cached) " >&6
28978else
28979  ac_check_lib_save_LIBS=$LIBS
28980LIBS="-lnsl  $LIBS"
28981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28982/* end confdefs.h.  */
28983
28984/* Override any GCC internal prototype to avoid an error.
28985   Use char because int might match the return type of a GCC
28986   builtin and then its argument prototype would still apply.  */
28987#ifdef __cplusplus
28988extern "C"
28989#endif
28990char gethostbyname ();
28991int
28992main ()
28993{
28994return gethostbyname ();
28995  ;
28996  return 0;
28997}
28998_ACEOF
28999if ac_fn_cxx_try_link "$LINENO"; then :
29000  ac_cv_lib_nsl_gethostbyname=yes
29001else
29002  ac_cv_lib_nsl_gethostbyname=no
29003fi
29004rm -f core conftest.err conftest.$ac_objext \
29005    conftest$ac_exeext conftest.$ac_ext
29006LIBS=$ac_check_lib_save_LIBS
29007fi
29008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29009$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29010if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29011  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29012fi
29013
29014      if test $ac_cv_lib_nsl_gethostbyname = no; then
29015	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29016$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29017if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29018  $as_echo_n "(cached) " >&6
29019else
29020  ac_check_lib_save_LIBS=$LIBS
29021LIBS="-lbsd  $LIBS"
29022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29023/* end confdefs.h.  */
29024
29025/* Override any GCC internal prototype to avoid an error.
29026   Use char because int might match the return type of a GCC
29027   builtin and then its argument prototype would still apply.  */
29028#ifdef __cplusplus
29029extern "C"
29030#endif
29031char gethostbyname ();
29032int
29033main ()
29034{
29035return gethostbyname ();
29036  ;
29037  return 0;
29038}
29039_ACEOF
29040if ac_fn_cxx_try_link "$LINENO"; then :
29041  ac_cv_lib_bsd_gethostbyname=yes
29042else
29043  ac_cv_lib_bsd_gethostbyname=no
29044fi
29045rm -f core conftest.err conftest.$ac_objext \
29046    conftest$ac_exeext conftest.$ac_ext
29047LIBS=$ac_check_lib_save_LIBS
29048fi
29049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29050$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29051if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29052  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29053fi
29054
29055      fi
29056    fi
29057
29058    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29059    # socket/setsockopt and other routines are undefined under SCO ODT
29060    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29061    # on later versions), says Simon Leinen: it contains gethostby*
29062    # variants that don't use the name server (or something).  -lsocket
29063    # must be given before -lnsl if both are needed.  We assume that
29064    # if connect needs -lnsl, so does gethostbyname.
29065    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29066if test "x$ac_cv_func_connect" = x""yes; then :
29067
29068fi
29069
29070    if test $ac_cv_func_connect = no; then
29071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29072$as_echo_n "checking for connect in -lsocket... " >&6; }
29073if test "${ac_cv_lib_socket_connect+set}" = set; then :
29074  $as_echo_n "(cached) " >&6
29075else
29076  ac_check_lib_save_LIBS=$LIBS
29077LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29079/* end confdefs.h.  */
29080
29081/* Override any GCC internal prototype to avoid an error.
29082   Use char because int might match the return type of a GCC
29083   builtin and then its argument prototype would still apply.  */
29084#ifdef __cplusplus
29085extern "C"
29086#endif
29087char connect ();
29088int
29089main ()
29090{
29091return connect ();
29092  ;
29093  return 0;
29094}
29095_ACEOF
29096if ac_fn_cxx_try_link "$LINENO"; then :
29097  ac_cv_lib_socket_connect=yes
29098else
29099  ac_cv_lib_socket_connect=no
29100fi
29101rm -f core conftest.err conftest.$ac_objext \
29102    conftest$ac_exeext conftest.$ac_ext
29103LIBS=$ac_check_lib_save_LIBS
29104fi
29105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29106$as_echo "$ac_cv_lib_socket_connect" >&6; }
29107if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29108  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29109fi
29110
29111    fi
29112
29113    # Guillermo Gomez says -lposix is necessary on A/UX.
29114    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29115if test "x$ac_cv_func_remove" = x""yes; then :
29116
29117fi
29118
29119    if test $ac_cv_func_remove = no; then
29120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29121$as_echo_n "checking for remove in -lposix... " >&6; }
29122if test "${ac_cv_lib_posix_remove+set}" = set; then :
29123  $as_echo_n "(cached) " >&6
29124else
29125  ac_check_lib_save_LIBS=$LIBS
29126LIBS="-lposix  $LIBS"
29127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29128/* end confdefs.h.  */
29129
29130/* Override any GCC internal prototype to avoid an error.
29131   Use char because int might match the return type of a GCC
29132   builtin and then its argument prototype would still apply.  */
29133#ifdef __cplusplus
29134extern "C"
29135#endif
29136char remove ();
29137int
29138main ()
29139{
29140return remove ();
29141  ;
29142  return 0;
29143}
29144_ACEOF
29145if ac_fn_cxx_try_link "$LINENO"; then :
29146  ac_cv_lib_posix_remove=yes
29147else
29148  ac_cv_lib_posix_remove=no
29149fi
29150rm -f core conftest.err conftest.$ac_objext \
29151    conftest$ac_exeext conftest.$ac_ext
29152LIBS=$ac_check_lib_save_LIBS
29153fi
29154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29155$as_echo "$ac_cv_lib_posix_remove" >&6; }
29156if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29157  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29158fi
29159
29160    fi
29161
29162    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29163    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29164if test "x$ac_cv_func_shmat" = x""yes; then :
29165
29166fi
29167
29168    if test $ac_cv_func_shmat = no; then
29169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29170$as_echo_n "checking for shmat in -lipc... " >&6; }
29171if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29172  $as_echo_n "(cached) " >&6
29173else
29174  ac_check_lib_save_LIBS=$LIBS
29175LIBS="-lipc  $LIBS"
29176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29177/* end confdefs.h.  */
29178
29179/* Override any GCC internal prototype to avoid an error.
29180   Use char because int might match the return type of a GCC
29181   builtin and then its argument prototype would still apply.  */
29182#ifdef __cplusplus
29183extern "C"
29184#endif
29185char shmat ();
29186int
29187main ()
29188{
29189return shmat ();
29190  ;
29191  return 0;
29192}
29193_ACEOF
29194if ac_fn_cxx_try_link "$LINENO"; then :
29195  ac_cv_lib_ipc_shmat=yes
29196else
29197  ac_cv_lib_ipc_shmat=no
29198fi
29199rm -f core conftest.err conftest.$ac_objext \
29200    conftest$ac_exeext conftest.$ac_ext
29201LIBS=$ac_check_lib_save_LIBS
29202fi
29203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29204$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29205if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29206  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29207fi
29208
29209    fi
29210  fi
29211
29212  # Check for libraries that X11R6 Xt/Xaw programs need.
29213  ac_save_LDFLAGS=$LDFLAGS
29214  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29215  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29216  # check for ICE first), but we must link in the order -lSM -lICE or
29217  # we get undefined symbols.  So assume we have SM if we have ICE.
29218  # These have to be linked with before -lX11, unlike the other
29219  # libraries we check for below, so use a different variable.
29220  # John Interrante, Karl Berry
29221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29222$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29223if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29224  $as_echo_n "(cached) " >&6
29225else
29226  ac_check_lib_save_LIBS=$LIBS
29227LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29229/* end confdefs.h.  */
29230
29231/* Override any GCC internal prototype to avoid an error.
29232   Use char because int might match the return type of a GCC
29233   builtin and then its argument prototype would still apply.  */
29234#ifdef __cplusplus
29235extern "C"
29236#endif
29237char IceConnectionNumber ();
29238int
29239main ()
29240{
29241return IceConnectionNumber ();
29242  ;
29243  return 0;
29244}
29245_ACEOF
29246if ac_fn_cxx_try_link "$LINENO"; then :
29247  ac_cv_lib_ICE_IceConnectionNumber=yes
29248else
29249  ac_cv_lib_ICE_IceConnectionNumber=no
29250fi
29251rm -f core conftest.err conftest.$ac_objext \
29252    conftest$ac_exeext conftest.$ac_ext
29253LIBS=$ac_check_lib_save_LIBS
29254fi
29255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29256$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29257if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29258  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29259fi
29260
29261  LDFLAGS=$ac_save_LDFLAGS
29262
29263fi
29264
29265
29266if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29267
29268    # Print a helpful message on how to acquire the necessary build dependency.
29269    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29270    MISSING_DEPENDENCY=x11
29271    PKGHANDLER_COMMAND=
29272
29273    case $PKGHANDLER in
29274	apt-get)
29275                apt_help     $MISSING_DEPENDENCY ;;
29276    yum)
29277                yum_help     $MISSING_DEPENDENCY ;;
29278	port)
29279                port_help    $MISSING_DEPENDENCY ;;
29280	pkgutil)
29281                pkgutil_help $MISSING_DEPENDENCY ;;
29282	pkgadd)
29283                pkgadd_help  $MISSING_DEPENDENCY ;;
29284    * )
29285      break ;;
29286    esac
29287
29288    if test "x$PKGHANDLER_COMMAND" != x; then
29289        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29290    fi
29291
29292    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29293fi
29294
29295# Some of the old makefiles require a setting of OPENWIN_HOME
29296# Since the X11R6 directory has disappeared on later Linuxes,
29297# we need to probe for it.
29298if test "x$OPENJDK_TARGET_OS" = xlinux; then
29299    if test -d "$SYS_ROOT/usr/X11R6"; then
29300        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29301    fi
29302    if test -d "$SYS_ROOT/usr/include/X11"; then
29303        OPENWIN_HOME="$SYS_ROOT/usr"
29304    fi
29305fi
29306if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29307    OPENWIN_HOME="/usr/openwin"
29308fi
29309
29310
29311
29312#
29313# Weird Sol10 something check...TODO change to try compile
29314#
29315if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29316  if test "`uname -r`" = "5.10"; then
29317     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29318     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29319     fi
29320  fi
29321fi
29322
29323ac_ext=c
29324ac_cpp='$CPP $CPPFLAGS'
29325ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29326ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29327ac_compiler_gnu=$ac_cv_c_compiler_gnu
29328
29329OLD_CFLAGS="$CFLAGS"
29330CFLAGS="$CFLAGS $X_CFLAGS"
29331
29332# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29333for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29334do :
29335  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29336ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29337                   # include <X11/Xutil.h>
29338
29339"
29340if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29341  cat >>confdefs.h <<_ACEOF
29342#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29343_ACEOF
29344 X11_A_OK=yes
29345else
29346  X11_A_OK=no
29347fi
29348
29349done
29350
29351
29352CFLAGS="$OLD_CFLAGS"
29353ac_ext=cpp
29354ac_cpp='$CXXCPP $CPPFLAGS'
29355ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29356ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29357ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29358
29359
29360if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29361
29362    # Print a helpful message on how to acquire the necessary build dependency.
29363    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29364    MISSING_DEPENDENCY=x11
29365    PKGHANDLER_COMMAND=
29366
29367    case $PKGHANDLER in
29368	apt-get)
29369                apt_help     $MISSING_DEPENDENCY ;;
29370    yum)
29371                yum_help     $MISSING_DEPENDENCY ;;
29372	port)
29373                port_help    $MISSING_DEPENDENCY ;;
29374	pkgutil)
29375                pkgutil_help $MISSING_DEPENDENCY ;;
29376	pkgadd)
29377                pkgadd_help  $MISSING_DEPENDENCY ;;
29378    * )
29379      break ;;
29380    esac
29381
29382    if test "x$PKGHANDLER_COMMAND" != x; then
29383        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29384    fi
29385
29386    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29387fi
29388
29389
29390
29391
29392
29393
29394###############################################################################
29395#
29396# The common unix printing system cups is used to print from java.
29397#
29398
29399# Check whether --with-cups was given.
29400if test "${with_cups+set}" = set; then :
29401  withval=$with_cups;
29402fi
29403
29404
29405# Check whether --with-cups-include was given.
29406if test "${with_cups_include+set}" = set; then :
29407  withval=$with_cups_include;
29408fi
29409
29410
29411if test "x$CUPS_NOT_NEEDED" = xyes; then
29412	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29413		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29414$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29415	fi
29416	CUPS_CFLAGS=
29417else
29418	CUPS_FOUND=no
29419
29420	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29421	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29422	fi
29423
29424	if test "x${with_cups}" != x; then
29425	    CUPS_CFLAGS="-I${with_cups}/include"
29426	    CUPS_FOUND=yes
29427	fi
29428	if test "x${with_cups_include}" != x; then
29429	    CUPS_CFLAGS="-I${with_cups_include}"
29430	    CUPS_FOUND=yes
29431	fi
29432	if test "x$CUPS_FOUND" = xno; then
29433
29434
29435    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29436        # Source the builddeps file again, to make sure it uses the latest variables!
29437        . $builddepsfile
29438        # Look for a target and build machine specific resource!
29439        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29440        if test "x$resource" = x; then
29441            # Ok, lets instead look for a target specific resource
29442            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29443        fi
29444        if test "x$resource" = x; then
29445            # Ok, lets instead look for a build specific resource
29446            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29447        fi
29448        if test "x$resource" = x; then
29449            # Ok, lets instead look for a generic resource
29450            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29451            resource=${builddep_cups}
29452        fi
29453        if test "x$resource" != x; then
29454            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29455$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29456	    # If the resource in the builddeps.conf file is an existing directory,
29457	    # for example /java/linux/cups
29458	    if test -d ${resource}; then
29459	       depdir=${resource}
29460	    else
29461
29462# cups is for example mymodule
29463# $resource is for example libs/general/libmymod_1_2_3.zip
29464# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29465# $with_builddeps_dir is for example /localhome/builddeps
29466# depdir is the name of the variable into which we store the depdir, eg MYMOD
29467# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29468# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29469    filename=`basename $resource`
29470    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29471    filebase=${filename%%.*}
29472    extension=${filename#*.}
29473    installdir=$with_builddeps_dir/$filebase
29474    if test ! -f $installdir/$filename.unpacked; then
29475        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29476$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29477        if test ! -d $installdir; then
29478            mkdir -p $installdir
29479        fi
29480        if test ! -d $installdir; then
29481            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29482        fi
29483        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29484        touch $tmpfile
29485        if test ! -f $tmpfile; then
29486            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29487        fi
29488
29489    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29490    # $tmpfile is the local file name for the downloaded file.
29491    VALID_TOOL=no
29492    if test "x$BDEPS_FTP" = xwget; then
29493       VALID_TOOL=yes
29494       wget -O $tmpfile $with_builddeps_server/$resource
29495    fi
29496    if test "x$BDEPS_FTP" = xlftp; then
29497       VALID_TOOL=yes
29498       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29499    fi
29500    if test "x$BDEPS_FTP" = xftp; then
29501        VALID_TOOL=yes
29502        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29503        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29504        FTPUSERPWD=${FTPSERVER%%@*}
29505        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29506            FTPUSER=${userpwd%%:*}
29507            FTPPWD=${userpwd#*@}
29508            FTPSERVER=${FTPSERVER#*@}
29509        else
29510            FTPUSER=ftp
29511            FTPPWD=ftp
29512        fi
29513        # the "pass" command does not work on some
29514        # ftp clients (read ftp.exe) but if it works,
29515        # passive mode is better!
29516        (\
29517            echo "user $FTPUSER $FTPPWD"        ;\
29518            echo "pass"                         ;\
29519            echo "bin"                          ;\
29520            echo "get $FTPPATH $tmpfile"              ;\
29521        ) | ftp -in $FTPSERVER
29522    fi
29523    if test "x$VALID_TOOL" != xyes; then
29524       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29525    fi
29526
29527        mv $tmpfile $installdir/$filename
29528        if test ! -s $installdir/$filename; then
29529            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29530        fi
29531        case "$extension" in
29532            zip)  echo "Unzipping $installdir/$filename..."
29533               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29534            ;;
29535            tar.gz) echo "Untaring $installdir/$filename..."
29536               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29537            ;;
29538            tgz) echo "Untaring $installdir/$filename..."
29539               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29540            ;;
29541            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29542            ;;
29543        esac
29544    fi
29545    if test -f $installdir/$filename.unpacked; then
29546        depdir=$installdir
29547    fi
29548
29549	    fi
29550            # Source the builddeps file again, because in the previous command, the depdir
29551            # was updated to point at the current build dependency install directory.
29552            . $builddepsfile
29553            # Now extract variables from the builddeps.conf files.
29554            theroot=${builddep_cups_ROOT}
29555            thecflags=${builddep_cups_CFLAGS}
29556            thelibs=${builddep_cups_LIBS}
29557            if test "x$depdir" = x; then
29558                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29559            fi
29560            CUPS=$depdir
29561            if test "x$theroot" != x; then
29562               CUPS="$theroot"
29563            fi
29564            if test "x$thecflags" != x; then
29565               CUPS_CFLAGS="$thecflags"
29566            fi
29567            if test "x$thelibs" != x; then
29568               CUPS_LIBS="$thelibs"
29569            fi
29570            CUPS_FOUND=yes
29571
29572        fi
29573
29574    fi
29575
29576	fi
29577	if test "x$CUPS_FOUND" = xno; then
29578	    # Are the cups headers installed in the default /usr/include location?
29579	    for ac_header in cups/cups.h cups/ppd.h
29580do :
29581  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29582ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29583if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29584  cat >>confdefs.h <<_ACEOF
29585#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29586_ACEOF
29587 CUPS_FOUND=yes
29588	                      CUPS_CFLAGS=
29589	                      DEFAULT_CUPS=yes
29590fi
29591
29592done
29593
29594	fi
29595	if test "x$CUPS_FOUND" = xno; then
29596	    # Getting nervous now? Lets poke around for standard Solaris third-party
29597	    # package installation locations.
29598	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29599$as_echo_n "checking for cups headers... " >&6; }
29600	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29601	       # An SFW package seems to be installed!
29602	       CUPS_FOUND=yes
29603	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29604	    elif test -s /opt/csw/include/cups/cups.h; then
29605	       # A CSW package seems to be installed!
29606	       CUPS_FOUND=yes
29607	       CUPS_CFLAGS="-I/opt/csw/include"
29608	    fi
29609	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29610$as_echo "$CUPS_FOUND" >&6; }
29611	fi
29612	if test "x$CUPS_FOUND" = xno; then
29613
29614    # Print a helpful message on how to acquire the necessary build dependency.
29615    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29616    MISSING_DEPENDENCY=cups
29617    PKGHANDLER_COMMAND=
29618
29619    case $PKGHANDLER in
29620	apt-get)
29621                apt_help     $MISSING_DEPENDENCY ;;
29622    yum)
29623                yum_help     $MISSING_DEPENDENCY ;;
29624	port)
29625                port_help    $MISSING_DEPENDENCY ;;
29626	pkgutil)
29627                pkgutil_help $MISSING_DEPENDENCY ;;
29628	pkgadd)
29629                pkgadd_help  $MISSING_DEPENDENCY ;;
29630    * )
29631      break ;;
29632    esac
29633
29634    if test "x$PKGHANDLER_COMMAND" != x; then
29635        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29636    fi
29637
29638	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29639	fi
29640fi
29641
29642
29643
29644
29645
29646
29647###############################################################################
29648#
29649# The ubiquitous freetype2 library is used to render fonts.
29650#
29651
29652# Check whether --with-freetype was given.
29653if test "${with_freetype+set}" = set; then :
29654  withval=$with_freetype;
29655fi
29656
29657
29658# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29659USING_SYSTEM_FT_LIB=false
29660
29661if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29662	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29663		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29664$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29665	fi
29666	FREETYPE2_CFLAGS=
29667	FREETYPE2_LIBS=
29668        FREETYPE2_LIB_PATH=
29669else
29670	FREETYPE2_FOUND=no
29671
29672	if test "x$with_freetype" != x; then
29673
29674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29675
29676  # Input might be given as Windows format, start by converting to
29677  # unix format.
29678  path="$with_freetype"
29679  new_path=`$CYGPATH -u "$path"`
29680
29681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29684  # "foo.exe" is OK but "foo" is an error.
29685  #
29686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29687  # It is also a way to make sure we got the proper file name for the real test later on.
29688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29689  if test "x$test_shortpath" = x; then
29690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29691$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29692    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29693  fi
29694
29695  # Call helper function which possibly converts this using DOS-style short mode.
29696  # If so, the updated path is stored in $new_path.
29697
29698  input_path="$new_path"
29699  # Check if we need to convert this using DOS-style short mode. If the path
29700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29701  # take no chances and rewrite it.
29702  # Note: m4 eats our [], so we need to use [ and ] instead.
29703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29704  if test "x$has_forbidden_chars" != x; then
29705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29709      # Going to short mode and back again did indeed matter. Since short mode is
29710      # case insensitive, let's make it lowercase to improve readability.
29711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29712      # Now convert it back to Unix-stile (cygpath)
29713      input_path=`$CYGPATH -u "$shortmode_path"`
29714      new_path="$input_path"
29715    fi
29716  fi
29717
29718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29719  if test "x$test_cygdrive_prefix" = x; then
29720    # As a simple fix, exclude /usr/bin since it's not a real path.
29721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29723      # a path prefixed by /cygdrive for fixpath to work.
29724      new_path="$CYGWIN_ROOT_PATH$input_path"
29725    fi
29726  fi
29727
29728
29729  if test "x$path" != "x$new_path"; then
29730    with_freetype="$new_path"
29731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29732$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29733  fi
29734
29735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29736
29737  path="$with_freetype"
29738  has_colon=`$ECHO $path | $GREP ^.:`
29739  new_path="$path"
29740  if test "x$has_colon" = x; then
29741    # Not in mixed or Windows style, start by that.
29742    new_path=`cmd //c echo $path`
29743  fi
29744
29745
29746  input_path="$new_path"
29747  # Check if we need to convert this using DOS-style short mode. If the path
29748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29749  # take no chances and rewrite it.
29750  # Note: m4 eats our [], so we need to use [ and ] instead.
29751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29752  if test "x$has_forbidden_chars" != x; then
29753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29755  fi
29756
29757
29758  windows_path="$new_path"
29759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29760    unix_path=`$CYGPATH -u "$windows_path"`
29761    new_path="$unix_path"
29762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29764    new_path="$unix_path"
29765  fi
29766
29767  if test "x$path" != "x$new_path"; then
29768    with_freetype="$new_path"
29769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29770$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29771  fi
29772
29773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29775
29776  else
29777    # We're on a posix platform. Hooray! :)
29778    path="$with_freetype"
29779
29780    if test ! -f "$path" && test ! -d "$path"; then
29781      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29782    fi
29783
29784    has_space=`$ECHO "$path" | $GREP " "`
29785    if test "x$has_space" != x; then
29786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29787$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29788      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29789    fi
29790  fi
29791
29792	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29793            FREETYPE2_LIB_PATH="$with_freetype/lib"
29794            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29795                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29796                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29797            fi
29798            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29799                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29800            fi
29801	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29802            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29803                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29804            fi
29805 	    FREETYPE2_FOUND=yes
29806   	    if test "x$FREETYPE2_FOUND" = xyes; then
29807	        # Verify that the directories exist
29808                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29809		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29810		fi
29811	        # List the contents of the lib.
29812		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29813                if test "x$FREETYPELIB" = x; then
29814		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29815		fi
29816	        # Check one h-file
29817                if ! test -s "$with_freetype/include/ft2build.h"; then
29818		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29819		fi
29820            fi
29821        fi
29822	if test "x$FREETYPE2_FOUND" = xno; then
29823
29824
29825    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29826        # Source the builddeps file again, to make sure it uses the latest variables!
29827        . $builddepsfile
29828        # Look for a target and build machine specific resource!
29829        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29830        if test "x$resource" = x; then
29831            # Ok, lets instead look for a target specific resource
29832            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29833        fi
29834        if test "x$resource" = x; then
29835            # Ok, lets instead look for a build specific resource
29836            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29837        fi
29838        if test "x$resource" = x; then
29839            # Ok, lets instead look for a generic resource
29840            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29841            resource=${builddep_freetype2}
29842        fi
29843        if test "x$resource" != x; then
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29845$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29846	    # If the resource in the builddeps.conf file is an existing directory,
29847	    # for example /java/linux/cups
29848	    if test -d ${resource}; then
29849	       depdir=${resource}
29850	    else
29851
29852# freetype2 is for example mymodule
29853# $resource is for example libs/general/libmymod_1_2_3.zip
29854# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29855# $with_builddeps_dir is for example /localhome/builddeps
29856# depdir is the name of the variable into which we store the depdir, eg MYMOD
29857# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29858# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29859    filename=`basename $resource`
29860    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29861    filebase=${filename%%.*}
29862    extension=${filename#*.}
29863    installdir=$with_builddeps_dir/$filebase
29864    if test ! -f $installdir/$filename.unpacked; then
29865        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29866$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29867        if test ! -d $installdir; then
29868            mkdir -p $installdir
29869        fi
29870        if test ! -d $installdir; then
29871            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29872        fi
29873        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29874        touch $tmpfile
29875        if test ! -f $tmpfile; then
29876            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29877        fi
29878
29879    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29880    # $tmpfile is the local file name for the downloaded file.
29881    VALID_TOOL=no
29882    if test "x$BDEPS_FTP" = xwget; then
29883       VALID_TOOL=yes
29884       wget -O $tmpfile $with_builddeps_server/$resource
29885    fi
29886    if test "x$BDEPS_FTP" = xlftp; then
29887       VALID_TOOL=yes
29888       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29889    fi
29890    if test "x$BDEPS_FTP" = xftp; then
29891        VALID_TOOL=yes
29892        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29893        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29894        FTPUSERPWD=${FTPSERVER%%@*}
29895        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29896            FTPUSER=${userpwd%%:*}
29897            FTPPWD=${userpwd#*@}
29898            FTPSERVER=${FTPSERVER#*@}
29899        else
29900            FTPUSER=ftp
29901            FTPPWD=ftp
29902        fi
29903        # the "pass" command does not work on some
29904        # ftp clients (read ftp.exe) but if it works,
29905        # passive mode is better!
29906        (\
29907            echo "user $FTPUSER $FTPPWD"        ;\
29908            echo "pass"                         ;\
29909            echo "bin"                          ;\
29910            echo "get $FTPPATH $tmpfile"              ;\
29911        ) | ftp -in $FTPSERVER
29912    fi
29913    if test "x$VALID_TOOL" != xyes; then
29914       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29915    fi
29916
29917        mv $tmpfile $installdir/$filename
29918        if test ! -s $installdir/$filename; then
29919            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29920        fi
29921        case "$extension" in
29922            zip)  echo "Unzipping $installdir/$filename..."
29923               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29924            ;;
29925            tar.gz) echo "Untaring $installdir/$filename..."
29926               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29927            ;;
29928            tgz) echo "Untaring $installdir/$filename..."
29929               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29930            ;;
29931            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29932            ;;
29933        esac
29934    fi
29935    if test -f $installdir/$filename.unpacked; then
29936        depdir=$installdir
29937    fi
29938
29939	    fi
29940            # Source the builddeps file again, because in the previous command, the depdir
29941            # was updated to point at the current build dependency install directory.
29942            . $builddepsfile
29943            # Now extract variables from the builddeps.conf files.
29944            theroot=${builddep_freetype2_ROOT}
29945            thecflags=${builddep_freetype2_CFLAGS}
29946            thelibs=${builddep_freetype2_LIBS}
29947            if test "x$depdir" = x; then
29948                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29949            fi
29950            FREETYPE2=$depdir
29951            if test "x$theroot" != x; then
29952               FREETYPE2="$theroot"
29953            fi
29954            if test "x$thecflags" != x; then
29955               FREETYPE2_CFLAGS="$thecflags"
29956            fi
29957            if test "x$thelibs" != x; then
29958               FREETYPE2_LIBS="$thelibs"
29959            fi
29960            FREETYPE2_FOUND=yes
29961            else FREETYPE2_FOUND=no
29962
29963        fi
29964        else FREETYPE2_FOUND=no
29965
29966    fi
29967
29968            USING_SYSTEM_FT_LIB=true
29969	fi
29970	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29971            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29972
29973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29974
29975  # Input might be given as Windows format, start by converting to
29976  # unix format.
29977  path="$FREETYPELOCATION"
29978  new_path=`$CYGPATH -u "$path"`
29979
29980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29983  # "foo.exe" is OK but "foo" is an error.
29984  #
29985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29986  # It is also a way to make sure we got the proper file name for the real test later on.
29987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29988  if test "x$test_shortpath" = x; then
29989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29990$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29991    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29992  fi
29993
29994  # Call helper function which possibly converts this using DOS-style short mode.
29995  # If so, the updated path is stored in $new_path.
29996
29997  input_path="$new_path"
29998  # Check if we need to convert this using DOS-style short mode. If the path
29999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30000  # take no chances and rewrite it.
30001  # Note: m4 eats our [], so we need to use [ and ] instead.
30002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30003  if test "x$has_forbidden_chars" != x; then
30004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30008      # Going to short mode and back again did indeed matter. Since short mode is
30009      # case insensitive, let's make it lowercase to improve readability.
30010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30011      # Now convert it back to Unix-stile (cygpath)
30012      input_path=`$CYGPATH -u "$shortmode_path"`
30013      new_path="$input_path"
30014    fi
30015  fi
30016
30017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30018  if test "x$test_cygdrive_prefix" = x; then
30019    # As a simple fix, exclude /usr/bin since it's not a real path.
30020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30022      # a path prefixed by /cygdrive for fixpath to work.
30023      new_path="$CYGWIN_ROOT_PATH$input_path"
30024    fi
30025  fi
30026
30027
30028  if test "x$path" != "x$new_path"; then
30029    FREETYPELOCATION="$new_path"
30030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30031$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30032  fi
30033
30034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30035
30036  path="$FREETYPELOCATION"
30037  has_colon=`$ECHO $path | $GREP ^.:`
30038  new_path="$path"
30039  if test "x$has_colon" = x; then
30040    # Not in mixed or Windows style, start by that.
30041    new_path=`cmd //c echo $path`
30042  fi
30043
30044
30045  input_path="$new_path"
30046  # Check if we need to convert this using DOS-style short mode. If the path
30047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30048  # take no chances and rewrite it.
30049  # Note: m4 eats our [], so we need to use [ and ] instead.
30050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30051  if test "x$has_forbidden_chars" != x; then
30052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30054  fi
30055
30056
30057  windows_path="$new_path"
30058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30059    unix_path=`$CYGPATH -u "$windows_path"`
30060    new_path="$unix_path"
30061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30063    new_path="$unix_path"
30064  fi
30065
30066  if test "x$path" != "x$new_path"; then
30067    FREETYPELOCATION="$new_path"
30068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30069$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30070  fi
30071
30072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30074
30075  else
30076    # We're on a posix platform. Hooray! :)
30077    path="$FREETYPELOCATION"
30078
30079    if test ! -f "$path" && test ! -d "$path"; then
30080      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30081    fi
30082
30083    has_space=`$ECHO "$path" | $GREP " "`
30084    if test "x$has_space" != x; then
30085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30086$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30087      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30088    fi
30089  fi
30090
30091	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30092$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30093	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30094	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30095	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30096 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30097                if ! test -s "$FREETYPE2_LIBS"; then
30098		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30099		fi
30100                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30101		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30102		fi
30103                USING_SYSTEM_FT_LIB=true
30104                FREETYPE2_FOUND=yes
30105	    fi
30106	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30107$as_echo "$FREETYPE2_FOUND" >&6; }
30108        fi
30109	if test "x$FREETYPE2_FOUND" = xno; then
30110
30111pkg_failed=no
30112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30113$as_echo_n "checking for FREETYPE2... " >&6; }
30114
30115if test -n "$FREETYPE2_CFLAGS"; then
30116    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30117 elif test -n "$PKG_CONFIG"; then
30118    if test -n "$PKG_CONFIG" && \
30119    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30120  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30121  ac_status=$?
30122  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30123  test $ac_status = 0; }; then
30124  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30125else
30126  pkg_failed=yes
30127fi
30128 else
30129    pkg_failed=untried
30130fi
30131if test -n "$FREETYPE2_LIBS"; then
30132    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30133 elif test -n "$PKG_CONFIG"; then
30134    if test -n "$PKG_CONFIG" && \
30135    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30136  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30137  ac_status=$?
30138  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30139  test $ac_status = 0; }; then
30140  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30141else
30142  pkg_failed=yes
30143fi
30144 else
30145    pkg_failed=untried
30146fi
30147
30148
30149
30150if test $pkg_failed = yes; then
30151
30152if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30153        _pkg_short_errors_supported=yes
30154else
30155        _pkg_short_errors_supported=no
30156fi
30157        if test $_pkg_short_errors_supported = yes; then
30158	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30159        else
30160	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30161        fi
30162	# Put the nasty error message in config.log where it belongs
30163	echo "$FREETYPE2_PKG_ERRORS" >&5
30164
30165	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30166$as_echo "no" >&6; }
30167                FREETYPE2_FOUND=no
30168elif test $pkg_failed = untried; then
30169	FREETYPE2_FOUND=no
30170else
30171	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30172	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30174$as_echo "yes" >&6; }
30175	FREETYPE2_FOUND=yes
30176fi
30177            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30178            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30179            USING_SYSTEM_FT_LIB=true
30180            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30181            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30182              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30183            fi
30184	fi
30185	if test "x$FREETYPE2_FOUND" = xno; then
30186	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30187$as_echo_n "checking for freetype in some standard locations... " >&6; }
30188
30189	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30190	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30191	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30192	    fi
30193	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30194	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30195	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30196	    fi
30197
30198	    PREV_CXXCFLAGS="$CXXFLAGS"
30199	    PREV_LDFLAGS="$LDFLAGS"
30200	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30201	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30202	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30203/* end confdefs.h.  */
30204#include<ft2build.h>
30205	                    #include FT_FREETYPE_H
30206	                   int main() { return 0; }
30207
30208_ACEOF
30209if ac_fn_cxx_try_link "$LINENO"; then :
30210
30211	                      # Yes, the default cflags and libs did the trick.
30212	                      FREETYPE2_FOUND=yes
30213	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30214	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30215
30216else
30217
30218	                      FREETYPE2_FOUND=no
30219
30220fi
30221rm -f core conftest.err conftest.$ac_objext \
30222    conftest$ac_exeext conftest.$ac_ext
30223            CXXCFLAGS="$PREV_CXXFLAGS"
30224	    LDFLAGS="$PREV_LDFLAGS"
30225	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30226$as_echo "$FREETYPE2_FOUND" >&6; }
30227            USING_SYSTEM_FT_LIB=true
30228	fi
30229	if test "x$FREETYPE2_FOUND" = xno; then
30230
30231    # Print a helpful message on how to acquire the necessary build dependency.
30232    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30233    MISSING_DEPENDENCY=freetype2
30234    PKGHANDLER_COMMAND=
30235
30236    case $PKGHANDLER in
30237	apt-get)
30238                apt_help     $MISSING_DEPENDENCY ;;
30239    yum)
30240                yum_help     $MISSING_DEPENDENCY ;;
30241	port)
30242                port_help    $MISSING_DEPENDENCY ;;
30243	pkgutil)
30244                pkgutil_help $MISSING_DEPENDENCY ;;
30245	pkgadd)
30246                pkgadd_help  $MISSING_DEPENDENCY ;;
30247    * )
30248      break ;;
30249    esac
30250
30251    if test "x$PKGHANDLER_COMMAND" != x; then
30252        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30253    fi
30254
30255		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30256	fi
30257
30258        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30259            # AC_CHECK_LIB does not support use of cl.exe
30260            PREV_LDFLAGS="$LDFLAGS"
30261            LDFLAGS="$FREETYPE2_LIBS"
30262            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30263$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30264if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30265  $as_echo_n "(cached) " >&6
30266else
30267  ac_check_lib_save_LIBS=$LIBS
30268LIBS="-lfreetype  $LIBS"
30269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30270/* end confdefs.h.  */
30271
30272/* Override any GCC internal prototype to avoid an error.
30273   Use char because int might match the return type of a GCC
30274   builtin and then its argument prototype would still apply.  */
30275#ifdef __cplusplus
30276extern "C"
30277#endif
30278char FT_Init_FreeType ();
30279int
30280main ()
30281{
30282return FT_Init_FreeType ();
30283  ;
30284  return 0;
30285}
30286_ACEOF
30287if ac_fn_cxx_try_link "$LINENO"; then :
30288  ac_cv_lib_freetype_FT_Init_FreeType=yes
30289else
30290  ac_cv_lib_freetype_FT_Init_FreeType=no
30291fi
30292rm -f core conftest.err conftest.$ac_objext \
30293    conftest$ac_exeext conftest.$ac_ext
30294LIBS=$ac_check_lib_save_LIBS
30295fi
30296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30297$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30298if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30299  FREETYPE2_FOUND=true
30300else
30301  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30302fi
30303
30304            LDFLAGS="$PREV_LDFLAGS"
30305        fi
30306fi
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316###############################################################################
30317#
30318# Check for alsa headers and libraries. Used on Linux/GNU systems.
30319#
30320
30321# Check whether --with-alsa was given.
30322if test "${with_alsa+set}" = set; then :
30323  withval=$with_alsa;
30324fi
30325
30326
30327# Check whether --with-alsa-include was given.
30328if test "${with_alsa_include+set}" = set; then :
30329  withval=$with_alsa_include;
30330fi
30331
30332
30333# Check whether --with-alsa-lib was given.
30334if test "${with_alsa_lib+set}" = set; then :
30335  withval=$with_alsa_lib;
30336fi
30337
30338
30339if test "x$ALSA_NOT_NEEDED" = xyes; then
30340	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30341		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30342$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30343	fi
30344	ALSA_CFLAGS=
30345	ALSA_LIBS=
30346else
30347	ALSA_FOUND=no
30348
30349	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30350	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30351	fi
30352
30353	if test "x${with_alsa}" != x; then
30354	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30355	    ALSA_CFLAGS="-I${with_alsa}/include"
30356	    ALSA_FOUND=yes
30357	fi
30358	if test "x${with_alsa_include}" != x; then
30359	    ALSA_CFLAGS="-I${with_alsa_include}"
30360	    ALSA_FOUND=yes
30361	fi
30362	if test "x${with_alsa_lib}" != x; then
30363	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30364	    ALSA_FOUND=yes
30365	fi
30366	if test "x$ALSA_FOUND" = xno; then
30367
30368
30369    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30370        # Source the builddeps file again, to make sure it uses the latest variables!
30371        . $builddepsfile
30372        # Look for a target and build machine specific resource!
30373        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30374        if test "x$resource" = x; then
30375            # Ok, lets instead look for a target specific resource
30376            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30377        fi
30378        if test "x$resource" = x; then
30379            # Ok, lets instead look for a build specific resource
30380            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30381        fi
30382        if test "x$resource" = x; then
30383            # Ok, lets instead look for a generic resource
30384            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30385            resource=${builddep_alsa}
30386        fi
30387        if test "x$resource" != x; then
30388            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30389$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30390	    # If the resource in the builddeps.conf file is an existing directory,
30391	    # for example /java/linux/cups
30392	    if test -d ${resource}; then
30393	       depdir=${resource}
30394	    else
30395
30396# alsa is for example mymodule
30397# $resource is for example libs/general/libmymod_1_2_3.zip
30398# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30399# $with_builddeps_dir is for example /localhome/builddeps
30400# depdir is the name of the variable into which we store the depdir, eg MYMOD
30401# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30402# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30403    filename=`basename $resource`
30404    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30405    filebase=${filename%%.*}
30406    extension=${filename#*.}
30407    installdir=$with_builddeps_dir/$filebase
30408    if test ! -f $installdir/$filename.unpacked; then
30409        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30410$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30411        if test ! -d $installdir; then
30412            mkdir -p $installdir
30413        fi
30414        if test ! -d $installdir; then
30415            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30416        fi
30417        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30418        touch $tmpfile
30419        if test ! -f $tmpfile; then
30420            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30421        fi
30422
30423    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30424    # $tmpfile is the local file name for the downloaded file.
30425    VALID_TOOL=no
30426    if test "x$BDEPS_FTP" = xwget; then
30427       VALID_TOOL=yes
30428       wget -O $tmpfile $with_builddeps_server/$resource
30429    fi
30430    if test "x$BDEPS_FTP" = xlftp; then
30431       VALID_TOOL=yes
30432       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30433    fi
30434    if test "x$BDEPS_FTP" = xftp; then
30435        VALID_TOOL=yes
30436        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30437        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30438        FTPUSERPWD=${FTPSERVER%%@*}
30439        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30440            FTPUSER=${userpwd%%:*}
30441            FTPPWD=${userpwd#*@}
30442            FTPSERVER=${FTPSERVER#*@}
30443        else
30444            FTPUSER=ftp
30445            FTPPWD=ftp
30446        fi
30447        # the "pass" command does not work on some
30448        # ftp clients (read ftp.exe) but if it works,
30449        # passive mode is better!
30450        (\
30451            echo "user $FTPUSER $FTPPWD"        ;\
30452            echo "pass"                         ;\
30453            echo "bin"                          ;\
30454            echo "get $FTPPATH $tmpfile"              ;\
30455        ) | ftp -in $FTPSERVER
30456    fi
30457    if test "x$VALID_TOOL" != xyes; then
30458       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30459    fi
30460
30461        mv $tmpfile $installdir/$filename
30462        if test ! -s $installdir/$filename; then
30463            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30464        fi
30465        case "$extension" in
30466            zip)  echo "Unzipping $installdir/$filename..."
30467               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30468            ;;
30469            tar.gz) echo "Untaring $installdir/$filename..."
30470               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30471            ;;
30472            tgz) echo "Untaring $installdir/$filename..."
30473               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30474            ;;
30475            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30476            ;;
30477        esac
30478    fi
30479    if test -f $installdir/$filename.unpacked; then
30480        depdir=$installdir
30481    fi
30482
30483	    fi
30484            # Source the builddeps file again, because in the previous command, the depdir
30485            # was updated to point at the current build dependency install directory.
30486            . $builddepsfile
30487            # Now extract variables from the builddeps.conf files.
30488            theroot=${builddep_alsa_ROOT}
30489            thecflags=${builddep_alsa_CFLAGS}
30490            thelibs=${builddep_alsa_LIBS}
30491            if test "x$depdir" = x; then
30492                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30493            fi
30494            ALSA=$depdir
30495            if test "x$theroot" != x; then
30496               ALSA="$theroot"
30497            fi
30498            if test "x$thecflags" != x; then
30499               ALSA_CFLAGS="$thecflags"
30500            fi
30501            if test "x$thelibs" != x; then
30502               ALSA_LIBS="$thelibs"
30503            fi
30504            ALSA_FOUND=yes
30505            else ALSA_FOUND=no
30506
30507        fi
30508        else ALSA_FOUND=no
30509
30510    fi
30511
30512	fi
30513	if test "x$ALSA_FOUND" = xno; then
30514
30515pkg_failed=no
30516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30517$as_echo_n "checking for ALSA... " >&6; }
30518
30519if test -n "$ALSA_CFLAGS"; then
30520    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30521 elif test -n "$PKG_CONFIG"; then
30522    if test -n "$PKG_CONFIG" && \
30523    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30524  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30525  ac_status=$?
30526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30527  test $ac_status = 0; }; then
30528  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30529else
30530  pkg_failed=yes
30531fi
30532 else
30533    pkg_failed=untried
30534fi
30535if test -n "$ALSA_LIBS"; then
30536    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30537 elif test -n "$PKG_CONFIG"; then
30538    if test -n "$PKG_CONFIG" && \
30539    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30540  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30541  ac_status=$?
30542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30543  test $ac_status = 0; }; then
30544  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30545else
30546  pkg_failed=yes
30547fi
30548 else
30549    pkg_failed=untried
30550fi
30551
30552
30553
30554if test $pkg_failed = yes; then
30555
30556if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30557        _pkg_short_errors_supported=yes
30558else
30559        _pkg_short_errors_supported=no
30560fi
30561        if test $_pkg_short_errors_supported = yes; then
30562	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30563        else
30564	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30565        fi
30566	# Put the nasty error message in config.log where it belongs
30567	echo "$ALSA_PKG_ERRORS" >&5
30568
30569	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30570$as_echo "no" >&6; }
30571                ALSA_FOUND=no
30572elif test $pkg_failed = untried; then
30573	ALSA_FOUND=no
30574else
30575	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30576	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30578$as_echo "yes" >&6; }
30579	ALSA_FOUND=yes
30580fi
30581	fi
30582	if test "x$ALSA_FOUND" = xno; then
30583	    for ac_header in alsa/asoundlib.h
30584do :
30585  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30586if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30587  cat >>confdefs.h <<_ACEOF
30588#define HAVE_ALSA_ASOUNDLIB_H 1
30589_ACEOF
30590 ALSA_FOUND=yes
30591	                      ALSA_CFLAGS=-Iignoreme
30592	                      ALSA_LIBS=-lasound
30593	                      DEFAULT_ALSA=yes
30594else
30595  ALSA_FOUND=no
30596fi
30597
30598done
30599
30600	fi
30601	if test "x$ALSA_FOUND" = xno; then
30602
30603    # Print a helpful message on how to acquire the necessary build dependency.
30604    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30605    MISSING_DEPENDENCY=alsa
30606    PKGHANDLER_COMMAND=
30607
30608    case $PKGHANDLER in
30609	apt-get)
30610                apt_help     $MISSING_DEPENDENCY ;;
30611    yum)
30612                yum_help     $MISSING_DEPENDENCY ;;
30613	port)
30614                port_help    $MISSING_DEPENDENCY ;;
30615	pkgutil)
30616                pkgutil_help $MISSING_DEPENDENCY ;;
30617	pkgadd)
30618                pkgadd_help  $MISSING_DEPENDENCY ;;
30619    * )
30620      break ;;
30621    esac
30622
30623    if test "x$PKGHANDLER_COMMAND" != x; then
30624        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30625    fi
30626
30627	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30628	fi
30629fi
30630
30631
30632
30633
30634
30635
30636
30637###############################################################################
30638#
30639# Check for the jpeg library
30640#
30641
30642USE_EXTERNAL_LIBJPEG=true
30643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30644$as_echo_n "checking for main in -ljpeg... " >&6; }
30645if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30646  $as_echo_n "(cached) " >&6
30647else
30648  ac_check_lib_save_LIBS=$LIBS
30649LIBS="-ljpeg  $LIBS"
30650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30651/* end confdefs.h.  */
30652
30653
30654int
30655main ()
30656{
30657return main ();
30658  ;
30659  return 0;
30660}
30661_ACEOF
30662if ac_fn_cxx_try_link "$LINENO"; then :
30663  ac_cv_lib_jpeg_main=yes
30664else
30665  ac_cv_lib_jpeg_main=no
30666fi
30667rm -f core conftest.err conftest.$ac_objext \
30668    conftest$ac_exeext conftest.$ac_ext
30669LIBS=$ac_check_lib_save_LIBS
30670fi
30671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30672$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30673if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30674  cat >>confdefs.h <<_ACEOF
30675#define HAVE_LIBJPEG 1
30676_ACEOF
30677
30678  LIBS="-ljpeg $LIBS"
30679
30680else
30681   USE_EXTERNAL_LIBJPEG=false
30682               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30683$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30684
30685fi
30686
30687
30688
30689###############################################################################
30690#
30691# Check for the gif library
30692#
30693
30694USE_EXTERNAL_LIBJPEG=true
30695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30696$as_echo_n "checking for main in -lgif... " >&6; }
30697if test "${ac_cv_lib_gif_main+set}" = set; then :
30698  $as_echo_n "(cached) " >&6
30699else
30700  ac_check_lib_save_LIBS=$LIBS
30701LIBS="-lgif  $LIBS"
30702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30703/* end confdefs.h.  */
30704
30705
30706int
30707main ()
30708{
30709return main ();
30710  ;
30711  return 0;
30712}
30713_ACEOF
30714if ac_fn_cxx_try_link "$LINENO"; then :
30715  ac_cv_lib_gif_main=yes
30716else
30717  ac_cv_lib_gif_main=no
30718fi
30719rm -f core conftest.err conftest.$ac_objext \
30720    conftest$ac_exeext conftest.$ac_ext
30721LIBS=$ac_check_lib_save_LIBS
30722fi
30723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30724$as_echo "$ac_cv_lib_gif_main" >&6; }
30725if test "x$ac_cv_lib_gif_main" = x""yes; then :
30726  cat >>confdefs.h <<_ACEOF
30727#define HAVE_LIBGIF 1
30728_ACEOF
30729
30730  LIBS="-lgif $LIBS"
30731
30732else
30733   USE_EXTERNAL_LIBGIF=false
30734               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30735$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30736
30737fi
30738
30739
30740
30741###############################################################################
30742#
30743# Check for the zlib library
30744#
30745
30746
30747# Check whether --with-zlib was given.
30748if test "${with_zlib+set}" = set; then :
30749  withval=$with_zlib;
30750fi
30751
30752
30753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30754$as_echo_n "checking for compress in -lz... " >&6; }
30755if test "${ac_cv_lib_z_compress+set}" = set; then :
30756  $as_echo_n "(cached) " >&6
30757else
30758  ac_check_lib_save_LIBS=$LIBS
30759LIBS="-lz  $LIBS"
30760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30761/* end confdefs.h.  */
30762
30763/* Override any GCC internal prototype to avoid an error.
30764   Use char because int might match the return type of a GCC
30765   builtin and then its argument prototype would still apply.  */
30766#ifdef __cplusplus
30767extern "C"
30768#endif
30769char compress ();
30770int
30771main ()
30772{
30773return compress ();
30774  ;
30775  return 0;
30776}
30777_ACEOF
30778if ac_fn_cxx_try_link "$LINENO"; then :
30779  ac_cv_lib_z_compress=yes
30780else
30781  ac_cv_lib_z_compress=no
30782fi
30783rm -f core conftest.err conftest.$ac_objext \
30784    conftest$ac_exeext conftest.$ac_ext
30785LIBS=$ac_check_lib_save_LIBS
30786fi
30787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30788$as_echo "$ac_cv_lib_z_compress" >&6; }
30789if test "x$ac_cv_lib_z_compress" = x""yes; then :
30790   ZLIB_FOUND=yes
30791else
30792   ZLIB_FOUND=no
30793fi
30794
30795
30796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30797$as_echo_n "checking for which zlib to use... " >&6; }
30798
30799DEFAULT_ZLIB=bundled
30800if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30801#
30802# On macosx default is system...on others default is
30803#
30804    DEFAULT_ZLIB=system
30805fi
30806
30807if test "x${ZLIB_FOUND}" != "xyes"; then
30808#
30809# If we don't find any system...set default to bundled
30810#
30811    DEFAULT_ZLIB=bundled
30812fi
30813
30814#
30815# If user didn't specify, use DEFAULT_ZLIB
30816#
30817if test "x${with_zlib}" = "x"; then
30818    with_zlib=${DEFAULT_ZLIB}
30819fi
30820
30821if test "x${with_zlib}" = "xbundled"; then
30822    USE_EXTERNAL_LIBZ=false
30823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30824$as_echo "bundled" >&6; }
30825elif test "x${with_zlib}" = "xsystem"; then
30826    if test "x${ZLIB_FOUND}" = "xyes"; then
30827        USE_EXTERNAL_LIBZ=true
30828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30829$as_echo "system" >&6; }
30830    else
30831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30832$as_echo "system not found" >&6; }
30833        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30834    fi
30835else
30836    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30837fi
30838
30839
30840
30841###############################################################################
30842LIBZIP_CAN_USE_MMAP=true
30843
30844
30845
30846###############################################################################
30847#
30848# Check if altzone exists in time.h
30849#
30850
30851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30852/* end confdefs.h.  */
30853#include <time.h>
30854int
30855main ()
30856{
30857return (int)altzone;
30858  ;
30859  return 0;
30860}
30861_ACEOF
30862if ac_fn_cxx_try_link "$LINENO"; then :
30863  has_altzone=yes
30864else
30865  has_altzone=no
30866fi
30867rm -f core conftest.err conftest.$ac_objext \
30868    conftest$ac_exeext conftest.$ac_ext
30869if test "x$has_altzone" = xyes; then
30870
30871$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30872
30873fi
30874
30875###############################################################################
30876#
30877# Check the maths library
30878#
30879
30880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30881$as_echo_n "checking for cos in -lm... " >&6; }
30882if test "${ac_cv_lib_m_cos+set}" = set; then :
30883  $as_echo_n "(cached) " >&6
30884else
30885  ac_check_lib_save_LIBS=$LIBS
30886LIBS="-lm  $LIBS"
30887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30888/* end confdefs.h.  */
30889
30890/* Override any GCC internal prototype to avoid an error.
30891   Use char because int might match the return type of a GCC
30892   builtin and then its argument prototype would still apply.  */
30893#ifdef __cplusplus
30894extern "C"
30895#endif
30896char cos ();
30897int
30898main ()
30899{
30900return cos ();
30901  ;
30902  return 0;
30903}
30904_ACEOF
30905if ac_fn_cxx_try_link "$LINENO"; then :
30906  ac_cv_lib_m_cos=yes
30907else
30908  ac_cv_lib_m_cos=no
30909fi
30910rm -f core conftest.err conftest.$ac_objext \
30911    conftest$ac_exeext conftest.$ac_ext
30912LIBS=$ac_check_lib_save_LIBS
30913fi
30914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30915$as_echo "$ac_cv_lib_m_cos" >&6; }
30916if test "x$ac_cv_lib_m_cos" = x""yes; then :
30917  cat >>confdefs.h <<_ACEOF
30918#define HAVE_LIBM 1
30919_ACEOF
30920
30921  LIBS="-lm $LIBS"
30922
30923else
30924
30925                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30926$as_echo "$as_me: Maths library was not found" >&6;}
30927
30928fi
30929
30930
30931
30932###############################################################################
30933#
30934# Check for libdl.so
30935
30936save_LIBS="$LIBS"
30937LIBS=""
30938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30939$as_echo_n "checking for dlopen in -ldl... " >&6; }
30940if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30941  $as_echo_n "(cached) " >&6
30942else
30943  ac_check_lib_save_LIBS=$LIBS
30944LIBS="-ldl  $LIBS"
30945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30946/* end confdefs.h.  */
30947
30948/* Override any GCC internal prototype to avoid an error.
30949   Use char because int might match the return type of a GCC
30950   builtin and then its argument prototype would still apply.  */
30951#ifdef __cplusplus
30952extern "C"
30953#endif
30954char dlopen ();
30955int
30956main ()
30957{
30958return dlopen ();
30959  ;
30960  return 0;
30961}
30962_ACEOF
30963if ac_fn_cxx_try_link "$LINENO"; then :
30964  ac_cv_lib_dl_dlopen=yes
30965else
30966  ac_cv_lib_dl_dlopen=no
30967fi
30968rm -f core conftest.err conftest.$ac_objext \
30969    conftest$ac_exeext conftest.$ac_ext
30970LIBS=$ac_check_lib_save_LIBS
30971fi
30972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30973$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30974if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30975  cat >>confdefs.h <<_ACEOF
30976#define HAVE_LIBDL 1
30977_ACEOF
30978
30979  LIBS="-ldl $LIBS"
30980
30981fi
30982
30983LIBDL="$LIBS"
30984
30985LIBS="$save_LIBS"
30986
30987
30988
30989###############################################################################
30990#
30991# statically link libstdc++ before C++ ABI is stablized on Linux unless
30992# dynamic build is configured on command line.
30993#
30994
30995# Check whether --with-stdc++lib was given.
30996if test "${with_stdc__lib+set}" = set; then :
30997  withval=$with_stdc__lib;
30998    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30999        && test "x$with_stdc__lib" != xdefault; then
31000      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31001    fi
31002
31003else
31004  with_stdc__lib=default
31005
31006fi
31007
31008
31009if test "x$OPENJDK_TARGET_OS" = xlinux; then
31010    # Test if -lstdc++ works.
31011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31012$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31013    ac_ext=cpp
31014ac_cpp='$CXXCPP $CPPFLAGS'
31015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31018
31019    OLD_CXXFLAGS="$CXXFLAGS"
31020    CXXFLAGS="$CXXFLAGS -lstdc++"
31021    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022/* end confdefs.h.  */
31023
31024int
31025main ()
31026{
31027return 0;
31028  ;
31029  return 0;
31030}
31031_ACEOF
31032if ac_fn_cxx_try_link "$LINENO"; then :
31033  has_dynamic_libstdcxx=yes
31034else
31035  has_dynamic_libstdcxx=no
31036fi
31037rm -f core conftest.err conftest.$ac_objext \
31038    conftest$ac_exeext conftest.$ac_ext
31039    CXXFLAGS="$OLD_CXXFLAGS"
31040    ac_ext=cpp
31041ac_cpp='$CXXCPP $CPPFLAGS'
31042ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31043ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31044ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31045
31046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31047$as_echo "$has_dynamic_libstdcxx" >&6; }
31048
31049    # Test if stdc++ can be linked statically.
31050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31051$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31052    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31053    ac_ext=cpp
31054ac_cpp='$CXXCPP $CPPFLAGS'
31055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31058
31059    OLD_LIBS="$LIBS"
31060    OLD_CXX="$CXX"
31061    LIBS="$STATIC_STDCXX_FLAGS"
31062    CXX="$CC"
31063    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31064/* end confdefs.h.  */
31065
31066int
31067main ()
31068{
31069return 0;
31070  ;
31071  return 0;
31072}
31073_ACEOF
31074if ac_fn_cxx_try_link "$LINENO"; then :
31075  has_static_libstdcxx=yes
31076else
31077  has_static_libstdcxx=no
31078fi
31079rm -f core conftest.err conftest.$ac_objext \
31080    conftest$ac_exeext conftest.$ac_ext
31081    LIBS="$OLD_LIBS"
31082    CXX="$OLD_CXX"
31083    ac_ext=cpp
31084ac_cpp='$CXXCPP $CPPFLAGS'
31085ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31086ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31087ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31088
31089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31090$as_echo "$has_static_libstdcxx" >&6; }
31091
31092    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31093        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31094    fi
31095
31096    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31097        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31098    fi
31099
31100    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31101        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31102    fi
31103
31104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31105$as_echo_n "checking how to link with libstdc++... " >&6; }
31106    # If dynamic was requested, it's available since it would fail above otherwise.
31107    # If dynamic wasn't requested, go with static unless it isn't available.
31108    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31109        LIBCXX="$LIBCXX -lstdc++"
31110        LDCXX="$CXX"
31111        STATIC_CXX_SETTING="STATIC_CXX=false"
31112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31113$as_echo "dynamic" >&6; }
31114    else
31115        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31116        LDCXX="$CC"
31117        STATIC_CXX_SETTING="STATIC_CXX=true"
31118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31119$as_echo "static" >&6; }
31120    fi
31121fi
31122
31123
31124# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31125if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31126    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31127fi
31128
31129# TODO better (platform agnostic) test
31130if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31131    LIBCXX="-lstdc++"
31132fi
31133
31134
31135
31136
31137
31138# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31139
31140# When using cygwin or msys, we need a wrapper binary that renames
31141# /cygdrive/c/ arguments into c:/ arguments and peeks into
31142# @files and rewrites these too! This wrapper binary is
31143# called fixpath.
31144FIXPATH=
31145if test "x$OPENJDK_BUILD_OS" = xwindows; then
31146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31147$as_echo_n "checking if fixpath can be created... " >&6; }
31148    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31149    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31150    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31151      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31152      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31153      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31154      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31155    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31156      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31157      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31158
31159      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31160      # @ was chosen as separator to minimize risk of other tools messing around with it
31161      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31162      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31163
31164      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31165    fi
31166    rm -f $OUTPUT_ROOT/fixpath*
31167    cd $OUTPUT_ROOT
31168    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31169    cd $CURDIR
31170
31171    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31173$as_echo "no" >&6; }
31174        cat $OUTPUT_ROOT/fixpath1.log
31175        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31176    fi
31177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31178$as_echo "yes" >&6; }
31179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31180$as_echo_n "checking if fixpath.exe works... " >&6; }
31181    cd $OUTPUT_ROOT
31182    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31183    cd $CURDIR
31184    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31186$as_echo "no" >&6; }
31187        cat $OUTPUT_ROOT/fixpath2.log
31188        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31189    fi
31190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31191$as_echo "yes" >&6; }
31192    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31193fi
31194
31195
31196
31197
31198###############################################################################
31199#
31200# We need to do some final tweaking, when everything else is done.
31201#
31202###############################################################################
31203
31204
31205HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31206
31207
31208# The name of the Service Agent jar.
31209SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31210if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31211  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31212fi
31213
31214
31215
31216
31217###############################################################################
31218#
31219# Configure parts of the build that only affect the build performance,
31220# not the result.
31221#
31222###############################################################################
31223
31224
31225# How many cores do we have on this build system?
31226
31227# Check whether --with-num-cores was given.
31228if test "${with_num_cores+set}" = set; then :
31229  withval=$with_num_cores;
31230fi
31231
31232if test "x$with_num_cores" = x; then
31233    # The number of cores were not specified, try to probe them.
31234
31235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31236$as_echo_n "checking for number of cores... " >&6; }
31237    NUM_CORES=1
31238    FOUND_CORES=no
31239
31240    if test -f /proc/cpuinfo; then
31241        # Looks like a Linux (or cygwin) system
31242        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31243        FOUND_CORES=yes
31244    elif test -x /usr/sbin/psrinfo; then
31245        # Looks like a Solaris system
31246        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31247        FOUND_CORES=yes
31248    elif test -x /usr/sbin/system_profiler; then
31249        # Looks like a MacOSX system
31250        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31251        FOUND_CORES=yes
31252    elif test -n "$NUMBER_OF_PROCESSORS"; then
31253        # On windows, look in the env
31254        NUM_CORES=$NUMBER_OF_PROCESSORS
31255        FOUND_CORES=yes
31256    fi
31257
31258    # For c/c++ code we run twice as many concurrent build
31259    # jobs than we have cores, otherwise we will stall on io.
31260    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31261
31262    if test "x$FOUND_CORES" = xyes; then
31263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31264$as_echo "$NUM_CORES" >&6; }
31265    else
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31267$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31269$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31270    fi
31271
31272
31273else
31274    NUM_CORES=$with_num_cores
31275    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31276fi
31277
31278
31279
31280
31281# How much memory do we have on this build system?
31282
31283# Check whether --with-memory-size was given.
31284if test "${with_memory_size+set}" = set; then :
31285  withval=$with_memory_size;
31286fi
31287
31288if test "x$with_memory_size" = x; then
31289    # The memory size was not specified, try to probe it.
31290
31291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31292$as_echo_n "checking for memory size... " >&6; }
31293    # Default to 1024 MB
31294    MEMORY_SIZE=1024
31295    FOUND_MEM=no
31296
31297    if test -f /proc/meminfo; then
31298        # Looks like a Linux (or cygwin) system
31299        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31300        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31301        FOUND_MEM=yes
31302    elif test -x /usr/sbin/prtconf; then
31303        # Looks like a Solaris system
31304        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31305        FOUND_MEM=yes
31306    elif test -x /usr/sbin/system_profiler; then
31307        # Looks like a MacOSX system
31308        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31309        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31310        FOUND_MEM=yes
31311    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31312        # Windows, but without cygwin
31313        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31314        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31315        FOUND_MEM=yes
31316    fi
31317
31318    if test "x$FOUND_MEM" = xyes; then
31319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31320$as_echo "$MEMORY_SIZE MB" >&6; }
31321    else
31322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31323$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31325$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31326    fi
31327
31328else
31329    MEMORY_SIZE=$with_memory_size
31330fi
31331
31332
31333
31334# Setup smart javac (after cores and memory have been setup)
31335
31336
31337# Check whether --with-sjavac-server-java was given.
31338if test "${with_sjavac_server_java+set}" = set; then :
31339  withval=$with_sjavac_server_java;
31340fi
31341
31342
31343if test "x$with_sjavac_server_java" != x; then
31344    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31345    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31346    if test "x$FOUND_VERSION" = x; then
31347        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31348    fi
31349else
31350    SJAVAC_SERVER_JAVA=""
31351    # Hotspot specific options.
31352
31353    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31354    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31355    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31356    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31357    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31358        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31359    fi
31360
31361    # JRockit specific options.
31362
31363    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31364    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31365    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31366    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31367    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31368        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31369    fi
31370
31371    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31372fi
31373
31374
31375
31376# Check whether --with-sjavac-server-cores was given.
31377if test "${with_sjavac_server_cores+set}" = set; then :
31378  withval=$with_sjavac_server_cores;
31379fi
31380
31381if test "x$with_sjavac_server_cores" != x; then
31382    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31383else
31384    if test "$NUM_CORES" -gt 16; then
31385        # We set this arbitrary limit because we want to limit the heap
31386        # size of the javac server.
31387        # In the future we will make the javac compilers in the server
31388        # share more and more state, thus enabling us to use more and
31389        # more concurrent threads in the server.
31390        SJAVAC_SERVER_CORES="16"
31391    else
31392        SJAVAC_SERVER_CORES="$NUM_CORES"
31393    fi
31394
31395    if test "$MEMORY_SIZE" -gt "17000"; then
31396        MAX_HEAP_MEM=10000
31397
31398    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31399    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31400    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31401    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31402    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31403        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31404    fi
31405
31406
31407    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31408    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31409    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31410    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31411    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31412        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31413    fi
31414
31415    elif test "$MEMORY_SIZE" -gt "10000"; then
31416        MAX_HEAP_MEM=6000
31417
31418    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31419    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31420    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31421    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31422    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31423        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31424    fi
31425
31426
31427    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31428    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31429    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31430    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31431    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31432        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31433    fi
31434
31435    elif test "$MEMORY_SIZE" -gt "5000"; then
31436        MAX_HEAP_MEM=3000
31437
31438    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31439    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31440    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31441    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31442    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31443        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31444    fi
31445
31446
31447    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31448    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31449    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31450    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31451    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31452        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31453    fi
31454
31455    elif test "$MEMORY_SIZE" -gt "3800"; then
31456        MAX_HEAP_MEM=2500
31457
31458    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31459    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31460    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31461    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31462    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31463        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31464    fi
31465
31466    elif test "$MEMORY_SIZE" -gt "1900"; then
31467        MAX_HEAP_MEM=1200
31468
31469    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31470    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31471    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31472    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31473    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31474        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31475    fi
31476
31477    elif test "$MEMORY_SIZE" -gt "1000"; then
31478        MAX_HEAP_MEM=900
31479
31480    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31481    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31482    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31483    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31484    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31485        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31486    fi
31487
31488    else
31489        MAX_HEAP_MEM=512
31490
31491    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31492    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31493    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31494    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31495    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31496        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31497    fi
31498
31499    fi
31500
31501
31502    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31503    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31504    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31505    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31506    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31507        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31508    fi
31509
31510
31511    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31512    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31513    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31514    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31515    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31516        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31517    fi
31518
31519
31520    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31521    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31522    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31523    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31524    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31525        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31526    fi
31527
31528
31529    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31530    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31532$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31533        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31535$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31536    fi
31537fi
31538
31539
31540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31541$as_echo_n "checking whether to use sjavac... " >&6; }
31542# Check whether --enable-sjavac was given.
31543if test "${enable_sjavac+set}" = set; then :
31544  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31545else
31546  ENABLE_SJAVAC='no'
31547fi
31548
31549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31550$as_echo "$ENABLE_SJAVAC" >&6; }
31551
31552
31553if test "x$ENABLE_SJAVAC" = xyes; then
31554    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31555else
31556    SJAVAC_SERVER_DIR=
31557fi
31558
31559
31560
31561
31562# Can the C/C++ compiler use precompiled headers?
31563
31564
31565###############################################################################
31566#
31567# Can the C/C++ compiler use precompiled headers?
31568#
31569# Check whether --enable-precompiled-headers was given.
31570if test "${enable_precompiled_headers+set}" = set; then :
31571  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31572else
31573  ENABLE_PRECOMPH=yes
31574fi
31575
31576
31577USE_PRECOMPILED_HEADER=1
31578if test "x$ENABLE_PRECOMPH" = xno; then
31579    USE_PRECOMPILED_HEADER=0
31580fi
31581
31582if test "x$ENABLE_PRECOMPH" = xyes; then
31583    # Check that the compiler actually supports precomp headers.
31584    if test "x$GCC" = xyes; then
31585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31586$as_echo_n "checking that precompiled headers work... " >&6; }
31587         echo "int alfa();" > conftest.h
31588         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31589         if test ! -f conftest.hpp.gch; then
31590             USE_PRECOMPILED_HEADER=0
31591             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31592$as_echo "no" >&6; }
31593         else
31594             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31595$as_echo "yes" >&6; }
31596         fi
31597         rm -f conftest.h conftest.hpp.gch
31598    fi
31599fi
31600
31601
31602
31603
31604# Setup use of ccache, if available
31605
31606    # Check whether --enable-ccache was given.
31607if test "${enable_ccache+set}" = set; then :
31608  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31609else
31610  ENABLE_CCACHE=yes
31611fi
31612
31613    if test "x$ENABLE_CCACHE" = xyes; then
31614        # Extract the first word of "ccache", so it can be a program name with args.
31615set dummy ccache; ac_word=$2
31616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31617$as_echo_n "checking for $ac_word... " >&6; }
31618if test "${ac_cv_path_CCACHE+set}" = set; then :
31619  $as_echo_n "(cached) " >&6
31620else
31621  case $CCACHE in
31622  [\\/]* | ?:[\\/]*)
31623  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31624  ;;
31625  *)
31626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31627for as_dir in $PATH
31628do
31629  IFS=$as_save_IFS
31630  test -z "$as_dir" && as_dir=.
31631    for ac_exec_ext in '' $ac_executable_extensions; do
31632  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31633    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31635    break 2
31636  fi
31637done
31638  done
31639IFS=$as_save_IFS
31640
31641  ;;
31642esac
31643fi
31644CCACHE=$ac_cv_path_CCACHE
31645if test -n "$CCACHE"; then
31646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31647$as_echo "$CCACHE" >&6; }
31648else
31649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31650$as_echo "no" >&6; }
31651fi
31652
31653
31654    else
31655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31656$as_echo_n "checking for ccache... " >&6; }
31657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31658$as_echo "explicitly disabled" >&6; }
31659        CCACHE=
31660    fi
31661
31662
31663
31664# Check whether --with-ccache-dir was given.
31665if test "${with_ccache_dir+set}" = set; then :
31666  withval=$with_ccache_dir;
31667fi
31668
31669
31670    if test "x$with_ccache_dir" != x; then
31671        # When using a non home ccache directory, assume the use is to share ccache files
31672        # with other users. Thus change the umask.
31673        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31674    fi
31675    CCACHE_FOUND=""
31676    if test "x$CCACHE" != x; then
31677
31678    if test "x$CCACHE" != x; then
31679        CCACHE_FOUND="true"
31680        # Only use ccache if it is 3.1.4 or later, which supports
31681        # precompiled headers.
31682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31683$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31684        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31685        if test "x$HAS_GOOD_CCACHE" = x; then
31686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31687$as_echo "no, disabling ccache" >&6; }
31688            CCACHE=
31689        else
31690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31691$as_echo "yes" >&6; }
31692            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31693$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31694            PUSHED_FLAGS="$CXXFLAGS"
31695            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31696            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31697/* end confdefs.h.  */
31698
31699int
31700main ()
31701{
31702
31703  ;
31704  return 0;
31705}
31706_ACEOF
31707if ac_fn_cxx_try_compile "$LINENO"; then :
31708  CC_KNOWS_CCACHE_TRICK=yes
31709else
31710  CC_KNOWS_CCACHE_TRICK=no
31711fi
31712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31713            CXXFLAGS="$PUSHED_FLAGS"
31714            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31715                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31716$as_echo "yes" >&6; }
31717            else
31718                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31719$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31720                CCACHE=
31721            fi
31722        fi
31723    fi
31724
31725    if test "x$CCACHE" != x; then
31726        CCACHE_SLOPPINESS=time_macros
31727        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31728        CCACHE_FLAGS=-fpch-preprocess
31729
31730        if test "x$SET_CCACHE_DIR" != x; then
31731            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31732	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31733        fi
31734    fi
31735
31736    fi
31737
31738
31739###############################################################################
31740#
31741# And now the finish...
31742#
31743###############################################################################
31744
31745# Check for some common pitfalls
31746
31747  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31748    file_to_test="$SRC_ROOT/LICENSE"
31749    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31750      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
31751    fi
31752  fi
31753
31754
31755
31756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31757$as_echo_n "checking if build directory is on local disk... " >&6; }
31758
31759	# df -l lists only local disks; if the given directory is not found then
31760	# a non-zero exit code is given
31761  if test "x$DF" = x; then
31762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31763      # msys does not have df; use Windows "net use" instead.
31764      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31765      if test "x$IS_NETWORK_DISK" = x; then
31766        OUTPUT_DIR_IS_LOCAL="yes"
31767      else
31768        OUTPUT_DIR_IS_LOCAL="no"
31769      fi
31770    else
31771      # No df here, say it's local
31772      OUTPUT_DIR_IS_LOCAL="yes"
31773    fi
31774  else
31775    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31776      OUTPUT_DIR_IS_LOCAL="yes"
31777    else
31778      OUTPUT_DIR_IS_LOCAL="no"
31779    fi
31780  fi
31781
31782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31783$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31784
31785
31786
31787# Check if the user has any old-style ALT_ variables set.
31788FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31789
31790# Before generating output files, test if they exist. If they do, this is a reconfigure.
31791# Since we can't properly handle the dependencies for this, warn the user about the situation
31792if test -e $OUTPUT_ROOT/spec.gmk; then
31793  IS_RECONFIGURE=yes
31794else
31795  IS_RECONFIGURE=no
31796fi
31797
31798if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31799  HIDE_PERFORMANCE_HINTS=yes
31800else
31801  HIDE_PERFORMANCE_HINTS=no
31802  # Hide it the next time around...
31803  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31804fi
31805
31806
31807
31808# At the end, call the custom hook. (Dummy macro if no custom sources available)
31809
31810
31811# We're messing a bit with internal autoconf variables to put the config.status
31812# in the output directory instead of the current directory.
31813CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31814# Create the actual output files. Now the main work of configure is done.
31815cat >confcache <<\_ACEOF
31816# This file is a shell script that caches the results of configure
31817# tests run on this system so they can be shared between configure
31818# scripts and configure runs, see configure's option --config-cache.
31819# It is not useful on other systems.  If it contains results you don't
31820# want to keep, you may remove or edit it.
31821#
31822# config.status only pays attention to the cache file if you give it
31823# the --recheck option to rerun configure.
31824#
31825# `ac_cv_env_foo' variables (set or unset) will be overridden when
31826# loading this file, other *unset* `ac_cv_foo' will be assigned the
31827# following values.
31828
31829_ACEOF
31830
31831# The following way of writing the cache mishandles newlines in values,
31832# but we know of no workaround that is simple, portable, and efficient.
31833# So, we kill variables containing newlines.
31834# Ultrix sh set writes to stderr and can't be redirected directly,
31835# and sets the high bit in the cache file unless we assign to the vars.
31836(
31837  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31838    eval ac_val=\$$ac_var
31839    case $ac_val in #(
31840    *${as_nl}*)
31841      case $ac_var in #(
31842      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31843$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31844      esac
31845      case $ac_var in #(
31846      _ | IFS | as_nl) ;; #(
31847      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31848      *) { eval $ac_var=; unset $ac_var;} ;;
31849      esac ;;
31850    esac
31851  done
31852
31853  (set) 2>&1 |
31854    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31855    *${as_nl}ac_space=\ *)
31856      # `set' does not quote correctly, so add quotes: double-quote
31857      # substitution turns \\\\ into \\, and sed turns \\ into \.
31858      sed -n \
31859	"s/'/'\\\\''/g;
31860	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31861      ;; #(
31862    *)
31863      # `set' quotes correctly as required by POSIX, so do not add quotes.
31864      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31865      ;;
31866    esac |
31867    sort
31868) |
31869  sed '
31870     /^ac_cv_env_/b end
31871     t clear
31872     :clear
31873     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31874     t end
31875     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31876     :end' >>confcache
31877if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31878  if test -w "$cache_file"; then
31879    test "x$cache_file" != "x/dev/null" &&
31880      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31881$as_echo "$as_me: updating cache $cache_file" >&6;}
31882    cat confcache >$cache_file
31883  else
31884    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31885$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31886  fi
31887fi
31888rm -f confcache
31889
31890test "x$prefix" = xNONE && prefix=$ac_default_prefix
31891# Let make expand exec_prefix.
31892test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31893
31894DEFS=-DHAVE_CONFIG_H
31895
31896ac_libobjs=
31897ac_ltlibobjs=
31898U=
31899for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31900  # 1. Remove the extension, and $U if already installed.
31901  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31902  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31903  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31904  #    will be set to the directory where LIBOBJS objects are built.
31905  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31906  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31907done
31908LIBOBJS=$ac_libobjs
31909
31910LTLIBOBJS=$ac_ltlibobjs
31911
31912
31913
31914: ${CONFIG_STATUS=./config.status}
31915ac_write_fail=0
31916ac_clean_files_save=$ac_clean_files
31917ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31918{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31919$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31920as_write_fail=0
31921cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31922#! $SHELL
31923# Generated by $as_me.
31924# Run this file to recreate the current configuration.
31925# Compiler output produced by configure, useful for debugging
31926# configure, is in config.log if it exists.
31927
31928debug=false
31929ac_cs_recheck=false
31930ac_cs_silent=false
31931
31932SHELL=\${CONFIG_SHELL-$SHELL}
31933export SHELL
31934_ASEOF
31935cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31936## -------------------- ##
31937## M4sh Initialization. ##
31938## -------------------- ##
31939
31940# Be more Bourne compatible
31941DUALCASE=1; export DUALCASE # for MKS sh
31942if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31943  emulate sh
31944  NULLCMD=:
31945  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31946  # is contrary to our usage.  Disable this feature.
31947  alias -g '${1+"$@"}'='"$@"'
31948  setopt NO_GLOB_SUBST
31949else
31950  case `(set -o) 2>/dev/null` in #(
31951  *posix*) :
31952    set -o posix ;; #(
31953  *) :
31954     ;;
31955esac
31956fi
31957
31958
31959as_nl='
31960'
31961export as_nl
31962# Printing a long string crashes Solaris 7 /usr/bin/printf.
31963as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31964as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31965as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31966# Prefer a ksh shell builtin over an external printf program on Solaris,
31967# but without wasting forks for bash or zsh.
31968if test -z "$BASH_VERSION$ZSH_VERSION" \
31969    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31970  as_echo='print -r --'
31971  as_echo_n='print -rn --'
31972elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31973  as_echo='printf %s\n'
31974  as_echo_n='printf %s'
31975else
31976  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31977    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31978    as_echo_n='/usr/ucb/echo -n'
31979  else
31980    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31981    as_echo_n_body='eval
31982      arg=$1;
31983      case $arg in #(
31984      *"$as_nl"*)
31985	expr "X$arg" : "X\\(.*\\)$as_nl";
31986	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31987      esac;
31988      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31989    '
31990    export as_echo_n_body
31991    as_echo_n='sh -c $as_echo_n_body as_echo'
31992  fi
31993  export as_echo_body
31994  as_echo='sh -c $as_echo_body as_echo'
31995fi
31996
31997# The user is always right.
31998if test "${PATH_SEPARATOR+set}" != set; then
31999  PATH_SEPARATOR=:
32000  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32001    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32002      PATH_SEPARATOR=';'
32003  }
32004fi
32005
32006
32007# IFS
32008# We need space, tab and new line, in precisely that order.  Quoting is
32009# there to prevent editors from complaining about space-tab.
32010# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32011# splitting by setting IFS to empty value.)
32012IFS=" ""	$as_nl"
32013
32014# Find who we are.  Look in the path if we contain no directory separator.
32015case $0 in #((
32016  *[\\/]* ) as_myself=$0 ;;
32017  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32018for as_dir in $PATH
32019do
32020  IFS=$as_save_IFS
32021  test -z "$as_dir" && as_dir=.
32022    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32023  done
32024IFS=$as_save_IFS
32025
32026     ;;
32027esac
32028# We did not find ourselves, most probably we were run as `sh COMMAND'
32029# in which case we are not to be found in the path.
32030if test "x$as_myself" = x; then
32031  as_myself=$0
32032fi
32033if test ! -f "$as_myself"; then
32034  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32035  exit 1
32036fi
32037
32038# Unset variables that we do not need and which cause bugs (e.g. in
32039# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32040# suppresses any "Segmentation fault" message there.  '((' could
32041# trigger a bug in pdksh 5.2.14.
32042for as_var in BASH_ENV ENV MAIL MAILPATH
32043do eval test x\${$as_var+set} = xset \
32044  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32045done
32046PS1='$ '
32047PS2='> '
32048PS4='+ '
32049
32050# NLS nuisances.
32051LC_ALL=C
32052export LC_ALL
32053LANGUAGE=C
32054export LANGUAGE
32055
32056# CDPATH.
32057(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32058
32059
32060# as_fn_error STATUS ERROR [LINENO LOG_FD]
32061# ----------------------------------------
32062# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32063# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32064# script with STATUS, using 1 if that was 0.
32065as_fn_error ()
32066{
32067  as_status=$1; test $as_status -eq 0 && as_status=1
32068  if test "$4"; then
32069    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32070    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32071  fi
32072  $as_echo "$as_me: error: $2" >&2
32073  as_fn_exit $as_status
32074} # as_fn_error
32075
32076
32077# as_fn_set_status STATUS
32078# -----------------------
32079# Set $? to STATUS, without forking.
32080as_fn_set_status ()
32081{
32082  return $1
32083} # as_fn_set_status
32084
32085# as_fn_exit STATUS
32086# -----------------
32087# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32088as_fn_exit ()
32089{
32090  set +e
32091  as_fn_set_status $1
32092  exit $1
32093} # as_fn_exit
32094
32095# as_fn_unset VAR
32096# ---------------
32097# Portably unset VAR.
32098as_fn_unset ()
32099{
32100  { eval $1=; unset $1;}
32101}
32102as_unset=as_fn_unset
32103# as_fn_append VAR VALUE
32104# ----------------------
32105# Append the text in VALUE to the end of the definition contained in VAR. Take
32106# advantage of any shell optimizations that allow amortized linear growth over
32107# repeated appends, instead of the typical quadratic growth present in naive
32108# implementations.
32109if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32110  eval 'as_fn_append ()
32111  {
32112    eval $1+=\$2
32113  }'
32114else
32115  as_fn_append ()
32116  {
32117    eval $1=\$$1\$2
32118  }
32119fi # as_fn_append
32120
32121# as_fn_arith ARG...
32122# ------------------
32123# Perform arithmetic evaluation on the ARGs, and store the result in the
32124# global $as_val. Take advantage of shells that can avoid forks. The arguments
32125# must be portable across $(()) and expr.
32126if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32127  eval 'as_fn_arith ()
32128  {
32129    as_val=$(( $* ))
32130  }'
32131else
32132  as_fn_arith ()
32133  {
32134    as_val=`expr "$@" || test $? -eq 1`
32135  }
32136fi # as_fn_arith
32137
32138
32139if expr a : '\(a\)' >/dev/null 2>&1 &&
32140   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32141  as_expr=expr
32142else
32143  as_expr=false
32144fi
32145
32146if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32147  as_basename=basename
32148else
32149  as_basename=false
32150fi
32151
32152if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32153  as_dirname=dirname
32154else
32155  as_dirname=false
32156fi
32157
32158as_me=`$as_basename -- "$0" ||
32159$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32160	 X"$0" : 'X\(//\)$' \| \
32161	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32162$as_echo X/"$0" |
32163    sed '/^.*\/\([^/][^/]*\)\/*$/{
32164	    s//\1/
32165	    q
32166	  }
32167	  /^X\/\(\/\/\)$/{
32168	    s//\1/
32169	    q
32170	  }
32171	  /^X\/\(\/\).*/{
32172	    s//\1/
32173	    q
32174	  }
32175	  s/.*/./; q'`
32176
32177# Avoid depending upon Character Ranges.
32178as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32179as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32180as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32181as_cr_digits='0123456789'
32182as_cr_alnum=$as_cr_Letters$as_cr_digits
32183
32184ECHO_C= ECHO_N= ECHO_T=
32185case `echo -n x` in #(((((
32186-n*)
32187  case `echo 'xy\c'` in
32188  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32189  xy)  ECHO_C='\c';;
32190  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32191       ECHO_T='	';;
32192  esac;;
32193*)
32194  ECHO_N='-n';;
32195esac
32196
32197rm -f conf$$ conf$$.exe conf$$.file
32198if test -d conf$$.dir; then
32199  rm -f conf$$.dir/conf$$.file
32200else
32201  rm -f conf$$.dir
32202  mkdir conf$$.dir 2>/dev/null
32203fi
32204if (echo >conf$$.file) 2>/dev/null; then
32205  if ln -s conf$$.file conf$$ 2>/dev/null; then
32206    as_ln_s='ln -s'
32207    # ... but there are two gotchas:
32208    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32209    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32210    # In both cases, we have to default to `cp -p'.
32211    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32212      as_ln_s='cp -p'
32213  elif ln conf$$.file conf$$ 2>/dev/null; then
32214    as_ln_s=ln
32215  else
32216    as_ln_s='cp -p'
32217  fi
32218else
32219  as_ln_s='cp -p'
32220fi
32221rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32222rmdir conf$$.dir 2>/dev/null
32223
32224
32225# as_fn_mkdir_p
32226# -------------
32227# Create "$as_dir" as a directory, including parents if necessary.
32228as_fn_mkdir_p ()
32229{
32230
32231  case $as_dir in #(
32232  -*) as_dir=./$as_dir;;
32233  esac
32234  test -d "$as_dir" || eval $as_mkdir_p || {
32235    as_dirs=
32236    while :; do
32237      case $as_dir in #(
32238      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32239      *) as_qdir=$as_dir;;
32240      esac
32241      as_dirs="'$as_qdir' $as_dirs"
32242      as_dir=`$as_dirname -- "$as_dir" ||
32243$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32244	 X"$as_dir" : 'X\(//\)[^/]' \| \
32245	 X"$as_dir" : 'X\(//\)$' \| \
32246	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32247$as_echo X"$as_dir" |
32248    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32249	    s//\1/
32250	    q
32251	  }
32252	  /^X\(\/\/\)[^/].*/{
32253	    s//\1/
32254	    q
32255	  }
32256	  /^X\(\/\/\)$/{
32257	    s//\1/
32258	    q
32259	  }
32260	  /^X\(\/\).*/{
32261	    s//\1/
32262	    q
32263	  }
32264	  s/.*/./; q'`
32265      test -d "$as_dir" && break
32266    done
32267    test -z "$as_dirs" || eval "mkdir $as_dirs"
32268  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32269
32270
32271} # as_fn_mkdir_p
32272if mkdir -p . 2>/dev/null; then
32273  as_mkdir_p='mkdir -p "$as_dir"'
32274else
32275  test -d ./-p && rmdir ./-p
32276  as_mkdir_p=false
32277fi
32278
32279if test -x / >/dev/null 2>&1; then
32280  as_test_x='test -x'
32281else
32282  if ls -dL / >/dev/null 2>&1; then
32283    as_ls_L_option=L
32284  else
32285    as_ls_L_option=
32286  fi
32287  as_test_x='
32288    eval sh -c '\''
32289      if test -d "$1"; then
32290	test -d "$1/.";
32291      else
32292	case $1 in #(
32293	-*)set "./$1";;
32294	esac;
32295	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32296	???[sx]*):;;*)false;;esac;fi
32297    '\'' sh
32298  '
32299fi
32300as_executable_p=$as_test_x
32301
32302# Sed expression to map a string onto a valid CPP name.
32303as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32304
32305# Sed expression to map a string onto a valid variable name.
32306as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32307
32308
32309exec 6>&1
32310## ----------------------------------- ##
32311## Main body of $CONFIG_STATUS script. ##
32312## ----------------------------------- ##
32313_ASEOF
32314test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32315
32316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32317# Save the log message, to keep $0 and so on meaningful, and to
32318# report actual input values of CONFIG_FILES etc. instead of their
32319# values after options handling.
32320ac_log="
32321This file was extended by OpenJDK $as_me jdk8, which was
32322generated by GNU Autoconf 2.67.  Invocation command line was
32323
32324  CONFIG_FILES    = $CONFIG_FILES
32325  CONFIG_HEADERS  = $CONFIG_HEADERS
32326  CONFIG_LINKS    = $CONFIG_LINKS
32327  CONFIG_COMMANDS = $CONFIG_COMMANDS
32328  $ $0 $@
32329
32330on `(hostname || uname -n) 2>/dev/null | sed 1q`
32331"
32332
32333_ACEOF
32334
32335case $ac_config_files in *"
32336"*) set x $ac_config_files; shift; ac_config_files=$*;;
32337esac
32338
32339case $ac_config_headers in *"
32340"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32341esac
32342
32343
32344cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32345# Files that config.status was made for.
32346config_files="$ac_config_files"
32347config_headers="$ac_config_headers"
32348
32349_ACEOF
32350
32351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32352ac_cs_usage="\
32353\`$as_me' instantiates files and other configuration actions
32354from templates according to the current configuration.  Unless the files
32355and actions are specified as TAGs, all are instantiated by default.
32356
32357Usage: $0 [OPTION]... [TAG]...
32358
32359  -h, --help       print this help, then exit
32360  -V, --version    print version number and configuration settings, then exit
32361      --config     print configuration, then exit
32362  -q, --quiet, --silent
32363                   do not print progress messages
32364  -d, --debug      don't remove temporary files
32365      --recheck    update $as_me by reconfiguring in the same conditions
32366      --file=FILE[:TEMPLATE]
32367                   instantiate the configuration file FILE
32368      --header=FILE[:TEMPLATE]
32369                   instantiate the configuration header FILE
32370
32371Configuration files:
32372$config_files
32373
32374Configuration headers:
32375$config_headers
32376
32377Report bugs to <build-dev@openjdk.java.net>.
32378OpenJDK home page: <http://openjdk.java.net>."
32379
32380_ACEOF
32381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32382ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32383ac_cs_version="\\
32384OpenJDK config.status jdk8
32385configured by $0, generated by GNU Autoconf 2.67,
32386  with options \\"\$ac_cs_config\\"
32387
32388Copyright (C) 2010 Free Software Foundation, Inc.
32389This config.status script is free software; the Free Software Foundation
32390gives unlimited permission to copy, distribute and modify it."
32391
32392ac_pwd='$ac_pwd'
32393srcdir='$srcdir'
32394AWK='$AWK'
32395test -n "\$AWK" || AWK=awk
32396_ACEOF
32397
32398cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32399# The default lists apply if the user does not specify any file.
32400ac_need_defaults=:
32401while test $# != 0
32402do
32403  case $1 in
32404  --*=?*)
32405    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32406    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32407    ac_shift=:
32408    ;;
32409  --*=)
32410    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32411    ac_optarg=
32412    ac_shift=:
32413    ;;
32414  *)
32415    ac_option=$1
32416    ac_optarg=$2
32417    ac_shift=shift
32418    ;;
32419  esac
32420
32421  case $ac_option in
32422  # Handling of the options.
32423  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32424    ac_cs_recheck=: ;;
32425  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32426    $as_echo "$ac_cs_version"; exit ;;
32427  --config | --confi | --conf | --con | --co | --c )
32428    $as_echo "$ac_cs_config"; exit ;;
32429  --debug | --debu | --deb | --de | --d | -d )
32430    debug=: ;;
32431  --file | --fil | --fi | --f )
32432    $ac_shift
32433    case $ac_optarg in
32434    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32435    '') as_fn_error $? "missing file argument" ;;
32436    esac
32437    as_fn_append CONFIG_FILES " '$ac_optarg'"
32438    ac_need_defaults=false;;
32439  --header | --heade | --head | --hea )
32440    $ac_shift
32441    case $ac_optarg in
32442    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32443    esac
32444    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32445    ac_need_defaults=false;;
32446  --he | --h)
32447    # Conflict between --help and --header
32448    as_fn_error $? "ambiguous option: \`$1'
32449Try \`$0 --help' for more information.";;
32450  --help | --hel | -h )
32451    $as_echo "$ac_cs_usage"; exit ;;
32452  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32453  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32454    ac_cs_silent=: ;;
32455
32456  # This is an error.
32457  -*) as_fn_error $? "unrecognized option: \`$1'
32458Try \`$0 --help' for more information." ;;
32459
32460  *) as_fn_append ac_config_targets " $1"
32461     ac_need_defaults=false ;;
32462
32463  esac
32464  shift
32465done
32466
32467ac_configure_extra_args=
32468
32469if $ac_cs_silent; then
32470  exec 6>/dev/null
32471  ac_configure_extra_args="$ac_configure_extra_args --silent"
32472fi
32473
32474_ACEOF
32475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32476if \$ac_cs_recheck; then
32477  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32478  shift
32479  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32480  CONFIG_SHELL='$SHELL'
32481  export CONFIG_SHELL
32482  exec "\$@"
32483fi
32484
32485_ACEOF
32486cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32487exec 5>>config.log
32488{
32489  echo
32490  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32491## Running $as_me. ##
32492_ASBOX
32493  $as_echo "$ac_log"
32494} >&5
32495
32496_ACEOF
32497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32498_ACEOF
32499
32500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32501
32502# Handling of arguments.
32503for ac_config_target in $ac_config_targets
32504do
32505  case $ac_config_target in
32506    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32507    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32508    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32509    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32510    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32511    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32512    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32513
32514  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32515  esac
32516done
32517
32518
32519# If the user did not use the arguments to specify the items to instantiate,
32520# then the envvar interface is used.  Set only those that are not.
32521# We use the long form for the default assignment because of an extremely
32522# bizarre bug on SunOS 4.1.3.
32523if $ac_need_defaults; then
32524  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32525  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32526fi
32527
32528# Have a temporary directory for convenience.  Make it in the build tree
32529# simply because there is no reason against having it here, and in addition,
32530# creating and moving files from /tmp can sometimes cause problems.
32531# Hook for its removal unless debugging.
32532# Note that there is a small window in which the directory will not be cleaned:
32533# after its creation but before its name has been assigned to `$tmp'.
32534$debug ||
32535{
32536  tmp=
32537  trap 'exit_status=$?
32538  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32539' 0
32540  trap 'as_fn_exit 1' 1 2 13 15
32541}
32542# Create a (secure) tmp directory for tmp files.
32543
32544{
32545  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32546  test -n "$tmp" && test -d "$tmp"
32547}  ||
32548{
32549  tmp=./conf$$-$RANDOM
32550  (umask 077 && mkdir "$tmp")
32551} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32552
32553# Set up the scripts for CONFIG_FILES section.
32554# No need to generate them if there are no CONFIG_FILES.
32555# This happens for instance with `./config.status config.h'.
32556if test -n "$CONFIG_FILES"; then
32557
32558
32559ac_cr=`echo X | tr X '\015'`
32560# On cygwin, bash can eat \r inside `` if the user requested igncr.
32561# But we know of no other shell where ac_cr would be empty at this
32562# point, so we can use a bashism as a fallback.
32563if test "x$ac_cr" = x; then
32564  eval ac_cr=\$\'\\r\'
32565fi
32566ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32567if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32568  ac_cs_awk_cr='\\r'
32569else
32570  ac_cs_awk_cr=$ac_cr
32571fi
32572
32573echo 'BEGIN {' >"$tmp/subs1.awk" &&
32574_ACEOF
32575
32576
32577{
32578  echo "cat >conf$$subs.awk <<_ACEOF" &&
32579  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32580  echo "_ACEOF"
32581} >conf$$subs.sh ||
32582  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32583ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32584ac_delim='%!_!# '
32585for ac_last_try in false false false false false :; do
32586  . ./conf$$subs.sh ||
32587    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32588
32589  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32590  if test $ac_delim_n = $ac_delim_num; then
32591    break
32592  elif $ac_last_try; then
32593    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32594  else
32595    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32596  fi
32597done
32598rm -f conf$$subs.sh
32599
32600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32601cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32602_ACEOF
32603sed -n '
32604h
32605s/^/S["/; s/!.*/"]=/
32606p
32607g
32608s/^[^!]*!//
32609:repl
32610t repl
32611s/'"$ac_delim"'$//
32612t delim
32613:nl
32614h
32615s/\(.\{148\}\)..*/\1/
32616t more1
32617s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32618p
32619n
32620b repl
32621:more1
32622s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32623p
32624g
32625s/.\{148\}//
32626t nl
32627:delim
32628h
32629s/\(.\{148\}\)..*/\1/
32630t more2
32631s/["\\]/\\&/g; s/^/"/; s/$/"/
32632p
32633b
32634:more2
32635s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32636p
32637g
32638s/.\{148\}//
32639t delim
32640' <conf$$subs.awk | sed '
32641/^[^""]/{
32642  N
32643  s/\n//
32644}
32645' >>$CONFIG_STATUS || ac_write_fail=1
32646rm -f conf$$subs.awk
32647cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32648_ACAWK
32649cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32650  for (key in S) S_is_set[key] = 1
32651  FS = ""
32652
32653}
32654{
32655  line = $ 0
32656  nfields = split(line, field, "@")
32657  substed = 0
32658  len = length(field[1])
32659  for (i = 2; i < nfields; i++) {
32660    key = field[i]
32661    keylen = length(key)
32662    if (S_is_set[key]) {
32663      value = S[key]
32664      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32665      len += length(value) + length(field[++i])
32666      substed = 1
32667    } else
32668      len += 1 + keylen
32669  }
32670
32671  print line
32672}
32673
32674_ACAWK
32675_ACEOF
32676cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32677if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32678  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32679else
32680  cat
32681fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32682  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32683_ACEOF
32684
32685# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32686# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32687# trailing colons and then remove the whole line if VPATH becomes empty
32688# (actually we leave an empty line to preserve line numbers).
32689if test "x$srcdir" = x.; then
32690  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32691h
32692s///
32693s/^/:/
32694s/[	 ]*$/:/
32695s/:\$(srcdir):/:/g
32696s/:\${srcdir}:/:/g
32697s/:@srcdir@:/:/g
32698s/^:*//
32699s/:*$//
32700x
32701s/\(=[	 ]*\).*/\1/
32702G
32703s/\n//
32704s/^[^=]*=[	 ]*$//
32705}'
32706fi
32707
32708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32709fi # test -n "$CONFIG_FILES"
32710
32711# Set up the scripts for CONFIG_HEADERS section.
32712# No need to generate them if there are no CONFIG_HEADERS.
32713# This happens for instance with `./config.status Makefile'.
32714if test -n "$CONFIG_HEADERS"; then
32715cat >"$tmp/defines.awk" <<\_ACAWK ||
32716BEGIN {
32717_ACEOF
32718
32719# Transform confdefs.h into an awk script `defines.awk', embedded as
32720# here-document in config.status, that substitutes the proper values into
32721# config.h.in to produce config.h.
32722
32723# Create a delimiter string that does not exist in confdefs.h, to ease
32724# handling of long lines.
32725ac_delim='%!_!# '
32726for ac_last_try in false false :; do
32727  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32728  if test -z "$ac_t"; then
32729    break
32730  elif $ac_last_try; then
32731    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32732  else
32733    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32734  fi
32735done
32736
32737# For the awk script, D is an array of macro values keyed by name,
32738# likewise P contains macro parameters if any.  Preserve backslash
32739# newline sequences.
32740
32741ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32742sed -n '
32743s/.\{148\}/&'"$ac_delim"'/g
32744t rset
32745:rset
32746s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32747t def
32748d
32749:def
32750s/\\$//
32751t bsnl
32752s/["\\]/\\&/g
32753s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32754D["\1"]=" \3"/p
32755s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32756d
32757:bsnl
32758s/["\\]/\\&/g
32759s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32760D["\1"]=" \3\\\\\\n"\\/p
32761t cont
32762s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32763t cont
32764d
32765:cont
32766n
32767s/.\{148\}/&'"$ac_delim"'/g
32768t clear
32769:clear
32770s/\\$//
32771t bsnlc
32772s/["\\]/\\&/g; s/^/"/; s/$/"/p
32773d
32774:bsnlc
32775s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32776b cont
32777' <confdefs.h | sed '
32778s/'"$ac_delim"'/"\\\
32779"/g' >>$CONFIG_STATUS || ac_write_fail=1
32780
32781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32782  for (key in D) D_is_set[key] = 1
32783  FS = ""
32784}
32785/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32786  line = \$ 0
32787  split(line, arg, " ")
32788  if (arg[1] == "#") {
32789    defundef = arg[2]
32790    mac1 = arg[3]
32791  } else {
32792    defundef = substr(arg[1], 2)
32793    mac1 = arg[2]
32794  }
32795  split(mac1, mac2, "(") #)
32796  macro = mac2[1]
32797  prefix = substr(line, 1, index(line, defundef) - 1)
32798  if (D_is_set[macro]) {
32799    # Preserve the white space surrounding the "#".
32800    print prefix "define", macro P[macro] D[macro]
32801    next
32802  } else {
32803    # Replace #undef with comments.  This is necessary, for example,
32804    # in the case of _POSIX_SOURCE, which is predefined and required
32805    # on some systems where configure will not decide to define it.
32806    if (defundef == "undef") {
32807      print "/*", prefix defundef, macro, "*/"
32808      next
32809    }
32810  }
32811}
32812{ print }
32813_ACAWK
32814_ACEOF
32815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32816  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32817fi # test -n "$CONFIG_HEADERS"
32818
32819
32820eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32821shift
32822for ac_tag
32823do
32824  case $ac_tag in
32825  :[FHLC]) ac_mode=$ac_tag; continue;;
32826  esac
32827  case $ac_mode$ac_tag in
32828  :[FHL]*:*);;
32829  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32830  :[FH]-) ac_tag=-:-;;
32831  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32832  esac
32833  ac_save_IFS=$IFS
32834  IFS=:
32835  set x $ac_tag
32836  IFS=$ac_save_IFS
32837  shift
32838  ac_file=$1
32839  shift
32840
32841  case $ac_mode in
32842  :L) ac_source=$1;;
32843  :[FH])
32844    ac_file_inputs=
32845    for ac_f
32846    do
32847      case $ac_f in
32848      -) ac_f="$tmp/stdin";;
32849      *) # Look for the file first in the build tree, then in the source tree
32850	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32851	 # because $ac_f cannot contain `:'.
32852	 test -f "$ac_f" ||
32853	   case $ac_f in
32854	   [\\/$]*) false;;
32855	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32856	   esac ||
32857	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32858      esac
32859      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32860      as_fn_append ac_file_inputs " '$ac_f'"
32861    done
32862
32863    # Let's still pretend it is `configure' which instantiates (i.e., don't
32864    # use $as_me), people would be surprised to read:
32865    #    /* config.h.  Generated by config.status.  */
32866    configure_input='Generated from '`
32867	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32868	`' by configure.'
32869    if test x"$ac_file" != x-; then
32870      configure_input="$ac_file.  $configure_input"
32871      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32872$as_echo "$as_me: creating $ac_file" >&6;}
32873    fi
32874    # Neutralize special characters interpreted by sed in replacement strings.
32875    case $configure_input in #(
32876    *\&* | *\|* | *\\* )
32877       ac_sed_conf_input=`$as_echo "$configure_input" |
32878       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32879    *) ac_sed_conf_input=$configure_input;;
32880    esac
32881
32882    case $ac_tag in
32883    *:-:* | *:-) cat >"$tmp/stdin" \
32884      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32885    esac
32886    ;;
32887  esac
32888
32889  ac_dir=`$as_dirname -- "$ac_file" ||
32890$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32891	 X"$ac_file" : 'X\(//\)[^/]' \| \
32892	 X"$ac_file" : 'X\(//\)$' \| \
32893	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32894$as_echo X"$ac_file" |
32895    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32896	    s//\1/
32897	    q
32898	  }
32899	  /^X\(\/\/\)[^/].*/{
32900	    s//\1/
32901	    q
32902	  }
32903	  /^X\(\/\/\)$/{
32904	    s//\1/
32905	    q
32906	  }
32907	  /^X\(\/\).*/{
32908	    s//\1/
32909	    q
32910	  }
32911	  s/.*/./; q'`
32912  as_dir="$ac_dir"; as_fn_mkdir_p
32913  ac_builddir=.
32914
32915case "$ac_dir" in
32916.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32917*)
32918  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32919  # A ".." for each directory in $ac_dir_suffix.
32920  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32921  case $ac_top_builddir_sub in
32922  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32923  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32924  esac ;;
32925esac
32926ac_abs_top_builddir=$ac_pwd
32927ac_abs_builddir=$ac_pwd$ac_dir_suffix
32928# for backward compatibility:
32929ac_top_builddir=$ac_top_build_prefix
32930
32931case $srcdir in
32932  .)  # We are building in place.
32933    ac_srcdir=.
32934    ac_top_srcdir=$ac_top_builddir_sub
32935    ac_abs_top_srcdir=$ac_pwd ;;
32936  [\\/]* | ?:[\\/]* )  # Absolute name.
32937    ac_srcdir=$srcdir$ac_dir_suffix;
32938    ac_top_srcdir=$srcdir
32939    ac_abs_top_srcdir=$srcdir ;;
32940  *) # Relative name.
32941    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32942    ac_top_srcdir=$ac_top_build_prefix$srcdir
32943    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32944esac
32945ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32946
32947
32948  case $ac_mode in
32949  :F)
32950  #
32951  # CONFIG_FILE
32952  #
32953
32954_ACEOF
32955
32956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32957# If the template does not know about datarootdir, expand it.
32958# FIXME: This hack should be removed a few years after 2.60.
32959ac_datarootdir_hack=; ac_datarootdir_seen=
32960ac_sed_dataroot='
32961/datarootdir/ {
32962  p
32963  q
32964}
32965/@datadir@/p
32966/@docdir@/p
32967/@infodir@/p
32968/@localedir@/p
32969/@mandir@/p'
32970case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32971*datarootdir*) ac_datarootdir_seen=yes;;
32972*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32973  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32974$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32975_ACEOF
32976cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32977  ac_datarootdir_hack='
32978  s&@datadir@&$datadir&g
32979  s&@docdir@&$docdir&g
32980  s&@infodir@&$infodir&g
32981  s&@localedir@&$localedir&g
32982  s&@mandir@&$mandir&g
32983  s&\\\${datarootdir}&$datarootdir&g' ;;
32984esac
32985_ACEOF
32986
32987# Neutralize VPATH when `$srcdir' = `.'.
32988# Shell code in configure.ac might set extrasub.
32989# FIXME: do we really want to maintain this feature?
32990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32991ac_sed_extra="$ac_vpsub
32992$extrasub
32993_ACEOF
32994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32995:t
32996/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32997s|@configure_input@|$ac_sed_conf_input|;t t
32998s&@top_builddir@&$ac_top_builddir_sub&;t t
32999s&@top_build_prefix@&$ac_top_build_prefix&;t t
33000s&@srcdir@&$ac_srcdir&;t t
33001s&@abs_srcdir@&$ac_abs_srcdir&;t t
33002s&@top_srcdir@&$ac_top_srcdir&;t t
33003s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33004s&@builddir@&$ac_builddir&;t t
33005s&@abs_builddir@&$ac_abs_builddir&;t t
33006s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33007$ac_datarootdir_hack
33008"
33009eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33010  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33011
33012test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33013  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33014  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33015  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33016which seems to be undefined.  Please make sure it is defined" >&5
33017$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33018which seems to be undefined.  Please make sure it is defined" >&2;}
33019
33020  rm -f "$tmp/stdin"
33021  case $ac_file in
33022  -) cat "$tmp/out" && rm -f "$tmp/out";;
33023  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33024  esac \
33025  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33026 ;;
33027  :H)
33028  #
33029  # CONFIG_HEADER
33030  #
33031  if test x"$ac_file" != x-; then
33032    {
33033      $as_echo "/* $configure_input  */" \
33034      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33035    } >"$tmp/config.h" \
33036      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33037    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33038      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33039$as_echo "$as_me: $ac_file is unchanged" >&6;}
33040    else
33041      rm -f "$ac_file"
33042      mv "$tmp/config.h" "$ac_file" \
33043	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33044    fi
33045  else
33046    $as_echo "/* $configure_input  */" \
33047      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33048      || as_fn_error $? "could not create -" "$LINENO" 5
33049  fi
33050 ;;
33051
33052
33053  esac
33054
33055done # for ac_tag
33056
33057
33058as_fn_exit 0
33059_ACEOF
33060ac_clean_files=$ac_clean_files_save
33061
33062test $ac_write_fail = 0 ||
33063  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33064
33065
33066# configure is writing to config.log, and then calls config.status.
33067# config.status does its own redirection, appending to config.log.
33068# Unfortunately, on DOS this fails, as config.log is still kept open
33069# by configure, so config.status won't be able to write to it; its
33070# output is simply discarded.  So we exec the FD to /dev/null,
33071# effectively closing config.log, so it can be properly (re)opened and
33072# appended to by config.status.  When coming back to configure, we
33073# need to make the FD available again.
33074if test "$no_create" != yes; then
33075  ac_cs_success=:
33076  ac_config_status_args=
33077  test "$silent" = yes &&
33078    ac_config_status_args="$ac_config_status_args --quiet"
33079  exec 5>/dev/null
33080  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33081  exec 5>>config.log
33082  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33083  # would make configure fail if this is the last instruction.
33084  $ac_cs_success || as_fn_exit 1
33085fi
33086if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33087  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33088$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33089fi
33090
33091
33092# Make the compare script executable
33093$CHMOD +x $OUTPUT_ROOT/compare.sh
33094
33095# Finally output some useful information to the user
33096
33097# Finally output some useful information to the user
33098
33099if test "x$CCACHE_FOUND" != x; then
33100	if  test "x$HAS_GOOD_CCACHE" = x; then
33101		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33102		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33103	else
33104		CCACHE_STATUS="installed and in use"
33105	fi
33106else
33107	if test "x$GCC" = xyes; then
33108		CCACHE_STATUS="not installed (consider installing)"
33109		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33110	else
33111		CCACHE_STATUS="not available for your system"
33112	fi
33113fi
33114
33115printf "\n"
33116printf "====================================================\n"
33117printf "A new configuration has been successfully created in\n"
33118printf "$OUTPUT_ROOT\n"
33119if test "x$CONFIGURE_COMMAND_LINE" != x; then
33120	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33121else
33122	printf "using default settings.\n"
33123fi
33124
33125printf "\n"
33126printf "Configuration summary:\n"
33127printf "* Debug level:    $DEBUG_LEVEL\n"
33128printf "* JDK variant:    $JDK_VARIANT\n"
33129printf "* JVM variants:   $with_jvm_variants\n"
33130printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33131
33132printf "\n"
33133printf "Tools summary:\n"
33134if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33135  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33136fi
33137printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33138printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33139printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33140
33141printf "\n"
33142printf "Build performance summary:\n"
33143printf "* Cores to use:   $NUM_CORES\n"
33144printf "* Memory limit:   $MEMORY_SIZE MB\n"
33145printf "* ccache status:  $CCACHE_STATUS\n"
33146printf "\n"
33147
33148if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33149	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33150	printf "$CCACHE_HELP_MSG\n"
33151
33152    # Print a helpful message on how to acquire the necessary build dependency.
33153    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33154    MISSING_DEPENDENCY=ccache
33155    PKGHANDLER_COMMAND=
33156
33157    case $PKGHANDLER in
33158	apt-get)
33159                apt_help     $MISSING_DEPENDENCY ;;
33160    yum)
33161                yum_help     $MISSING_DEPENDENCY ;;
33162	port)
33163                port_help    $MISSING_DEPENDENCY ;;
33164	pkgutil)
33165                pkgutil_help $MISSING_DEPENDENCY ;;
33166	pkgadd)
33167                pkgadd_help  $MISSING_DEPENDENCY ;;
33168    * )
33169      break ;;
33170    esac
33171
33172    if test "x$PKGHANDLER_COMMAND" != x; then
33173        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33174    fi
33175
33176	printf "$HELP_MSG\n"
33177	printf "\n"
33178fi
33179
33180if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33181	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33182	printf "will result in longer build times.\n"
33183	printf "\n"
33184fi
33185
33186if test "x$FOUND_ALT_VARIABLES" != "x"; then
33187	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33188	printf "These are not respected, and will be ignored. It is recommended\n"
33189	printf "that you clean your environment. The following variables are set:\n"
33190	printf "$FOUND_ALT_VARIABLES\n"
33191	printf "\n"
33192fi
33193
33194if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33195	printf "WARNING: Your build output directory is not on a local disk.\n"
33196	printf "This will severely degrade build performance!\n"
33197	printf "It is recommended that you create an output directory on a local disk,\n"
33198	printf "and run the configure script again from that directory.\n"
33199	printf "\n"
33200fi
33201
33202if test "x$IS_RECONFIGURE" = "xyes"; then
33203	printf "WARNING: The result of this configuration has overridden an older\n"
33204	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33205	printf "proper build. Failure to do so might result in strange build problems.\n"
33206	printf "\n"
33207fi
33208
33209