generated-configure.sh revision 662:15c1642967c9
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604JOBS
605MEMORY_SIZE
606NUM_CORES
607ENABLE_INTREE_EC
608SALIB_NAME
609HOTSPOT_MAKE_ARGS
610FIXPATH
611LIBCXX
612STATIC_CXX_SETTING
613LIBDL
614LIBM
615LIBZIP_CAN_USE_MMAP
616USE_EXTERNAL_LIBZ
617USE_EXTERNAL_LIBGIF
618USE_EXTERNAL_LIBJPEG
619ALSA_LIBS
620ALSA_CFLAGS
621FREETYPE2_LIB_PATH
622USING_SYSTEM_FT_LIB
623FREETYPE2_LIBS
624FREETYPE2_CFLAGS
625CUPS_CFLAGS
626OPENWIN_HOME
627X_EXTRA_LIBS
628X_LIBS
629X_PRE_LIBS
630X_CFLAGS
631XMKMF
632CXXFLAGS_DEBUG_SYMBOLS
633CFLAGS_DEBUG_SYMBOLS
634ZIP_DEBUGINFO_FILES
635ENABLE_DEBUG_SYMBOLS
636LDFLAGS_CXX_JDK
637LDFLAGS_JDKEXE_SUFFIX
638LDFLAGS_JDKLIB_SUFFIX
639LDFLAGS_JDKEXE
640LDFLAGS_JDKLIB
641CXXFLAGS_JDKEXE
642CXXFLAGS_JDKLIB
643CFLAGS_JDKEXE
644CFLAGS_JDKLIB
645MACOSX_VERSION_MIN
646PACKAGE_PATH
647LEGACY_EXTRA_LDFLAGS
648LEGACY_EXTRA_CXXFLAGS
649LEGACY_EXTRA_CFLAGS
650CXX_FLAG_DEPS
651C_FLAG_DEPS
652CXX_O_FLAG_NONE
653CXX_O_FLAG_NORM
654CXX_O_FLAG_HI
655CXX_O_FLAG_HIGHEST
656C_O_FLAG_NONE
657C_O_FLAG_NORM
658C_O_FLAG_HI
659C_O_FLAG_HIGHEST
660POST_MCS_CMD
661POST_STRIP_CMD
662SET_EXECUTABLE_ORIGIN
663SET_SHARED_LIBRARY_ORIGIN
664CXX_FLAG_REORDER
665C_FLAG_REORDER
666SET_SHARED_LIBRARY_MAPFILE
667SET_SHARED_LIBRARY_NAME
668SHARED_LIBRARY_FLAGS
669EXE_SUFFIX
670STATIC_LIBRARY_SUFFIX
671SHARED_LIBRARY_SUFFIX
672LIBRARY_PREFIX
673STATIC_LIBRARY
674SHARED_LIBRARY
675OBJ_SUFFIX
676LIPO
677ac_ct_OBJDUMP
678OBJDUMP
679ac_ct_OBJCOPY
680OBJCOPY
681MCS
682STRIP
683NM
684AS
685CXXCPP
686CPP
687COMPILER_TYPE
688RC_FLAGS
689DUMPBIN
690WINAR
691HOTSPOT_RC
692HOTSPOT_MT
693RC
694MT
695WINLD
696HOTSPOT_LD
697HOTSPOT_CXX
698ARFLAGS
699AR
700LDEXECXX
701LDCXX
702LDEXE
703LD
704ac_ct_OBJC
705OBJCFLAGS
706OBJC
707ac_ct_CXX
708CXXFLAGS
709CXX
710ac_ct_PROPER_COMPILER_CXX
711PROPER_COMPILER_CXX
712POTENTIAL_CXX
713TOOLS_DIR_CXX
714OBJEXT
715EXEEXT
716ac_ct_CC
717CPPFLAGS
718LDFLAGS
719CFLAGS
720CC
721ac_ct_PROPER_COMPILER_CC
722PROPER_COMPILER_CC
723POTENTIAL_CC
724TOOLS_DIR_CC
725BUILD_LD
726BUILD_CXX
727BUILD_CC
728MSVCR_DLL
729DXSDK_INCLUDE_PATH
730DXSDK_LIB_PATH
731VS_PATH
732VS_LIB
733VS_INCLUDE
734CYGWIN_LINK
735AR_OUT_OPTION
736LD_OUT_OPTION
737EXE_OUT_OPTION
738CC_OUT_OPTION
739BUILD_HOTSPOT
740HOTSPOT_DIST
741BUILD_OUTPUT
742OVERRIDE_SRC_ROOT
743ADD_SRC_ROOT
744JDK_TOPDIR
745NASHORN_TOPDIR
746HOTSPOT_TOPDIR
747JAXWS_TOPDIR
748JAXP_TOPDIR
749CORBA_TOPDIR
750LANGTOOLS_TOPDIR
751BOOT_JDK_JVMARGS
752JAVAC_FLAGS
753BOOT_JDK_SOURCETARGET
754BOOT_JDK
755BOOT_TOOLSJAR
756BOOT_RTJAR
757JAVA_CHECK
758JAVAC_CHECK
759COOKED_BUILD_NUMBER
760JDK_VERSION
761COPYRIGHT_YEAR
762MACOSX_BUNDLE_ID_BASE
763MACOSX_BUNDLE_NAME_BASE
764COMPANY_NAME
765JDK_RC_PLATFORM_NAME
766PRODUCT_SUFFIX
767PRODUCT_NAME
768LAUNCHER_NAME
769MILESTONE
770JDK_BUILD_NUMBER
771JDK_UPDATE_VERSION
772JDK_MICRO_VERSION
773JDK_MINOR_VERSION
774JDK_MAJOR_VERSION
775USER_RELEASE_SUFFIX
776COMPRESS_JARS
777UNLIMITED_CRYPTO
778CACERTS_FILE
779TEST_IN_BUILD
780BUILD_HEADLESS
781SUPPORT_HEADFUL
782SUPPORT_HEADLESS
783BDEPS_FTP
784BDEPS_UNZIP
785OS_VERSION_MICRO
786OS_VERSION_MINOR
787OS_VERSION_MAJOR
788PKG_CONFIG
789TIME
790STAT
791HG
792READELF
793OTOOL
794LDD
795ZIP
796UNZIP
797FIND_DELETE
798MAKE
799CHECK_TOOLSDIR_MAKE
800CHECK_TOOLSDIR_GMAKE
801CHECK_MAKE
802CHECK_GMAKE
803PKGHANDLER
804OUTPUT_ROOT
805CONF_NAME
806SPEC
807BUILD_VARIANT_RELEASE
808DEBUG_CLASSFILES
809FASTDEBUG
810VARIANT
811DEBUG_LEVEL
812MACOSX_UNIVERSAL
813JVM_VARIANT_ZEROSHARK
814JVM_VARIANT_ZERO
815JVM_VARIANT_KERNEL
816JVM_VARIANT_MINIMAL1
817JVM_VARIANT_CLIENT
818JVM_VARIANT_SERVER
819JVM_VARIANTS
820JDK_VARIANT
821SET_OPENJDK
822BUILD_LOG_WRAPPER
823BUILD_LOG_PREVIOUS
824BUILD_LOG
825SYS_ROOT
826PATH_SEP
827SRC_ROOT
828DEFINE_CROSS_COMPILE_ARCH
829LP64
830OPENJDK_TARGET_OS_API_DIR
831OPENJDK_TARGET_CPU_JLI_CFLAGS
832OPENJDK_TARGET_CPU_OSARCH
833OPENJDK_TARGET_CPU_ISADIR
834OPENJDK_TARGET_CPU_LIBDIR
835OPENJDK_TARGET_CPU_LEGACY_LIB
836OPENJDK_TARGET_CPU_LEGACY
837REQUIRED_OS_VERSION
838REQUIRED_OS_NAME
839COMPILE_TYPE
840OPENJDK_TARGET_CPU_ENDIAN
841OPENJDK_TARGET_CPU_BITS
842OPENJDK_TARGET_CPU_ARCH
843OPENJDK_TARGET_CPU
844OPENJDK_TARGET_OS_API
845OPENJDK_TARGET_OS
846OPENJDK_BUILD_CPU_ENDIAN
847OPENJDK_BUILD_CPU_BITS
848OPENJDK_BUILD_CPU_ARCH
849OPENJDK_BUILD_CPU
850OPENJDK_BUILD_OS_API
851OPENJDK_BUILD_OS
852OPENJDK_BUILD_AUTOCONF_NAME
853OPENJDK_TARGET_AUTOCONF_NAME
854target_os
855target_vendor
856target_cpu
857target
858host_os
859host_vendor
860host_cpu
861host
862build_os
863build_vendor
864build_cpu
865build
866SETFILE
867DF
868READLINK
869CYGPATH
870NAWK
871SED
872FGREP
873EGREP
874GREP
875AWK
876XARGS
877WHICH
878WC
879UNIQ
880UNAME
881TR
882TOUCH
883TEE
884TAR
885TAIL
886SORT
887SH
888RM
889THEPWDCMD
890PRINTF
891MV
892MKTEMP
893MKDIR
894LS
895LN
896HEAD
897FIND
898FILE
899EXPR
900ECHO
901DIRNAME
902DIFF
903DATE
904CUT
905CPIO
906CP
907COMM
908CMP
909CHMOD
910CAT
911BASH
912BASENAME
913DATE_WHEN_CONFIGURED
914CONFIGURE_COMMAND_LINE
915CUSTOM_MAKE_DIR
916target_alias
917host_alias
918build_alias
919LIBS
920ECHO_T
921ECHO_N
922ECHO_C
923DEFS
924mandir
925localedir
926libdir
927psdir
928pdfdir
929dvidir
930htmldir
931infodir
932docdir
933oldincludedir
934includedir
935localstatedir
936sharedstatedir
937sysconfdir
938datadir
939datarootdir
940libexecdir
941sbindir
942bindir
943program_transform_name
944prefix
945exec_prefix
946PACKAGE_URL
947PACKAGE_BUGREPORT
948PACKAGE_STRING
949PACKAGE_VERSION
950PACKAGE_TARNAME
951PACKAGE_NAME
952PATH_SEPARATOR
953SHELL'
954ac_subst_files=''
955ac_user_opts='
956enable_option_checking
957with_custom_make_dir
958with_target_bits
959with_sys_root
960with_tools_dir
961with_devkit
962enable_openjdk_only
963with_jdk_variant
964with_jvm_variants
965enable_debug
966with_debug_level
967with_conf_name
968with_builddeps_conf
969with_builddeps_server
970with_builddeps_dir
971with_builddeps_group
972enable_headful
973enable_hotspot_test_in_build
974with_cacerts_file
975enable_unlimited_crypto
976with_milestone
977with_build_number
978with_user_release_suffix
979with_boot_jdk
980with_boot_jdk_jvmargs
981with_add_source_root
982with_override_source_root
983with_adds_and_overrides
984with_override_langtools
985with_override_corba
986with_override_jaxp
987with_override_jaxws
988with_override_hotspot
989with_override_jdk
990with_import_hotspot
991with_msvcr_dll
992with_dxsdk
993with_dxsdk_lib
994with_dxsdk_include
995with_extra_cflags
996with_extra_cxxflags
997with_extra_ldflags
998enable_debug_symbols
999enable_zip_debug_info
1000enable_macosx_runtime_support
1001with_x
1002with_cups
1003with_cups_include
1004with_freetype
1005with_alsa
1006with_alsa_include
1007with_alsa_lib
1008with_zlib
1009with_stdc__lib
1010with_num_cores
1011with_memory_size
1012with_jobs
1013with_sjavac_server_java
1014with_sjavac_server_cores
1015enable_sjavac
1016enable_precompiled_headers
1017enable_ccache
1018with_ccache_dir
1019'
1020      ac_precious_vars='build_alias
1021host_alias
1022target_alias
1023PKG_CONFIG
1024CC
1025CFLAGS
1026LDFLAGS
1027LIBS
1028CPPFLAGS
1029CXX
1030CXXFLAGS
1031CCC
1032OBJC
1033OBJCFLAGS
1034CPP
1035CXXCPP
1036XMKMF
1037FREETYPE2_CFLAGS
1038FREETYPE2_LIBS
1039ALSA_CFLAGS
1040ALSA_LIBS'
1041
1042
1043# Initialize some variables set by options.
1044ac_init_help=
1045ac_init_version=false
1046ac_unrecognized_opts=
1047ac_unrecognized_sep=
1048# The variables have the same names as the options, with
1049# dashes changed to underlines.
1050cache_file=/dev/null
1051exec_prefix=NONE
1052no_create=
1053no_recursion=
1054prefix=NONE
1055program_prefix=NONE
1056program_suffix=NONE
1057program_transform_name=s,x,x,
1058silent=
1059site=
1060srcdir=
1061verbose=
1062x_includes=NONE
1063x_libraries=NONE
1064
1065# Installation directory options.
1066# These are left unexpanded so users can "make install exec_prefix=/foo"
1067# and all the variables that are supposed to be based on exec_prefix
1068# by default will actually change.
1069# Use braces instead of parens because sh, perl, etc. also accept them.
1070# (The list follows the same order as the GNU Coding Standards.)
1071bindir='${exec_prefix}/bin'
1072sbindir='${exec_prefix}/sbin'
1073libexecdir='${exec_prefix}/libexec'
1074datarootdir='${prefix}/share'
1075datadir='${datarootdir}'
1076sysconfdir='${prefix}/etc'
1077sharedstatedir='${prefix}/com'
1078localstatedir='${prefix}/var'
1079includedir='${prefix}/include'
1080oldincludedir='/usr/include'
1081docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1082infodir='${datarootdir}/info'
1083htmldir='${docdir}'
1084dvidir='${docdir}'
1085pdfdir='${docdir}'
1086psdir='${docdir}'
1087libdir='${exec_prefix}/lib'
1088localedir='${datarootdir}/locale'
1089mandir='${datarootdir}/man'
1090
1091ac_prev=
1092ac_dashdash=
1093for ac_option
1094do
1095  # If the previous option needs an argument, assign it.
1096  if test -n "$ac_prev"; then
1097    eval $ac_prev=\$ac_option
1098    ac_prev=
1099    continue
1100  fi
1101
1102  case $ac_option in
1103  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1104  *=)   ac_optarg= ;;
1105  *)    ac_optarg=yes ;;
1106  esac
1107
1108  # Accept the important Cygnus configure options, so we can diagnose typos.
1109
1110  case $ac_dashdash$ac_option in
1111  --)
1112    ac_dashdash=yes ;;
1113
1114  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1115    ac_prev=bindir ;;
1116  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1117    bindir=$ac_optarg ;;
1118
1119  -build | --build | --buil | --bui | --bu)
1120    ac_prev=build_alias ;;
1121  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1122    build_alias=$ac_optarg ;;
1123
1124  -cache-file | --cache-file | --cache-fil | --cache-fi \
1125  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1126    ac_prev=cache_file ;;
1127  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1128  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1129    cache_file=$ac_optarg ;;
1130
1131  --config-cache | -C)
1132    cache_file=config.cache ;;
1133
1134  -datadir | --datadir | --datadi | --datad)
1135    ac_prev=datadir ;;
1136  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1137    datadir=$ac_optarg ;;
1138
1139  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1140  | --dataroo | --dataro | --datar)
1141    ac_prev=datarootdir ;;
1142  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1143  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1144    datarootdir=$ac_optarg ;;
1145
1146  -disable-* | --disable-*)
1147    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1148    # Reject names that are not valid shell variable names.
1149    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1150      as_fn_error $? "invalid feature name: $ac_useropt"
1151    ac_useropt_orig=$ac_useropt
1152    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1153    case $ac_user_opts in
1154      *"
1155"enable_$ac_useropt"
1156"*) ;;
1157      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1158	 ac_unrecognized_sep=', ';;
1159    esac
1160    eval enable_$ac_useropt=no ;;
1161
1162  -docdir | --docdir | --docdi | --doc | --do)
1163    ac_prev=docdir ;;
1164  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1165    docdir=$ac_optarg ;;
1166
1167  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1168    ac_prev=dvidir ;;
1169  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1170    dvidir=$ac_optarg ;;
1171
1172  -enable-* | --enable-*)
1173    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1174    # Reject names that are not valid shell variable names.
1175    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1176      as_fn_error $? "invalid feature name: $ac_useropt"
1177    ac_useropt_orig=$ac_useropt
1178    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179    case $ac_user_opts in
1180      *"
1181"enable_$ac_useropt"
1182"*) ;;
1183      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1184	 ac_unrecognized_sep=', ';;
1185    esac
1186    eval enable_$ac_useropt=\$ac_optarg ;;
1187
1188  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1189  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1190  | --exec | --exe | --ex)
1191    ac_prev=exec_prefix ;;
1192  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1193  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1194  | --exec=* | --exe=* | --ex=*)
1195    exec_prefix=$ac_optarg ;;
1196
1197  -gas | --gas | --ga | --g)
1198    # Obsolete; use --with-gas.
1199    with_gas=yes ;;
1200
1201  -help | --help | --hel | --he | -h)
1202    ac_init_help=long ;;
1203  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1204    ac_init_help=recursive ;;
1205  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1206    ac_init_help=short ;;
1207
1208  -host | --host | --hos | --ho)
1209    ac_prev=host_alias ;;
1210  -host=* | --host=* | --hos=* | --ho=*)
1211    host_alias=$ac_optarg ;;
1212
1213  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1214    ac_prev=htmldir ;;
1215  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1216  | --ht=*)
1217    htmldir=$ac_optarg ;;
1218
1219  -includedir | --includedir | --includedi | --included | --include \
1220  | --includ | --inclu | --incl | --inc)
1221    ac_prev=includedir ;;
1222  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1223  | --includ=* | --inclu=* | --incl=* | --inc=*)
1224    includedir=$ac_optarg ;;
1225
1226  -infodir | --infodir | --infodi | --infod | --info | --inf)
1227    ac_prev=infodir ;;
1228  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1229    infodir=$ac_optarg ;;
1230
1231  -libdir | --libdir | --libdi | --libd)
1232    ac_prev=libdir ;;
1233  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1234    libdir=$ac_optarg ;;
1235
1236  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1237  | --libexe | --libex | --libe)
1238    ac_prev=libexecdir ;;
1239  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1240  | --libexe=* | --libex=* | --libe=*)
1241    libexecdir=$ac_optarg ;;
1242
1243  -localedir | --localedir | --localedi | --localed | --locale)
1244    ac_prev=localedir ;;
1245  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1246    localedir=$ac_optarg ;;
1247
1248  -localstatedir | --localstatedir | --localstatedi | --localstated \
1249  | --localstate | --localstat | --localsta | --localst | --locals)
1250    ac_prev=localstatedir ;;
1251  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1252  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1253    localstatedir=$ac_optarg ;;
1254
1255  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1256    ac_prev=mandir ;;
1257  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1258    mandir=$ac_optarg ;;
1259
1260  -nfp | --nfp | --nf)
1261    # Obsolete; use --without-fp.
1262    with_fp=no ;;
1263
1264  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1265  | --no-cr | --no-c | -n)
1266    no_create=yes ;;
1267
1268  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1269  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1270    no_recursion=yes ;;
1271
1272  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1273  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1274  | --oldin | --oldi | --old | --ol | --o)
1275    ac_prev=oldincludedir ;;
1276  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1277  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1278  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1279    oldincludedir=$ac_optarg ;;
1280
1281  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1282    ac_prev=prefix ;;
1283  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1284    prefix=$ac_optarg ;;
1285
1286  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1287  | --program-pre | --program-pr | --program-p)
1288    ac_prev=program_prefix ;;
1289  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1290  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1291    program_prefix=$ac_optarg ;;
1292
1293  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1294  | --program-suf | --program-su | --program-s)
1295    ac_prev=program_suffix ;;
1296  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1297  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1298    program_suffix=$ac_optarg ;;
1299
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    ac_prev=program_transform_name ;;
1308  -program-transform-name=* | --program-transform-name=* \
1309  | --program-transform-nam=* | --program-transform-na=* \
1310  | --program-transform-n=* | --program-transform-=* \
1311  | --program-transform=* | --program-transfor=* \
1312  | --program-transfo=* | --program-transf=* \
1313  | --program-trans=* | --program-tran=* \
1314  | --progr-tra=* | --program-tr=* | --program-t=*)
1315    program_transform_name=$ac_optarg ;;
1316
1317  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1318    ac_prev=pdfdir ;;
1319  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1320    pdfdir=$ac_optarg ;;
1321
1322  -psdir | --psdir | --psdi | --psd | --ps)
1323    ac_prev=psdir ;;
1324  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1325    psdir=$ac_optarg ;;
1326
1327  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1328  | -silent | --silent | --silen | --sile | --sil)
1329    silent=yes ;;
1330
1331  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1332    ac_prev=sbindir ;;
1333  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1334  | --sbi=* | --sb=*)
1335    sbindir=$ac_optarg ;;
1336
1337  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1338  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1339  | --sharedst | --shareds | --shared | --share | --shar \
1340  | --sha | --sh)
1341    ac_prev=sharedstatedir ;;
1342  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1343  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1344  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1345  | --sha=* | --sh=*)
1346    sharedstatedir=$ac_optarg ;;
1347
1348  -site | --site | --sit)
1349    ac_prev=site ;;
1350  -site=* | --site=* | --sit=*)
1351    site=$ac_optarg ;;
1352
1353  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1354    ac_prev=srcdir ;;
1355  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1356    srcdir=$ac_optarg ;;
1357
1358  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1359  | --syscon | --sysco | --sysc | --sys | --sy)
1360    ac_prev=sysconfdir ;;
1361  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1362  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1363    sysconfdir=$ac_optarg ;;
1364
1365  -target | --target | --targe | --targ | --tar | --ta | --t)
1366    ac_prev=target_alias ;;
1367  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1368    target_alias=$ac_optarg ;;
1369
1370  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1371    verbose=yes ;;
1372
1373  -version | --version | --versio | --versi | --vers | -V)
1374    ac_init_version=: ;;
1375
1376  -with-* | --with-*)
1377    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1378    # Reject names that are not valid shell variable names.
1379    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1380      as_fn_error $? "invalid package name: $ac_useropt"
1381    ac_useropt_orig=$ac_useropt
1382    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1383    case $ac_user_opts in
1384      *"
1385"with_$ac_useropt"
1386"*) ;;
1387      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1388	 ac_unrecognized_sep=', ';;
1389    esac
1390    eval with_$ac_useropt=\$ac_optarg ;;
1391
1392  -without-* | --without-*)
1393    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1394    # Reject names that are not valid shell variable names.
1395    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1396      as_fn_error $? "invalid package name: $ac_useropt"
1397    ac_useropt_orig=$ac_useropt
1398    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1399    case $ac_user_opts in
1400      *"
1401"with_$ac_useropt"
1402"*) ;;
1403      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1404	 ac_unrecognized_sep=', ';;
1405    esac
1406    eval with_$ac_useropt=no ;;
1407
1408  --x)
1409    # Obsolete; use --with-x.
1410    with_x=yes ;;
1411
1412  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1413  | --x-incl | --x-inc | --x-in | --x-i)
1414    ac_prev=x_includes ;;
1415  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1416  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1417    x_includes=$ac_optarg ;;
1418
1419  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1420  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1421    ac_prev=x_libraries ;;
1422  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1423  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1424    x_libraries=$ac_optarg ;;
1425
1426  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1427Try \`$0 --help' for more information"
1428    ;;
1429
1430  *=*)
1431    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1432    # Reject names that are not valid shell variable names.
1433    case $ac_envvar in #(
1434      '' | [0-9]* | *[!_$as_cr_alnum]* )
1435      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1436    esac
1437    eval $ac_envvar=\$ac_optarg
1438    export $ac_envvar ;;
1439
1440  *)
1441    # FIXME: should be removed in autoconf 3.0.
1442    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1443    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1444      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1445    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1446    ;;
1447
1448  esac
1449done
1450
1451if test -n "$ac_prev"; then
1452  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1453  as_fn_error $? "missing argument to $ac_option"
1454fi
1455
1456if test -n "$ac_unrecognized_opts"; then
1457  case $enable_option_checking in
1458    no) ;;
1459    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1460    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1461  esac
1462fi
1463
1464# Check all directory arguments for consistency.
1465for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1466		datadir sysconfdir sharedstatedir localstatedir includedir \
1467		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1468		libdir localedir mandir
1469do
1470  eval ac_val=\$$ac_var
1471  # Remove trailing slashes.
1472  case $ac_val in
1473    */ )
1474      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1475      eval $ac_var=\$ac_val;;
1476  esac
1477  # Be sure to have absolute directory names.
1478  case $ac_val in
1479    [\\/$]* | ?:[\\/]* )  continue;;
1480    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1481  esac
1482  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1483done
1484
1485# There might be people who depend on the old broken behavior: `$host'
1486# used to hold the argument of --host etc.
1487# FIXME: To remove some day.
1488build=$build_alias
1489host=$host_alias
1490target=$target_alias
1491
1492# FIXME: To remove some day.
1493if test "x$host_alias" != x; then
1494  if test "x$build_alias" = x; then
1495    cross_compiling=maybe
1496    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1497    If a cross compiler is detected then cross compile mode will be used" >&2
1498  elif test "x$build_alias" != "x$host_alias"; then
1499    cross_compiling=yes
1500  fi
1501fi
1502
1503ac_tool_prefix=
1504test -n "$host_alias" && ac_tool_prefix=$host_alias-
1505
1506test "$silent" = yes && exec 6>/dev/null
1507
1508
1509ac_pwd=`pwd` && test -n "$ac_pwd" &&
1510ac_ls_di=`ls -di .` &&
1511ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1512  as_fn_error $? "working directory cannot be determined"
1513test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1514  as_fn_error $? "pwd does not report name of working directory"
1515
1516
1517# Find the source files, if location was not specified.
1518if test -z "$srcdir"; then
1519  ac_srcdir_defaulted=yes
1520  # Try the directory containing this script, then the parent directory.
1521  ac_confdir=`$as_dirname -- "$as_myself" ||
1522$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1523	 X"$as_myself" : 'X\(//\)[^/]' \| \
1524	 X"$as_myself" : 'X\(//\)$' \| \
1525	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1526$as_echo X"$as_myself" |
1527    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1528	    s//\1/
1529	    q
1530	  }
1531	  /^X\(\/\/\)[^/].*/{
1532	    s//\1/
1533	    q
1534	  }
1535	  /^X\(\/\/\)$/{
1536	    s//\1/
1537	    q
1538	  }
1539	  /^X\(\/\).*/{
1540	    s//\1/
1541	    q
1542	  }
1543	  s/.*/./; q'`
1544  srcdir=$ac_confdir
1545  if test ! -r "$srcdir/$ac_unique_file"; then
1546    srcdir=..
1547  fi
1548else
1549  ac_srcdir_defaulted=no
1550fi
1551if test ! -r "$srcdir/$ac_unique_file"; then
1552  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1553  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1554fi
1555ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1556ac_abs_confdir=`(
1557	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1558	pwd)`
1559# When building in place, set srcdir=.
1560if test "$ac_abs_confdir" = "$ac_pwd"; then
1561  srcdir=.
1562fi
1563# Remove unnecessary trailing slashes from srcdir.
1564# Double slashes in file names in object file debugging info
1565# mess up M-x gdb in Emacs.
1566case $srcdir in
1567*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1568esac
1569for ac_var in $ac_precious_vars; do
1570  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1571  eval ac_env_${ac_var}_value=\$${ac_var}
1572  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1573  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1574done
1575
1576#
1577# Report the --help message.
1578#
1579if test "$ac_init_help" = "long"; then
1580  # Omit some internal or obsolete options to make the list less imposing.
1581  # This message is too long to be a string in the A/UX 3.1 sh.
1582  cat <<_ACEOF
1583\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1584
1585Usage: $0 [OPTION]... [VAR=VALUE]...
1586
1587To assign environment variables (e.g., CC, CFLAGS...), specify them as
1588VAR=VALUE.  See below for descriptions of some of the useful variables.
1589
1590Defaults for the options are specified in brackets.
1591
1592Configuration:
1593  -h, --help              display this help and exit
1594      --help=short        display options specific to this package
1595      --help=recursive    display the short help of all the included packages
1596  -V, --version           display version information and exit
1597  -q, --quiet, --silent   do not print \`checking ...' messages
1598      --cache-file=FILE   cache test results in FILE [disabled]
1599  -C, --config-cache      alias for \`--cache-file=config.cache'
1600  -n, --no-create         do not create output files
1601      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1602
1603Installation directories:
1604  --prefix=PREFIX         install architecture-independent files in PREFIX
1605                          [$ac_default_prefix]
1606  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1607                          [PREFIX]
1608
1609By default, \`make install' will install all the files in
1610\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1611an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1612for instance \`--prefix=\$HOME'.
1613
1614For better control, use the options below.
1615
1616Fine tuning of the installation directories:
1617  --bindir=DIR            user executables [EPREFIX/bin]
1618  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1619  --libexecdir=DIR        program executables [EPREFIX/libexec]
1620  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1621  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1622  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1623  --libdir=DIR            object code libraries [EPREFIX/lib]
1624  --includedir=DIR        C header files [PREFIX/include]
1625  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1626  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1627  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1628  --infodir=DIR           info documentation [DATAROOTDIR/info]
1629  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1630  --mandir=DIR            man documentation [DATAROOTDIR/man]
1631  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1632  --htmldir=DIR           html documentation [DOCDIR]
1633  --dvidir=DIR            dvi documentation [DOCDIR]
1634  --pdfdir=DIR            pdf documentation [DOCDIR]
1635  --psdir=DIR             ps documentation [DOCDIR]
1636_ACEOF
1637
1638  cat <<\_ACEOF
1639
1640X features:
1641  --x-includes=DIR    X include files are in DIR
1642  --x-libraries=DIR   X library files are in DIR
1643
1644System types:
1645  --build=BUILD     configure for building on BUILD [guessed]
1646  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1647  --target=TARGET   configure for building compilers for TARGET [HOST]
1648_ACEOF
1649fi
1650
1651if test -n "$ac_init_help"; then
1652  case $ac_init_help in
1653     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1654   esac
1655  cat <<\_ACEOF
1656
1657Optional Features:
1658  --disable-option-checking  ignore unrecognized --enable/--with options
1659  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1660  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1661  --enable-openjdk-only   suppress building custom source even if present
1662                          [disabled]
1663  --enable-debug          set the debug level to fastdebug (shorthand for
1664                          --with-debug-level=fastdebug) [disabled]
1665  --disable-headful       disable building headful support (graphical UI
1666                          support) [enabled]
1667  --enable-hotspot-test-in-build
1668                          run the Queens test after Hotspot build [disabled]
1669  --enable-unlimited-crypto
1670                          Enable unlimited crypto policy [disabled]
1671  --disable-debug-symbols disable generation of debug symbols [enabled]
1672  --disable-zip-debug-info
1673                          disable zipping of debug-info files [enabled]
1674  --disable-macosx-runtime-support
1675                          disable the use of MacOSX Java runtime support
1676                          framework [enabled]
1677  --enable-sjavac         use sjavac to do fast incremental compiles
1678                          [disabled]
1679  --disable-precompiled-headers
1680                          disable using precompiled headers when compiling C++
1681                          [enabled]
1682  --disable-ccache        disable using ccache to speed up recompilations
1683                          [enabled]
1684
1685Optional Packages:
1686  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1687  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1688  --with-custom-make-dir  use this directory for custom build/make files
1689  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1690                          support it), e.g. --with-target-bits=32 [guessed]
1691  --with-sys-root         pass this sys-root to the compilers and tools (for
1692                          cross-compiling)
1693  --with-tools-dir        search this directory for compilers and tools (for
1694                          cross-compiling)
1695  --with-devkit           use this directory as base for tools-dir and
1696                          sys-root (for cross-compiling)
1697  --with-jdk-variant      JDK variant to build (normal) [normal]
1698  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1699                          client, minimal1, kernel, zero, zeroshark) [server]
1700  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1701                          [release]
1702  --with-conf-name        use this as the name of the configuration [generated
1703                          from important configuration options]
1704  --with-builddeps-conf   use this configuration file for the builddeps
1705  --with-builddeps-server download and use build dependencies from this server
1706                          url
1707  --with-builddeps-dir    store downloaded build dependencies here
1708                          [/localhome/builddeps]
1709  --with-builddeps-group  chgrp the downloaded build dependencies to this
1710                          group
1711  --with-cacerts-file     specify alternative cacerts file
1712  --with-milestone        Set milestone value for build [internal]
1713  --with-build-number     Set build number value for build [b00]
1714  --with-user-release-suffix
1715                          Add a custom string to the version string if build
1716                          number isn't set.[username_builddateb00]
1717  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1718  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1719                          invocations of the Boot JDK, overriding the default
1720                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1721                          -enableassertions"
1722  --with-add-source-root  for each and every source directory, look in this
1723                          additional source root for the same directory; if it
1724                          exists and have files in it, include it in the build
1725  --with-override-source-root
1726                          for each and every source directory, look in this
1727                          override source root for the same directory; if it
1728                          exists, use that directory instead and ignore the
1729                          directory in the original source root
1730  --with-adds-and-overrides
1731                          use the subdirs 'adds' and 'overrides' in the
1732                          specified directory as add-source-root and
1733                          override-source-root
1734  --with-override-langtools
1735                          use this langtools dir for the build
1736  --with-override-corba   use this corba dir for the build
1737  --with-override-jaxp    use this jaxp dir for the build
1738  --with-override-jaxws   use this jaxws dir for the build
1739  --with-override-hotspot use this hotspot dir for the build
1740  --with-override-jdk     use this jdk dir for the build
1741  --with-import-hotspot   import hotspot binaries from this jdk image or
1742                          hotspot build dist dir instead of building from
1743                          source
1744  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1745                          only) [probed]
1746  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1747  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1748                          [probed]
1749  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1750                          [probed]
1751  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1752  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1753  --with-extra-ldflags    extra flags to be used when linking jdk
1754  --with-x                use the X Window System
1755  --with-cups             specify prefix directory for the cups package
1756                          (expecting the headers under PATH/include)
1757  --with-cups-include     specify directory for the cups include files
1758  --with-freetype         specify prefix directory for the freetype2 package
1759                          (expecting the libraries under PATH/lib and the
1760                          headers under PATH/include)
1761  --with-alsa             specify prefix directory for the alsa package
1762                          (expecting the libraries under PATH/lib and the
1763                          headers under PATH/include)
1764  --with-alsa-include     specify directory for the alsa include files
1765  --with-alsa-lib         specify directory for the alsa library
1766  --with-zlib             use zlib from build system or OpenJDK source
1767                          (system, bundled) [bundled]
1768  --with-stdc++lib=<static>,<dynamic>,<default>
1769                          force linking of the C++ runtime on Linux to either
1770                          static or dynamic, default is static with dynamic as
1771                          fallback
1772  --with-num-cores        number of cores in the build system, e.g.
1773                          --with-num-cores=8 [probed]
1774  --with-memory-size      memory (in MB) available in the build system, e.g.
1775                          --with-memory-size=1024 [probed]
1776  --with-jobs             number of parallel jobs to let make run [calculated
1777                          based on cores and memory]
1778  --with-sjavac-server-java
1779                          use this java binary for running the sjavac
1780                          background server [Boot JDK java]
1781  --with-sjavac-server-cores
1782                          use at most this number of concurrent threads on the
1783                          sjavac server [probed]
1784  --with-ccache-dir       where to store ccache files [~/.ccache]
1785
1786Some influential environment variables:
1787  PKG_CONFIG  path to pkg-config utility
1788  CC          C compiler command
1789  CFLAGS      C compiler flags
1790  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1791              nonstandard directory <lib dir>
1792  LIBS        libraries to pass to the linker, e.g. -l<library>
1793  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1794              you have headers in a nonstandard directory <include dir>
1795  CXX         C++ compiler command
1796  CXXFLAGS    C++ compiler flags
1797  OBJC        Objective C compiler command
1798  OBJCFLAGS   Objective C compiler flags
1799  CPP         C preprocessor
1800  CXXCPP      C++ preprocessor
1801  XMKMF       Path to xmkmf, Makefile generator for X Window System
1802  FREETYPE2_CFLAGS
1803              C compiler flags for FREETYPE2, overriding pkg-config
1804  FREETYPE2_LIBS
1805              linker flags for FREETYPE2, overriding pkg-config
1806  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1807  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1808
1809Use these variables to override the choices made by `configure' or to help
1810it to find libraries and programs with nonstandard names/locations.
1811
1812Report bugs to <build-dev@openjdk.java.net>.
1813OpenJDK home page: <http://openjdk.java.net>.
1814_ACEOF
1815ac_status=$?
1816fi
1817
1818if test "$ac_init_help" = "recursive"; then
1819  # If there are subdirs, report their specific --help.
1820  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1821    test -d "$ac_dir" ||
1822      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1823      continue
1824    ac_builddir=.
1825
1826case "$ac_dir" in
1827.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1828*)
1829  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1830  # A ".." for each directory in $ac_dir_suffix.
1831  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1832  case $ac_top_builddir_sub in
1833  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1834  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1835  esac ;;
1836esac
1837ac_abs_top_builddir=$ac_pwd
1838ac_abs_builddir=$ac_pwd$ac_dir_suffix
1839# for backward compatibility:
1840ac_top_builddir=$ac_top_build_prefix
1841
1842case $srcdir in
1843  .)  # We are building in place.
1844    ac_srcdir=.
1845    ac_top_srcdir=$ac_top_builddir_sub
1846    ac_abs_top_srcdir=$ac_pwd ;;
1847  [\\/]* | ?:[\\/]* )  # Absolute name.
1848    ac_srcdir=$srcdir$ac_dir_suffix;
1849    ac_top_srcdir=$srcdir
1850    ac_abs_top_srcdir=$srcdir ;;
1851  *) # Relative name.
1852    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1853    ac_top_srcdir=$ac_top_build_prefix$srcdir
1854    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1855esac
1856ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1857
1858    cd "$ac_dir" || { ac_status=$?; continue; }
1859    # Check for guested configure.
1860    if test -f "$ac_srcdir/configure.gnu"; then
1861      echo &&
1862      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1863    elif test -f "$ac_srcdir/configure"; then
1864      echo &&
1865      $SHELL "$ac_srcdir/configure" --help=recursive
1866    else
1867      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1868    fi || ac_status=$?
1869    cd "$ac_pwd" || { ac_status=$?; break; }
1870  done
1871fi
1872
1873test -n "$ac_init_help" && exit $ac_status
1874if $ac_init_version; then
1875  cat <<\_ACEOF
1876OpenJDK configure jdk8
1877generated by GNU Autoconf 2.67
1878
1879Copyright (C) 2010 Free Software Foundation, Inc.
1880This configure script is free software; the Free Software Foundation
1881gives unlimited permission to copy, distribute and modify it.
1882_ACEOF
1883  exit
1884fi
1885
1886## ------------------------ ##
1887## Autoconf initialization. ##
1888## ------------------------ ##
1889
1890# ac_fn_c_try_compile LINENO
1891# --------------------------
1892# Try to compile conftest.$ac_ext, and return whether this succeeded.
1893ac_fn_c_try_compile ()
1894{
1895  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896  rm -f conftest.$ac_objext
1897  if { { ac_try="$ac_compile"
1898case "(($ac_try" in
1899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900  *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904  (eval "$ac_compile") 2>conftest.err
1905  ac_status=$?
1906  if test -s conftest.err; then
1907    grep -v '^ *+' conftest.err >conftest.er1
1908    cat conftest.er1 >&5
1909    mv -f conftest.er1 conftest.err
1910  fi
1911  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912  test $ac_status = 0; } && {
1913	 test -z "$ac_c_werror_flag" ||
1914	 test ! -s conftest.err
1915       } && test -s conftest.$ac_objext; then :
1916  ac_retval=0
1917else
1918  $as_echo "$as_me: failed program was:" >&5
1919sed 's/^/| /' conftest.$ac_ext >&5
1920
1921	ac_retval=1
1922fi
1923  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1924  as_fn_set_status $ac_retval
1925
1926} # ac_fn_c_try_compile
1927
1928# ac_fn_cxx_try_compile LINENO
1929# ----------------------------
1930# Try to compile conftest.$ac_ext, and return whether this succeeded.
1931ac_fn_cxx_try_compile ()
1932{
1933  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934  rm -f conftest.$ac_objext
1935  if { { ac_try="$ac_compile"
1936case "(($ac_try" in
1937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1938  *) ac_try_echo=$ac_try;;
1939esac
1940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1941$as_echo "$ac_try_echo"; } >&5
1942  (eval "$ac_compile") 2>conftest.err
1943  ac_status=$?
1944  if test -s conftest.err; then
1945    grep -v '^ *+' conftest.err >conftest.er1
1946    cat conftest.er1 >&5
1947    mv -f conftest.er1 conftest.err
1948  fi
1949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950  test $ac_status = 0; } && {
1951	 test -z "$ac_cxx_werror_flag" ||
1952	 test ! -s conftest.err
1953       } && test -s conftest.$ac_objext; then :
1954  ac_retval=0
1955else
1956  $as_echo "$as_me: failed program was:" >&5
1957sed 's/^/| /' conftest.$ac_ext >&5
1958
1959	ac_retval=1
1960fi
1961  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1962  as_fn_set_status $ac_retval
1963
1964} # ac_fn_cxx_try_compile
1965
1966# ac_fn_objc_try_compile LINENO
1967# -----------------------------
1968# Try to compile conftest.$ac_ext, and return whether this succeeded.
1969ac_fn_objc_try_compile ()
1970{
1971  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972  rm -f conftest.$ac_objext
1973  if { { ac_try="$ac_compile"
1974case "(($ac_try" in
1975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976  *) ac_try_echo=$ac_try;;
1977esac
1978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979$as_echo "$ac_try_echo"; } >&5
1980  (eval "$ac_compile") 2>conftest.err
1981  ac_status=$?
1982  if test -s conftest.err; then
1983    grep -v '^ *+' conftest.err >conftest.er1
1984    cat conftest.er1 >&5
1985    mv -f conftest.er1 conftest.err
1986  fi
1987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988  test $ac_status = 0; } && {
1989	 test -z "$ac_objc_werror_flag" ||
1990	 test ! -s conftest.err
1991       } && test -s conftest.$ac_objext; then :
1992  ac_retval=0
1993else
1994  $as_echo "$as_me: failed program was:" >&5
1995sed 's/^/| /' conftest.$ac_ext >&5
1996
1997	ac_retval=1
1998fi
1999  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000  as_fn_set_status $ac_retval
2001
2002} # ac_fn_objc_try_compile
2003
2004# ac_fn_c_try_cpp LINENO
2005# ----------------------
2006# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2007ac_fn_c_try_cpp ()
2008{
2009  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010  if { { ac_try="$ac_cpp conftest.$ac_ext"
2011case "(($ac_try" in
2012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013  *) ac_try_echo=$ac_try;;
2014esac
2015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016$as_echo "$ac_try_echo"; } >&5
2017  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2018  ac_status=$?
2019  if test -s conftest.err; then
2020    grep -v '^ *+' conftest.err >conftest.er1
2021    cat conftest.er1 >&5
2022    mv -f conftest.er1 conftest.err
2023  fi
2024  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2025  test $ac_status = 0; } > conftest.i && {
2026	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2027	 test ! -s conftest.err
2028       }; then :
2029  ac_retval=0
2030else
2031  $as_echo "$as_me: failed program was:" >&5
2032sed 's/^/| /' conftest.$ac_ext >&5
2033
2034    ac_retval=1
2035fi
2036  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2037  as_fn_set_status $ac_retval
2038
2039} # ac_fn_c_try_cpp
2040
2041# ac_fn_cxx_try_cpp LINENO
2042# ------------------------
2043# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2044ac_fn_cxx_try_cpp ()
2045{
2046  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2047  if { { ac_try="$ac_cpp conftest.$ac_ext"
2048case "(($ac_try" in
2049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2050  *) ac_try_echo=$ac_try;;
2051esac
2052eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2053$as_echo "$ac_try_echo"; } >&5
2054  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2055  ac_status=$?
2056  if test -s conftest.err; then
2057    grep -v '^ *+' conftest.err >conftest.er1
2058    cat conftest.er1 >&5
2059    mv -f conftest.er1 conftest.err
2060  fi
2061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2062  test $ac_status = 0; } > conftest.i && {
2063	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2064	 test ! -s conftest.err
2065       }; then :
2066  ac_retval=0
2067else
2068  $as_echo "$as_me: failed program was:" >&5
2069sed 's/^/| /' conftest.$ac_ext >&5
2070
2071    ac_retval=1
2072fi
2073  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2074  as_fn_set_status $ac_retval
2075
2076} # ac_fn_cxx_try_cpp
2077
2078# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2079# ---------------------------------------------------------
2080# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2081# the include files in INCLUDES and setting the cache variable VAR
2082# accordingly.
2083ac_fn_cxx_check_header_mongrel ()
2084{
2085  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086  if eval "test \"\${$3+set}\"" = set; then :
2087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2088$as_echo_n "checking for $2... " >&6; }
2089if eval "test \"\${$3+set}\"" = set; then :
2090  $as_echo_n "(cached) " >&6
2091fi
2092eval ac_res=\$$3
2093	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2094$as_echo "$ac_res" >&6; }
2095else
2096  # Is the header compilable?
2097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2098$as_echo_n "checking $2 usability... " >&6; }
2099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h.  */
2101$4
2102#include <$2>
2103_ACEOF
2104if ac_fn_cxx_try_compile "$LINENO"; then :
2105  ac_header_compiler=yes
2106else
2107  ac_header_compiler=no
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2111$as_echo "$ac_header_compiler" >&6; }
2112
2113# Is the header present?
2114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2115$as_echo_n "checking $2 presence... " >&6; }
2116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h.  */
2118#include <$2>
2119_ACEOF
2120if ac_fn_cxx_try_cpp "$LINENO"; then :
2121  ac_header_preproc=yes
2122else
2123  ac_header_preproc=no
2124fi
2125rm -f conftest.err conftest.i conftest.$ac_ext
2126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2127$as_echo "$ac_header_preproc" >&6; }
2128
2129# So?  What about this header?
2130case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2131  yes:no: )
2132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2133$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2135$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2136    ;;
2137  no:yes:* )
2138    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2139$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2140    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2141$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2142    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2143$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2145$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2147$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2148( $as_echo "## ----------------------------------------- ##
2149## Report this to build-dev@openjdk.java.net ##
2150## ----------------------------------------- ##"
2151     ) | sed "s/^/$as_me: WARNING:     /" >&2
2152    ;;
2153esac
2154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2155$as_echo_n "checking for $2... " >&6; }
2156if eval "test \"\${$3+set}\"" = set; then :
2157  $as_echo_n "(cached) " >&6
2158else
2159  eval "$3=\$ac_header_compiler"
2160fi
2161eval ac_res=\$$3
2162	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2163$as_echo "$ac_res" >&6; }
2164fi
2165  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2166
2167} # ac_fn_cxx_check_header_mongrel
2168
2169# ac_fn_cxx_try_run LINENO
2170# ------------------------
2171# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2172# that executables *can* be run.
2173ac_fn_cxx_try_run ()
2174{
2175  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176  if { { ac_try="$ac_link"
2177case "(($ac_try" in
2178  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2179  *) ac_try_echo=$ac_try;;
2180esac
2181eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2182$as_echo "$ac_try_echo"; } >&5
2183  (eval "$ac_link") 2>&5
2184  ac_status=$?
2185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2186  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2187  { { case "(($ac_try" in
2188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2189  *) ac_try_echo=$ac_try;;
2190esac
2191eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2192$as_echo "$ac_try_echo"; } >&5
2193  (eval "$ac_try") 2>&5
2194  ac_status=$?
2195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2196  test $ac_status = 0; }; }; then :
2197  ac_retval=0
2198else
2199  $as_echo "$as_me: program exited with status $ac_status" >&5
2200       $as_echo "$as_me: failed program was:" >&5
2201sed 's/^/| /' conftest.$ac_ext >&5
2202
2203       ac_retval=$ac_status
2204fi
2205  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2206  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2207  as_fn_set_status $ac_retval
2208
2209} # ac_fn_cxx_try_run
2210
2211# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2212# ---------------------------------------------------------
2213# Tests whether HEADER exists and can be compiled using the include files in
2214# INCLUDES, setting the cache variable VAR accordingly.
2215ac_fn_cxx_check_header_compile ()
2216{
2217  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2219$as_echo_n "checking for $2... " >&6; }
2220if eval "test \"\${$3+set}\"" = set; then :
2221  $as_echo_n "(cached) " >&6
2222else
2223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h.  */
2225$4
2226#include <$2>
2227_ACEOF
2228if ac_fn_cxx_try_compile "$LINENO"; then :
2229  eval "$3=yes"
2230else
2231  eval "$3=no"
2232fi
2233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2234fi
2235eval ac_res=\$$3
2236	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2237$as_echo "$ac_res" >&6; }
2238  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2239
2240} # ac_fn_cxx_check_header_compile
2241
2242# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2243# ----------------------------------------------
2244# Tries to find the compile-time value of EXPR in a program that includes
2245# INCLUDES, setting VAR accordingly. Returns whether the value could be
2246# computed
2247ac_fn_cxx_compute_int ()
2248{
2249  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250  if test "$cross_compiling" = yes; then
2251    # Depending upon the size, compute the lo and hi bounds.
2252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h.  */
2254$4
2255int
2256main ()
2257{
2258static int test_array [1 - 2 * !(($2) >= 0)];
2259test_array [0] = 0
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_cxx_try_compile "$LINENO"; then :
2266  ac_lo=0 ac_mid=0
2267  while :; do
2268    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_hi=$ac_mid; break
2283else
2284  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2285			if test $ac_lo -le $ac_mid; then
2286			  ac_lo= ac_hi=
2287			  break
2288			fi
2289			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292  done
2293else
2294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h.  */
2296$4
2297int
2298main ()
2299{
2300static int test_array [1 - 2 * !(($2) < 0)];
2301test_array [0] = 0
2302
2303  ;
2304  return 0;
2305}
2306_ACEOF
2307if ac_fn_cxx_try_compile "$LINENO"; then :
2308  ac_hi=-1 ac_mid=-1
2309  while :; do
2310    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h.  */
2312$4
2313int
2314main ()
2315{
2316static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2317test_array [0] = 0
2318
2319  ;
2320  return 0;
2321}
2322_ACEOF
2323if ac_fn_cxx_try_compile "$LINENO"; then :
2324  ac_lo=$ac_mid; break
2325else
2326  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2327			if test $ac_mid -le $ac_hi; then
2328			  ac_lo= ac_hi=
2329			  break
2330			fi
2331			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334  done
2335else
2336  ac_lo= ac_hi=
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341# Binary search between lo and hi bounds.
2342while test "x$ac_lo" != "x$ac_hi"; do
2343  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345/* end confdefs.h.  */
2346$4
2347int
2348main ()
2349{
2350static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2351test_array [0] = 0
2352
2353  ;
2354  return 0;
2355}
2356_ACEOF
2357if ac_fn_cxx_try_compile "$LINENO"; then :
2358  ac_hi=$ac_mid
2359else
2360  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363done
2364case $ac_lo in #((
2365?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2366'') ac_retval=1 ;;
2367esac
2368  else
2369    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h.  */
2371$4
2372static long int longval () { return $2; }
2373static unsigned long int ulongval () { return $2; }
2374#include <stdio.h>
2375#include <stdlib.h>
2376int
2377main ()
2378{
2379
2380  FILE *f = fopen ("conftest.val", "w");
2381  if (! f)
2382    return 1;
2383  if (($2) < 0)
2384    {
2385      long int i = longval ();
2386      if (i != ($2))
2387	return 1;
2388      fprintf (f, "%ld", i);
2389    }
2390  else
2391    {
2392      unsigned long int i = ulongval ();
2393      if (i != ($2))
2394	return 1;
2395      fprintf (f, "%lu", i);
2396    }
2397  /* Do not output a trailing newline, as this causes \r\n confusion
2398     on some platforms.  */
2399  return ferror (f) || fclose (f) != 0;
2400
2401  ;
2402  return 0;
2403}
2404_ACEOF
2405if ac_fn_cxx_try_run "$LINENO"; then :
2406  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2407else
2408  ac_retval=1
2409fi
2410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2411  conftest.$ac_objext conftest.beam conftest.$ac_ext
2412rm -f conftest.val
2413
2414  fi
2415  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2416  as_fn_set_status $ac_retval
2417
2418} # ac_fn_cxx_compute_int
2419
2420# ac_fn_cxx_try_link LINENO
2421# -------------------------
2422# Try to link conftest.$ac_ext, and return whether this succeeded.
2423ac_fn_cxx_try_link ()
2424{
2425  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426  rm -f conftest.$ac_objext conftest$ac_exeext
2427  if { { ac_try="$ac_link"
2428case "(($ac_try" in
2429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2430  *) ac_try_echo=$ac_try;;
2431esac
2432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2433$as_echo "$ac_try_echo"; } >&5
2434  (eval "$ac_link") 2>conftest.err
2435  ac_status=$?
2436  if test -s conftest.err; then
2437    grep -v '^ *+' conftest.err >conftest.er1
2438    cat conftest.er1 >&5
2439    mv -f conftest.er1 conftest.err
2440  fi
2441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442  test $ac_status = 0; } && {
2443	 test -z "$ac_cxx_werror_flag" ||
2444	 test ! -s conftest.err
2445       } && test -s conftest$ac_exeext && {
2446	 test "$cross_compiling" = yes ||
2447	 $as_test_x conftest$ac_exeext
2448       }; then :
2449  ac_retval=0
2450else
2451  $as_echo "$as_me: failed program was:" >&5
2452sed 's/^/| /' conftest.$ac_ext >&5
2453
2454	ac_retval=1
2455fi
2456  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2457  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2458  # interfere with the next link command; also delete a directory that is
2459  # left behind by Apple's compiler.  We do this before executing the actions.
2460  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2461  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2462  as_fn_set_status $ac_retval
2463
2464} # ac_fn_cxx_try_link
2465
2466# ac_fn_cxx_check_func LINENO FUNC VAR
2467# ------------------------------------
2468# Tests whether FUNC exists, setting the cache variable VAR accordingly
2469ac_fn_cxx_check_func ()
2470{
2471  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
2474if eval "test \"\${$3+set}\"" = set; then :
2475  $as_echo_n "(cached) " >&6
2476else
2477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h.  */
2479/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2480   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2481#define $2 innocuous_$2
2482
2483/* System header to define __stub macros and hopefully few prototypes,
2484    which can conflict with char $2 (); below.
2485    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2486    <limits.h> exists even on freestanding compilers.  */
2487
2488#ifdef __STDC__
2489# include <limits.h>
2490#else
2491# include <assert.h>
2492#endif
2493
2494#undef $2
2495
2496/* Override any GCC internal prototype to avoid an error.
2497   Use char because int might match the return type of a GCC
2498   builtin and then its argument prototype would still apply.  */
2499#ifdef __cplusplus
2500extern "C"
2501#endif
2502char $2 ();
2503/* The GNU C library defines this for functions which it implements
2504    to always fail with ENOSYS.  Some functions are actually named
2505    something starting with __ and the normal name is an alias.  */
2506#if defined __stub_$2 || defined __stub___$2
2507choke me
2508#endif
2509
2510int
2511main ()
2512{
2513return $2 ();
2514  ;
2515  return 0;
2516}
2517_ACEOF
2518if ac_fn_cxx_try_link "$LINENO"; then :
2519  eval "$3=yes"
2520else
2521  eval "$3=no"
2522fi
2523rm -f core conftest.err conftest.$ac_objext \
2524    conftest$ac_exeext conftest.$ac_ext
2525fi
2526eval ac_res=\$$3
2527	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2528$as_echo "$ac_res" >&6; }
2529  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2530
2531} # ac_fn_cxx_check_func
2532
2533# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2534# -------------------------------------------------------
2535# Tests whether HEADER exists and can be compiled using the include files in
2536# INCLUDES, setting the cache variable VAR accordingly.
2537ac_fn_c_check_header_compile ()
2538{
2539  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2541$as_echo_n "checking for $2... " >&6; }
2542if eval "test \"\${$3+set}\"" = set; then :
2543  $as_echo_n "(cached) " >&6
2544else
2545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546/* end confdefs.h.  */
2547$4
2548#include <$2>
2549_ACEOF
2550if ac_fn_c_try_compile "$LINENO"; then :
2551  eval "$3=yes"
2552else
2553  eval "$3=no"
2554fi
2555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2556fi
2557eval ac_res=\$$3
2558	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2559$as_echo "$ac_res" >&6; }
2560  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2561
2562} # ac_fn_c_check_header_compile
2563cat >config.log <<_ACEOF
2564This file contains any messages produced by compilers while
2565running configure, to aid debugging if configure makes a mistake.
2566
2567It was created by OpenJDK $as_me jdk8, which was
2568generated by GNU Autoconf 2.67.  Invocation command line was
2569
2570  $ $0 $@
2571
2572_ACEOF
2573exec 5>>config.log
2574{
2575cat <<_ASUNAME
2576## --------- ##
2577## Platform. ##
2578## --------- ##
2579
2580hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2581uname -m = `(uname -m) 2>/dev/null || echo unknown`
2582uname -r = `(uname -r) 2>/dev/null || echo unknown`
2583uname -s = `(uname -s) 2>/dev/null || echo unknown`
2584uname -v = `(uname -v) 2>/dev/null || echo unknown`
2585
2586/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2587/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2588
2589/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2590/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2591/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2592/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2593/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2594/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2595/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2596
2597_ASUNAME
2598
2599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2600for as_dir in $PATH
2601do
2602  IFS=$as_save_IFS
2603  test -z "$as_dir" && as_dir=.
2604    $as_echo "PATH: $as_dir"
2605  done
2606IFS=$as_save_IFS
2607
2608} >&5
2609
2610cat >&5 <<_ACEOF
2611
2612
2613## ----------- ##
2614## Core tests. ##
2615## ----------- ##
2616
2617_ACEOF
2618
2619
2620# Keep a trace of the command line.
2621# Strip out --no-create and --no-recursion so they do not pile up.
2622# Strip out --silent because we don't want to record it for future runs.
2623# Also quote any args containing shell meta-characters.
2624# Make two passes to allow for proper duplicate-argument suppression.
2625ac_configure_args=
2626ac_configure_args0=
2627ac_configure_args1=
2628ac_must_keep_next=false
2629for ac_pass in 1 2
2630do
2631  for ac_arg
2632  do
2633    case $ac_arg in
2634    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2635    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2636    | -silent | --silent | --silen | --sile | --sil)
2637      continue ;;
2638    *\'*)
2639      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2640    esac
2641    case $ac_pass in
2642    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2643    2)
2644      as_fn_append ac_configure_args1 " '$ac_arg'"
2645      if test $ac_must_keep_next = true; then
2646	ac_must_keep_next=false # Got value, back to normal.
2647      else
2648	case $ac_arg in
2649	  *=* | --config-cache | -C | -disable-* | --disable-* \
2650	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2651	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2652	  | -with-* | --with-* | -without-* | --without-* | --x)
2653	    case "$ac_configure_args0 " in
2654	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2655	    esac
2656	    ;;
2657	  -* ) ac_must_keep_next=true ;;
2658	esac
2659      fi
2660      as_fn_append ac_configure_args " '$ac_arg'"
2661      ;;
2662    esac
2663  done
2664done
2665{ ac_configure_args0=; unset ac_configure_args0;}
2666{ ac_configure_args1=; unset ac_configure_args1;}
2667
2668# When interrupted or exit'd, cleanup temporary files, and complete
2669# config.log.  We remove comments because anyway the quotes in there
2670# would cause problems or look ugly.
2671# WARNING: Use '\'' to represent an apostrophe within the trap.
2672# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2673trap 'exit_status=$?
2674  # Save into config.log some information that might help in debugging.
2675  {
2676    echo
2677
2678    $as_echo "## ---------------- ##
2679## Cache variables. ##
2680## ---------------- ##"
2681    echo
2682    # The following way of writing the cache mishandles newlines in values,
2683(
2684  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2685    eval ac_val=\$$ac_var
2686    case $ac_val in #(
2687    *${as_nl}*)
2688      case $ac_var in #(
2689      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2690$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2691      esac
2692      case $ac_var in #(
2693      _ | IFS | as_nl) ;; #(
2694      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2695      *) { eval $ac_var=; unset $ac_var;} ;;
2696      esac ;;
2697    esac
2698  done
2699  (set) 2>&1 |
2700    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2701    *${as_nl}ac_space=\ *)
2702      sed -n \
2703	"s/'\''/'\''\\\\'\'''\''/g;
2704	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2705      ;; #(
2706    *)
2707      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2708      ;;
2709    esac |
2710    sort
2711)
2712    echo
2713
2714    $as_echo "## ----------------- ##
2715## Output variables. ##
2716## ----------------- ##"
2717    echo
2718    for ac_var in $ac_subst_vars
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
2728    if test -n "$ac_subst_files"; then
2729      $as_echo "## ------------------- ##
2730## File substitutions. ##
2731## ------------------- ##"
2732      echo
2733      for ac_var in $ac_subst_files
2734      do
2735	eval ac_val=\$$ac_var
2736	case $ac_val in
2737	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2738	esac
2739	$as_echo "$ac_var='\''$ac_val'\''"
2740      done | sort
2741      echo
2742    fi
2743
2744    if test -s confdefs.h; then
2745      $as_echo "## ----------- ##
2746## confdefs.h. ##
2747## ----------- ##"
2748      echo
2749      cat confdefs.h
2750      echo
2751    fi
2752    test "$ac_signal" != 0 &&
2753      $as_echo "$as_me: caught signal $ac_signal"
2754    $as_echo "$as_me: exit $exit_status"
2755  } >&5
2756  rm -f core *.core core.conftest.* &&
2757    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2758    exit $exit_status
2759' 0
2760for ac_signal in 1 2 13 15; do
2761  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2762done
2763ac_signal=0
2764
2765# confdefs.h avoids OS command line length limits that DEFS can exceed.
2766rm -f -r conftest* confdefs.h
2767
2768$as_echo "/* confdefs.h */" > confdefs.h
2769
2770# Predefined preprocessor variables.
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_NAME "$PACKAGE_NAME"
2774_ACEOF
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2778_ACEOF
2779
2780cat >>confdefs.h <<_ACEOF
2781#define PACKAGE_VERSION "$PACKAGE_VERSION"
2782_ACEOF
2783
2784cat >>confdefs.h <<_ACEOF
2785#define PACKAGE_STRING "$PACKAGE_STRING"
2786_ACEOF
2787
2788cat >>confdefs.h <<_ACEOF
2789#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2790_ACEOF
2791
2792cat >>confdefs.h <<_ACEOF
2793#define PACKAGE_URL "$PACKAGE_URL"
2794_ACEOF
2795
2796
2797# Let the site file select an alternate cache file if it wants to.
2798# Prefer an explicitly selected file to automatically selected ones.
2799ac_site_file1=NONE
2800ac_site_file2=NONE
2801if test -n "$CONFIG_SITE"; then
2802  # We do not want a PATH search for config.site.
2803  case $CONFIG_SITE in #((
2804    -*)  ac_site_file1=./$CONFIG_SITE;;
2805    */*) ac_site_file1=$CONFIG_SITE;;
2806    *)   ac_site_file1=./$CONFIG_SITE;;
2807  esac
2808elif test "x$prefix" != xNONE; then
2809  ac_site_file1=$prefix/share/config.site
2810  ac_site_file2=$prefix/etc/config.site
2811else
2812  ac_site_file1=$ac_default_prefix/share/config.site
2813  ac_site_file2=$ac_default_prefix/etc/config.site
2814fi
2815for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2816do
2817  test "x$ac_site_file" = xNONE && continue
2818  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2819    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2820$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2821    sed 's/^/| /' "$ac_site_file" >&5
2822    . "$ac_site_file" \
2823      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2825as_fn_error $? "failed to load site script $ac_site_file
2826See \`config.log' for more details" "$LINENO" 5; }
2827  fi
2828done
2829
2830if test -r "$cache_file"; then
2831  # Some versions of bash will fail to source /dev/null (special files
2832  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2833  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2834    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2835$as_echo "$as_me: loading cache $cache_file" >&6;}
2836    case $cache_file in
2837      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2838      *)                      . "./$cache_file";;
2839    esac
2840  fi
2841else
2842  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2843$as_echo "$as_me: creating cache $cache_file" >&6;}
2844  >$cache_file
2845fi
2846
2847# Check that the precious variables saved in the cache have kept the same
2848# value.
2849ac_cache_corrupted=false
2850for ac_var in $ac_precious_vars; do
2851  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2852  eval ac_new_set=\$ac_env_${ac_var}_set
2853  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2854  eval ac_new_val=\$ac_env_${ac_var}_value
2855  case $ac_old_set,$ac_new_set in
2856    set,)
2857      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2858$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2859      ac_cache_corrupted=: ;;
2860    ,set)
2861      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2862$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2863      ac_cache_corrupted=: ;;
2864    ,);;
2865    *)
2866      if test "x$ac_old_val" != "x$ac_new_val"; then
2867	# differences in whitespace do not lead to failure.
2868	ac_old_val_w=`echo x $ac_old_val`
2869	ac_new_val_w=`echo x $ac_new_val`
2870	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2871	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2872$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2873	  ac_cache_corrupted=:
2874	else
2875	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2876$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2877	  eval $ac_var=\$ac_old_val
2878	fi
2879	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2880$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2881	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2882$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2883      fi;;
2884  esac
2885  # Pass precious variables to config.status.
2886  if test "$ac_new_set" = set; then
2887    case $ac_new_val in
2888    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2889    *) ac_arg=$ac_var=$ac_new_val ;;
2890    esac
2891    case " $ac_configure_args " in
2892      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2893      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2894    esac
2895  fi
2896done
2897if $ac_cache_corrupted; then
2898  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2900  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2901$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2902  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2903fi
2904## -------------------- ##
2905## Main body of script. ##
2906## -------------------- ##
2907
2908ac_ext=c
2909ac_cpp='$CPP $CPPFLAGS'
2910ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2911ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2912ac_compiler_gnu=$ac_cv_c_compiler_gnu
2913
2914
2915
2916ac_aux_dir=
2917for ac_dir in build-aux "$srcdir"/build-aux; do
2918  if test -f "$ac_dir/install-sh"; then
2919    ac_aux_dir=$ac_dir
2920    ac_install_sh="$ac_aux_dir/install-sh -c"
2921    break
2922  elif test -f "$ac_dir/install.sh"; then
2923    ac_aux_dir=$ac_dir
2924    ac_install_sh="$ac_aux_dir/install.sh -c"
2925    break
2926  elif test -f "$ac_dir/shtool"; then
2927    ac_aux_dir=$ac_dir
2928    ac_install_sh="$ac_aux_dir/shtool install -c"
2929    break
2930  fi
2931done
2932if test -z "$ac_aux_dir"; then
2933  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2934fi
2935
2936# These three variables are undocumented and unsupported,
2937# and are intended to be withdrawn in a future Autoconf release.
2938# They can cause serious problems if a builder's source tree is in a directory
2939# whose full name contains unusual characters.
2940ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2941ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2942ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2943
2944
2945# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2946
2947#
2948# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2949# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2950#
2951# This code is free software; you can redistribute it and/or modify it
2952# under the terms of the GNU General Public License version 2 only, as
2953# published by the Free Software Foundation.  Oracle designates this
2954# particular file as subject to the "Classpath" exception as provided
2955# by Oracle in the LICENSE file that accompanied this code.
2956#
2957# This code is distributed in the hope that it will be useful, but WITHOUT
2958# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2959# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2960# version 2 for more details (a copy is included in the LICENSE file that
2961# accompanied this code).
2962#
2963# You should have received a copy of the GNU General Public License version
2964# 2 along with this work; if not, write to the Free Software Foundation,
2965# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2966#
2967# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2968# or visit www.oracle.com if you need additional information or have any
2969# questions.
2970#
2971
2972#
2973# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2974#
2975# This program is free software; you can redistribute it and/or modify
2976# it under the terms of the GNU General Public License as published by
2977# the Free Software Foundation; either version 2 of the License, or
2978# (at your option) any later version.
2979#
2980# This program is distributed in the hope that it will be useful, but
2981# WITHOUT ANY WARRANTY; without even the implied warranty of
2982# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2983# General Public License for more details.
2984#
2985# You should have received a copy of the GNU General Public License
2986# along with this program; if not, write to the Free Software
2987# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2988#
2989# As a special exception to the GNU General Public License, if you
2990# distribute this file as part of a program that contains a
2991# configuration script generated by Autoconf, you may include it under
2992# the same distribution terms that you use for the rest of that program.
2993
2994# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2995# ----------------------------------
2996# PKG_PROG_PKG_CONFIG
2997
2998# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2999#
3000# Check to see whether a particular set of modules exists.  Similar
3001# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3002#
3003#
3004# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3005# this or PKG_CHECK_MODULES is called, or make sure to call
3006# PKG_CHECK_EXISTS manually
3007# --------------------------------------------------------------
3008
3009
3010
3011# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3012# ---------------------------------------------
3013# _PKG_CONFIG
3014
3015# _PKG_SHORT_ERRORS_SUPPORTED
3016# -----------------------------
3017# _PKG_SHORT_ERRORS_SUPPORTED
3018
3019
3020# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3021# [ACTION-IF-NOT-FOUND])
3022#
3023#
3024# Note that if there is a possibility the first call to
3025# PKG_CHECK_MODULES might not happen, you should be sure to include an
3026# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3027#
3028#
3029# --------------------------------------------------------------
3030# PKG_CHECK_MODULES
3031
3032
3033# Include these first...
3034#
3035# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3036# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3037#
3038# This code is free software; you can redistribute it and/or modify it
3039# under the terms of the GNU General Public License version 2 only, as
3040# published by the Free Software Foundation.  Oracle designates this
3041# particular file as subject to the "Classpath" exception as provided
3042# by Oracle in the LICENSE file that accompanied this code.
3043#
3044# This code is distributed in the hope that it will be useful, but WITHOUT
3045# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3046# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3047# version 2 for more details (a copy is included in the LICENSE file that
3048# accompanied this code).
3049#
3050# You should have received a copy of the GNU General Public License version
3051# 2 along with this work; if not, write to the Free Software Foundation,
3052# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3053#
3054# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3055# or visit www.oracle.com if you need additional information or have any
3056# questions.
3057#
3058
3059
3060
3061# This will make sure the given variable points to a full and proper
3062# path. This means:
3063# 1) There will be no spaces in the path. On posix platforms,
3064#    spaces in the path will result in an error. On Windows,
3065#    the path will be rewritten using short-style to be space-free.
3066# 2) The path will be absolute, and it will be in unix-style (on
3067#     cygwin).
3068# $1: The name of the variable to fix
3069
3070
3071# This will make sure the given variable points to a executable
3072# with a full and proper path. This means:
3073# 1) There will be no spaces in the path. On posix platforms,
3074#    spaces in the path will result in an error. On Windows,
3075#    the path will be rewritten using short-style to be space-free.
3076# 2) The path will be absolute, and it will be in unix-style (on
3077#     cygwin).
3078# Any arguments given to the executable is preserved.
3079# If the input variable does not have a directory specification, then
3080# it need to be in the PATH.
3081# $1: The name of the variable to fix
3082
3083
3084
3085
3086
3087
3088# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3089# $1: variable to check
3090# $2: executable name to print in warning (optional)
3091
3092
3093# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3094# Arguments as AC_PATH_PROG:
3095# $1: variable to set
3096# $2: executable name to look for
3097
3098
3099# Setup the most fundamental tools that relies on not much else to set up,
3100# but is used by much of the early bootstrap code.
3101
3102
3103# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3104
3105
3106
3107
3108
3109
3110
3111#%%% Simple tools %%%
3112
3113# Check if we have found a usable version of make
3114# $1: the path to a potential make binary (or empty)
3115# $2: the description on how we found this
3116
3117
3118# Goes looking for a usable version of GNU make.
3119
3120
3121
3122
3123
3124
3125# Check if build directory is on local disk. If not possible to determine,
3126# we prefer to claim it's local.
3127# Argument 1: directory to test
3128# Argument 2: what to do if it is on local disk
3129# Argument 3: what to do otherwise (remote disk or failure)
3130
3131
3132# Check that source files have basic read permissions set. This might
3133# not be the case in cygwin in certain conditions.
3134
3135
3136
3137
3138#
3139# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3140# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3141#
3142# This code is free software; you can redistribute it and/or modify it
3143# under the terms of the GNU General Public License version 2 only, as
3144# published by the Free Software Foundation.  Oracle designates this
3145# particular file as subject to the "Classpath" exception as provided
3146# by Oracle in the LICENSE file that accompanied this code.
3147#
3148# This code is distributed in the hope that it will be useful, but WITHOUT
3149# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3150# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3151# version 2 for more details (a copy is included in the LICENSE file that
3152# accompanied this code).
3153#
3154# You should have received a copy of the GNU General Public License version
3155# 2 along with this work; if not, write to the Free Software Foundation,
3156# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3157#
3158# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3159# or visit www.oracle.com if you need additional information or have any
3160# questions.
3161#
3162
3163
3164
3165
3166
3167# Helper function which possibly converts a path using DOS-style short mode.
3168# If so, the updated path is stored in $new_path.
3169# $1: The path to check
3170
3171
3172# Helper function which possibly converts a path using DOS-style short mode.
3173# If so, the updated path is stored in $new_path.
3174# $1: The path to check
3175
3176
3177# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3178# and could probably be heavily simplified. However, all changes in this
3179# area tend to need lot of testing in different scenarios, and in lack of
3180# proper unit testing, cleaning this up has not been deemed worth the effort
3181# at the moment.
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3192
3193
3194
3195
3196#
3197# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3199#
3200# This code is free software; you can redistribute it and/or modify it
3201# under the terms of the GNU General Public License version 2 only, as
3202# published by the Free Software Foundation.  Oracle designates this
3203# particular file as subject to the "Classpath" exception as provided
3204# by Oracle in the LICENSE file that accompanied this code.
3205#
3206# This code is distributed in the hope that it will be useful, but WITHOUT
3207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3209# version 2 for more details (a copy is included in the LICENSE file that
3210# accompanied this code).
3211#
3212# You should have received a copy of the GNU General Public License version
3213# 2 along with this work; if not, write to the Free Software Foundation,
3214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3215#
3216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3217# or visit www.oracle.com if you need additional information or have any
3218# questions.
3219#
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231# ... then the rest
3232#
3233# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3234# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3235#
3236# This code is free software; you can redistribute it and/or modify it
3237# under the terms of the GNU General Public License version 2 only, as
3238# published by the Free Software Foundation.  Oracle designates this
3239# particular file as subject to the "Classpath" exception as provided
3240# by Oracle in the LICENSE file that accompanied this code.
3241#
3242# This code is distributed in the hope that it will be useful, but WITHOUT
3243# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3244# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3245# version 2 for more details (a copy is included in the LICENSE file that
3246# accompanied this code).
3247#
3248# You should have received a copy of the GNU General Public License version
3249# 2 along with this work; if not, write to the Free Software Foundation,
3250# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3251#
3252# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3253# or visit www.oracle.com if you need additional information or have any
3254# questions.
3255#
3256
3257# Execute the check given as argument, and verify the result
3258# If the Boot JDK was previously found, do nothing
3259# $1 A command line (typically autoconf macro) to execute
3260
3261
3262# Test: Is bootjdk explicitely set by command line arguments?
3263
3264
3265# Test: Is bootjdk available from builddeps?
3266
3267
3268# Test: Is $JAVA_HOME set?
3269
3270
3271# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3272
3273
3274# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3275
3276
3277# Look for a jdk in the given path. If there are multiple, try to select the newest.
3278# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3279# $1 = Path to directory containing jdk installations.
3280# $2 = String to append to the found JDK directory to get the proper JDK home
3281
3282
3283# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3284# environmental variable as base for where to look.
3285# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3286
3287
3288# Test: Is there a JDK installed in default, well-known locations?
3289
3290
3291# Check that a command-line tool in the Boot JDK is correct
3292# $1 = name of variable to assign
3293# $2 = name of binary
3294
3295
3296###############################################################################
3297#
3298# We need a Boot JDK to bootstrap the build.
3299#
3300
3301
3302
3303
3304
3305#
3306# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3307# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3308#
3309# This code is free software; you can redistribute it and/or modify it
3310# under the terms of the GNU General Public License version 2 only, as
3311# published by the Free Software Foundation.  Oracle designates this
3312# particular file as subject to the "Classpath" exception as provided
3313# by Oracle in the LICENSE file that accompanied this code.
3314#
3315# This code is distributed in the hope that it will be useful, but WITHOUT
3316# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3318# version 2 for more details (a copy is included in the LICENSE file that
3319# accompanied this code).
3320#
3321# You should have received a copy of the GNU General Public License version
3322# 2 along with this work; if not, write to the Free Software Foundation,
3323# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3324#
3325# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3326# or visit www.oracle.com if you need additional information or have any
3327# questions.
3328#
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349#
3350# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3351# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3352#
3353# This code is free software; you can redistribute it and/or modify it
3354# under the terms of the GNU General Public License version 2 only, as
3355# published by the Free Software Foundation.  Oracle designates this
3356# particular file as subject to the "Classpath" exception as provided
3357# by Oracle in the LICENSE file that accompanied this code.
3358#
3359# This code is distributed in the hope that it will be useful, but WITHOUT
3360# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3361# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3362# version 2 for more details (a copy is included in the LICENSE file that
3363# accompanied this code).
3364#
3365# You should have received a copy of the GNU General Public License version
3366# 2 along with this work; if not, write to the Free Software Foundation,
3367# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3368#
3369# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3370# or visit www.oracle.com if you need additional information or have any
3371# questions.
3372#
3373
3374
3375
3376
3377
3378cygwin_help() {
3379    case $1 in
3380    unzip)
3381        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3382    zip)
3383        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3384    make)
3385        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3386    * )
3387       break ;;
3388    esac
3389}
3390
3391apt_help() {
3392    case $1 in
3393    devkit)
3394        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3395    openjdk)
3396        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3397    alsa)
3398        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3399    cups)
3400        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3401    freetype2)
3402        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3403    pulse)
3404        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3405    x11)
3406        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3407    ccache)
3408        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3409    * )
3410       break ;;
3411    esac
3412}
3413
3414yum_help() {
3415    case $1 in
3416    devkit)
3417        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3418    openjdk)
3419        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3420    alsa)
3421        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3422    cups)
3423        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3424    freetype2)
3425        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3426    pulse)
3427        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3428    x11)
3429        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3430    ccache)
3431        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3432    * )
3433       break ;;
3434    esac
3435}
3436
3437port_help() {
3438    PKGHANDLER_COMMAND=""
3439}
3440
3441pkgutil_help() {
3442    PKGHANDLER_COMMAND=""
3443}
3444
3445pkgadd_help() {
3446    PKGHANDLER_COMMAND=""
3447}
3448
3449
3450
3451#
3452# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3453# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3454#
3455# This code is free software; you can redistribute it and/or modify it
3456# under the terms of the GNU General Public License version 2 only, as
3457# published by the Free Software Foundation.  Oracle designates this
3458# particular file as subject to the "Classpath" exception as provided
3459# by Oracle in the LICENSE file that accompanied this code.
3460#
3461# This code is distributed in the hope that it will be useful, but WITHOUT
3462# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3463# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3464# version 2 for more details (a copy is included in the LICENSE file that
3465# accompanied this code).
3466#
3467# You should have received a copy of the GNU General Public License version
3468# 2 along with this work; if not, write to the Free Software Foundation,
3469# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3470#
3471# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3472# or visit www.oracle.com if you need additional information or have any
3473# questions.
3474#
3475
3476
3477
3478
3479
3480
3481
3482
3483###############################################################################
3484#
3485# Should we build only OpenJDK even if closed sources are present?
3486#
3487
3488
3489
3490
3491###############################################################################
3492#
3493# Setup version numbers
3494#
3495
3496
3497
3498
3499
3500
3501# Support for customization of the build process. Some build files
3502# will include counterparts from this location, if they exist. This allows
3503# for a degree of customization of the build targets and the rules/recipes
3504# to create them
3505
3506# Check whether --with-custom-make-dir was given.
3507if test "${with_custom_make_dir+set}" = set; then :
3508  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3509fi
3510
3511
3512
3513#
3514# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3515# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3516#
3517# This code is free software; you can redistribute it and/or modify it
3518# under the terms of the GNU General Public License version 2 only, as
3519# published by the Free Software Foundation.  Oracle designates this
3520# particular file as subject to the "Classpath" exception as provided
3521# by Oracle in the LICENSE file that accompanied this code.
3522#
3523# This code is distributed in the hope that it will be useful, but WITHOUT
3524# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3525# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3526# version 2 for more details (a copy is included in the LICENSE file that
3527# accompanied this code).
3528#
3529# You should have received a copy of the GNU General Public License version
3530# 2 along with this work; if not, write to the Free Software Foundation,
3531# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3532#
3533# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3534# or visit www.oracle.com if you need additional information or have any
3535# questions.
3536#
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552#
3553# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3554# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3555#
3556# This code is free software; you can redistribute it and/or modify it
3557# under the terms of the GNU General Public License version 2 only, as
3558# published by the Free Software Foundation.  Oracle designates this
3559# particular file as subject to the "Classpath" exception as provided
3560# by Oracle in the LICENSE file that accompanied this code.
3561#
3562# This code is distributed in the hope that it will be useful, but WITHOUT
3563# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3564# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3565# version 2 for more details (a copy is included in the LICENSE file that
3566# accompanied this code).
3567#
3568# You should have received a copy of the GNU General Public License version
3569# 2 along with this work; if not, write to the Free Software Foundation,
3570# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3571#
3572# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3573# or visit www.oracle.com if you need additional information or have any
3574# questions.
3575#
3576
3577# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3578# Converts autoconf style CPU name to OpenJDK style, into
3579# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3580
3581
3582# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3583# Converts autoconf style OS name to OpenJDK style, into
3584# VAR_OS and VAR_OS_API.
3585
3586
3587# Expects $host_os $host_cpu $build_os and $build_cpu
3588# and $with_target_bits to have been setup!
3589#
3590# Translate the standard triplet(quadruplet) definition
3591# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3592# OPENJDK_BUILD_OS, etc.
3593
3594
3595# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3596# accordingly. Must be done after setting up build and target system, but before
3597# doing anything else with these values.
3598
3599
3600    # Setup the legacy variables, for controlling the old makefiles.
3601    #
3602
3603
3604
3605
3606#%%% Build and target systems %%%
3607
3608
3609
3610
3611# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3612# Add -mX to various FLAGS variables.
3613
3614
3615
3616
3617
3618
3619#
3620# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644
3645
3646
3647
3648
3649
3650
3651#
3652# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3653# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3654#
3655# This code is free software; you can redistribute it and/or modify it
3656# under the terms of the GNU General Public License version 2 only, as
3657# published by the Free Software Foundation.  Oracle designates this
3658# particular file as subject to the "Classpath" exception as provided
3659# by Oracle in the LICENSE file that accompanied this code.
3660#
3661# This code is distributed in the hope that it will be useful, but WITHOUT
3662# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3663# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3664# version 2 for more details (a copy is included in the LICENSE file that
3665# accompanied this code).
3666#
3667# You should have received a copy of the GNU General Public License version
3668# 2 along with this work; if not, write to the Free Software Foundation,
3669# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3670#
3671# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3672# or visit www.oracle.com if you need additional information or have any
3673# questions.
3674#
3675
3676# $1 = compiler to test (CC or CXX)
3677# $2 = human readable name of compiler (C or C++)
3678
3679
3680
3681
3682
3683# $1 = compiler to test (CC or CXX)
3684# $2 = human readable name of compiler (C or C++)
3685# $3 = list of compiler names to search for
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698#
3699# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3700# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3701#
3702# This code is free software; you can redistribute it and/or modify it
3703# under the terms of the GNU General Public License version 2 only, as
3704# published by the Free Software Foundation.  Oracle designates this
3705# particular file as subject to the "Classpath" exception as provided
3706# by Oracle in the LICENSE file that accompanied this code.
3707#
3708# This code is distributed in the hope that it will be useful, but WITHOUT
3709# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3710# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3711# version 2 for more details (a copy is included in the LICENSE file that
3712# accompanied this code).
3713#
3714# You should have received a copy of the GNU General Public License version
3715# 2 along with this work; if not, write to the Free Software Foundation,
3716# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3717#
3718# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3719# or visit www.oracle.com if you need additional information or have any
3720# questions.
3721#
3722
3723
3724
3725
3726
3727
3728
3729# Check if the VS env variables were setup prior to running configure.
3730# If not, then find vcvarsall.bat and run it automatically, and integrate
3731# the set env variables into the spec file.
3732
3733
3734
3735# Setup the DXSDK paths
3736
3737
3738
3739
3740
3741
3742# This line needs to be here, verbatim, after all includes and the dummy hook
3743# definitions. It is replaced with custom functionality when building
3744# custom sources.
3745#CUSTOM_AUTOCONF_INCLUDE
3746
3747# Do not change or remove the following line, it is needed for consistency checks:
3748DATE_WHEN_GENERATED=1364562324
3749
3750###############################################################################
3751#
3752# Initialization / Boot-strapping
3753#
3754# The bootstrapping process needs to solve the "chicken or the egg" problem,
3755# thus it jumps back and forth, each time gaining something needed later on.
3756#
3757###############################################################################
3758
3759# Basic initialization that must happen first of all
3760
3761# Save the original command line. This is passed to us by the wrapper configure script.
3762
3763DATE_WHEN_CONFIGURED=`LANG=C date`
3764
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3766$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3768$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3769
3770
3771
3772# Start with tools that do not need have cross compilation support
3773# and can be expected to be found in the default PATH. These tools are
3774# used by configure. Nor are these tools expected to be found in the
3775# devkit from the builddeps server either, since they are
3776# needed to download the devkit.
3777
3778# First are all the simple required tools.
3779
3780    for ac_prog in basename
3781do
3782  # Extract the first word of "$ac_prog", so it can be a program name with args.
3783set dummy $ac_prog; ac_word=$2
3784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3785$as_echo_n "checking for $ac_word... " >&6; }
3786if test "${ac_cv_path_BASENAME+set}" = set; then :
3787  $as_echo_n "(cached) " >&6
3788else
3789  case $BASENAME in
3790  [\\/]* | ?:[\\/]*)
3791  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3792  ;;
3793  *)
3794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795for as_dir in $PATH
3796do
3797  IFS=$as_save_IFS
3798  test -z "$as_dir" && as_dir=.
3799    for ac_exec_ext in '' $ac_executable_extensions; do
3800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3801    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3803    break 2
3804  fi
3805done
3806  done
3807IFS=$as_save_IFS
3808
3809  ;;
3810esac
3811fi
3812BASENAME=$ac_cv_path_BASENAME
3813if test -n "$BASENAME"; then
3814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3815$as_echo "$BASENAME" >&6; }
3816else
3817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3818$as_echo "no" >&6; }
3819fi
3820
3821
3822  test -n "$BASENAME" && break
3823done
3824
3825
3826    if test "x$BASENAME" = x; then
3827        if test "xbasename" = x; then
3828          PROG_NAME=basename
3829        else
3830          PROG_NAME=basename
3831        fi
3832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3833$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3834        as_fn_error $? "Cannot continue" "$LINENO" 5
3835    fi
3836
3837
3838
3839    for ac_prog in bash
3840do
3841  # Extract the first word of "$ac_prog", so it can be a program name with args.
3842set dummy $ac_prog; ac_word=$2
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3844$as_echo_n "checking for $ac_word... " >&6; }
3845if test "${ac_cv_path_BASH+set}" = set; then :
3846  $as_echo_n "(cached) " >&6
3847else
3848  case $BASH in
3849  [\\/]* | ?:[\\/]*)
3850  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3851  ;;
3852  *)
3853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854for as_dir in $PATH
3855do
3856  IFS=$as_save_IFS
3857  test -z "$as_dir" && as_dir=.
3858    for ac_exec_ext in '' $ac_executable_extensions; do
3859  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3860    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3862    break 2
3863  fi
3864done
3865  done
3866IFS=$as_save_IFS
3867
3868  ;;
3869esac
3870fi
3871BASH=$ac_cv_path_BASH
3872if test -n "$BASH"; then
3873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3874$as_echo "$BASH" >&6; }
3875else
3876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3877$as_echo "no" >&6; }
3878fi
3879
3880
3881  test -n "$BASH" && break
3882done
3883
3884
3885    if test "x$BASH" = x; then
3886        if test "xbash" = x; then
3887          PROG_NAME=bash
3888        else
3889          PROG_NAME=bash
3890        fi
3891        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3892$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3893        as_fn_error $? "Cannot continue" "$LINENO" 5
3894    fi
3895
3896
3897
3898    for ac_prog in cat
3899do
3900  # Extract the first word of "$ac_prog", so it can be a program name with args.
3901set dummy $ac_prog; ac_word=$2
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3903$as_echo_n "checking for $ac_word... " >&6; }
3904if test "${ac_cv_path_CAT+set}" = set; then :
3905  $as_echo_n "(cached) " >&6
3906else
3907  case $CAT in
3908  [\\/]* | ?:[\\/]*)
3909  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3910  ;;
3911  *)
3912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913for as_dir in $PATH
3914do
3915  IFS=$as_save_IFS
3916  test -z "$as_dir" && as_dir=.
3917    for ac_exec_ext in '' $ac_executable_extensions; do
3918  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3919    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921    break 2
3922  fi
3923done
3924  done
3925IFS=$as_save_IFS
3926
3927  ;;
3928esac
3929fi
3930CAT=$ac_cv_path_CAT
3931if test -n "$CAT"; then
3932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3933$as_echo "$CAT" >&6; }
3934else
3935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3936$as_echo "no" >&6; }
3937fi
3938
3939
3940  test -n "$CAT" && break
3941done
3942
3943
3944    if test "x$CAT" = x; then
3945        if test "xcat" = x; then
3946          PROG_NAME=cat
3947        else
3948          PROG_NAME=cat
3949        fi
3950        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3951$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3952        as_fn_error $? "Cannot continue" "$LINENO" 5
3953    fi
3954
3955
3956
3957    for ac_prog in chmod
3958do
3959  # Extract the first word of "$ac_prog", so it can be a program name with args.
3960set dummy $ac_prog; ac_word=$2
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3962$as_echo_n "checking for $ac_word... " >&6; }
3963if test "${ac_cv_path_CHMOD+set}" = set; then :
3964  $as_echo_n "(cached) " >&6
3965else
3966  case $CHMOD in
3967  [\\/]* | ?:[\\/]*)
3968  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3969  ;;
3970  *)
3971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972for as_dir in $PATH
3973do
3974  IFS=$as_save_IFS
3975  test -z "$as_dir" && as_dir=.
3976    for ac_exec_ext in '' $ac_executable_extensions; do
3977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3978    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3980    break 2
3981  fi
3982done
3983  done
3984IFS=$as_save_IFS
3985
3986  ;;
3987esac
3988fi
3989CHMOD=$ac_cv_path_CHMOD
3990if test -n "$CHMOD"; then
3991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3992$as_echo "$CHMOD" >&6; }
3993else
3994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
3996fi
3997
3998
3999  test -n "$CHMOD" && break
4000done
4001
4002
4003    if test "x$CHMOD" = x; then
4004        if test "xchmod" = x; then
4005          PROG_NAME=chmod
4006        else
4007          PROG_NAME=chmod
4008        fi
4009        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4010$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4011        as_fn_error $? "Cannot continue" "$LINENO" 5
4012    fi
4013
4014
4015
4016    for ac_prog in cmp
4017do
4018  # Extract the first word of "$ac_prog", so it can be a program name with args.
4019set dummy $ac_prog; ac_word=$2
4020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021$as_echo_n "checking for $ac_word... " >&6; }
4022if test "${ac_cv_path_CMP+set}" = set; then :
4023  $as_echo_n "(cached) " >&6
4024else
4025  case $CMP in
4026  [\\/]* | ?:[\\/]*)
4027  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4028  ;;
4029  *)
4030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4031for as_dir in $PATH
4032do
4033  IFS=$as_save_IFS
4034  test -z "$as_dir" && as_dir=.
4035    for ac_exec_ext in '' $ac_executable_extensions; do
4036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4037    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4039    break 2
4040  fi
4041done
4042  done
4043IFS=$as_save_IFS
4044
4045  ;;
4046esac
4047fi
4048CMP=$ac_cv_path_CMP
4049if test -n "$CMP"; then
4050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4051$as_echo "$CMP" >&6; }
4052else
4053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054$as_echo "no" >&6; }
4055fi
4056
4057
4058  test -n "$CMP" && break
4059done
4060
4061
4062    if test "x$CMP" = x; then
4063        if test "xcmp" = x; then
4064          PROG_NAME=cmp
4065        else
4066          PROG_NAME=cmp
4067        fi
4068        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4069$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4070        as_fn_error $? "Cannot continue" "$LINENO" 5
4071    fi
4072
4073
4074
4075    for ac_prog in comm
4076do
4077  # Extract the first word of "$ac_prog", so it can be a program name with args.
4078set dummy $ac_prog; ac_word=$2
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080$as_echo_n "checking for $ac_word... " >&6; }
4081if test "${ac_cv_path_COMM+set}" = set; then :
4082  $as_echo_n "(cached) " >&6
4083else
4084  case $COMM in
4085  [\\/]* | ?:[\\/]*)
4086  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4087  ;;
4088  *)
4089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090for as_dir in $PATH
4091do
4092  IFS=$as_save_IFS
4093  test -z "$as_dir" && as_dir=.
4094    for ac_exec_ext in '' $ac_executable_extensions; do
4095  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4096    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4098    break 2
4099  fi
4100done
4101  done
4102IFS=$as_save_IFS
4103
4104  ;;
4105esac
4106fi
4107COMM=$ac_cv_path_COMM
4108if test -n "$COMM"; then
4109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4110$as_echo "$COMM" >&6; }
4111else
4112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
4114fi
4115
4116
4117  test -n "$COMM" && break
4118done
4119
4120
4121    if test "x$COMM" = x; then
4122        if test "xcomm" = x; then
4123          PROG_NAME=comm
4124        else
4125          PROG_NAME=comm
4126        fi
4127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4128$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4129        as_fn_error $? "Cannot continue" "$LINENO" 5
4130    fi
4131
4132
4133
4134    for ac_prog in cp
4135do
4136  # Extract the first word of "$ac_prog", so it can be a program name with args.
4137set dummy $ac_prog; ac_word=$2
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4139$as_echo_n "checking for $ac_word... " >&6; }
4140if test "${ac_cv_path_CP+set}" = set; then :
4141  $as_echo_n "(cached) " >&6
4142else
4143  case $CP in
4144  [\\/]* | ?:[\\/]*)
4145  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4146  ;;
4147  *)
4148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4149for as_dir in $PATH
4150do
4151  IFS=$as_save_IFS
4152  test -z "$as_dir" && as_dir=.
4153    for ac_exec_ext in '' $ac_executable_extensions; do
4154  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4155    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4157    break 2
4158  fi
4159done
4160  done
4161IFS=$as_save_IFS
4162
4163  ;;
4164esac
4165fi
4166CP=$ac_cv_path_CP
4167if test -n "$CP"; then
4168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4169$as_echo "$CP" >&6; }
4170else
4171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4172$as_echo "no" >&6; }
4173fi
4174
4175
4176  test -n "$CP" && break
4177done
4178
4179
4180    if test "x$CP" = x; then
4181        if test "xcp" = x; then
4182          PROG_NAME=cp
4183        else
4184          PROG_NAME=cp
4185        fi
4186        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4187$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4188        as_fn_error $? "Cannot continue" "$LINENO" 5
4189    fi
4190
4191
4192
4193    for ac_prog in cpio
4194do
4195  # Extract the first word of "$ac_prog", so it can be a program name with args.
4196set dummy $ac_prog; ac_word=$2
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4198$as_echo_n "checking for $ac_word... " >&6; }
4199if test "${ac_cv_path_CPIO+set}" = set; then :
4200  $as_echo_n "(cached) " >&6
4201else
4202  case $CPIO in
4203  [\\/]* | ?:[\\/]*)
4204  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4205  ;;
4206  *)
4207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4208for as_dir in $PATH
4209do
4210  IFS=$as_save_IFS
4211  test -z "$as_dir" && as_dir=.
4212    for ac_exec_ext in '' $ac_executable_extensions; do
4213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4214    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4216    break 2
4217  fi
4218done
4219  done
4220IFS=$as_save_IFS
4221
4222  ;;
4223esac
4224fi
4225CPIO=$ac_cv_path_CPIO
4226if test -n "$CPIO"; then
4227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4228$as_echo "$CPIO" >&6; }
4229else
4230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4231$as_echo "no" >&6; }
4232fi
4233
4234
4235  test -n "$CPIO" && break
4236done
4237
4238
4239    if test "x$CPIO" = x; then
4240        if test "xcpio" = x; then
4241          PROG_NAME=cpio
4242        else
4243          PROG_NAME=cpio
4244        fi
4245        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4246$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4247        as_fn_error $? "Cannot continue" "$LINENO" 5
4248    fi
4249
4250
4251
4252    for ac_prog in cut
4253do
4254  # Extract the first word of "$ac_prog", so it can be a program name with args.
4255set dummy $ac_prog; ac_word=$2
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4257$as_echo_n "checking for $ac_word... " >&6; }
4258if test "${ac_cv_path_CUT+set}" = set; then :
4259  $as_echo_n "(cached) " >&6
4260else
4261  case $CUT in
4262  [\\/]* | ?:[\\/]*)
4263  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4264  ;;
4265  *)
4266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4267for as_dir in $PATH
4268do
4269  IFS=$as_save_IFS
4270  test -z "$as_dir" && as_dir=.
4271    for ac_exec_ext in '' $ac_executable_extensions; do
4272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4273    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4275    break 2
4276  fi
4277done
4278  done
4279IFS=$as_save_IFS
4280
4281  ;;
4282esac
4283fi
4284CUT=$ac_cv_path_CUT
4285if test -n "$CUT"; then
4286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4287$as_echo "$CUT" >&6; }
4288else
4289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4290$as_echo "no" >&6; }
4291fi
4292
4293
4294  test -n "$CUT" && break
4295done
4296
4297
4298    if test "x$CUT" = x; then
4299        if test "xcut" = x; then
4300          PROG_NAME=cut
4301        else
4302          PROG_NAME=cut
4303        fi
4304        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4305$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4306        as_fn_error $? "Cannot continue" "$LINENO" 5
4307    fi
4308
4309
4310
4311    for ac_prog in date
4312do
4313  # Extract the first word of "$ac_prog", so it can be a program name with args.
4314set dummy $ac_prog; ac_word=$2
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4316$as_echo_n "checking for $ac_word... " >&6; }
4317if test "${ac_cv_path_DATE+set}" = set; then :
4318  $as_echo_n "(cached) " >&6
4319else
4320  case $DATE in
4321  [\\/]* | ?:[\\/]*)
4322  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4323  ;;
4324  *)
4325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH
4327do
4328  IFS=$as_save_IFS
4329  test -z "$as_dir" && as_dir=.
4330    for ac_exec_ext in '' $ac_executable_extensions; do
4331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4332    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4334    break 2
4335  fi
4336done
4337  done
4338IFS=$as_save_IFS
4339
4340  ;;
4341esac
4342fi
4343DATE=$ac_cv_path_DATE
4344if test -n "$DATE"; then
4345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4346$as_echo "$DATE" >&6; }
4347else
4348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4349$as_echo "no" >&6; }
4350fi
4351
4352
4353  test -n "$DATE" && break
4354done
4355
4356
4357    if test "x$DATE" = x; then
4358        if test "xdate" = x; then
4359          PROG_NAME=date
4360        else
4361          PROG_NAME=date
4362        fi
4363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4365        as_fn_error $? "Cannot continue" "$LINENO" 5
4366    fi
4367
4368
4369
4370    for ac_prog in gdiff diff
4371do
4372  # Extract the first word of "$ac_prog", so it can be a program name with args.
4373set dummy $ac_prog; ac_word=$2
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375$as_echo_n "checking for $ac_word... " >&6; }
4376if test "${ac_cv_path_DIFF+set}" = set; then :
4377  $as_echo_n "(cached) " >&6
4378else
4379  case $DIFF in
4380  [\\/]* | ?:[\\/]*)
4381  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4382  ;;
4383  *)
4384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385for as_dir in $PATH
4386do
4387  IFS=$as_save_IFS
4388  test -z "$as_dir" && as_dir=.
4389    for ac_exec_ext in '' $ac_executable_extensions; do
4390  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4391    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4393    break 2
4394  fi
4395done
4396  done
4397IFS=$as_save_IFS
4398
4399  ;;
4400esac
4401fi
4402DIFF=$ac_cv_path_DIFF
4403if test -n "$DIFF"; then
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4405$as_echo "$DIFF" >&6; }
4406else
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4408$as_echo "no" >&6; }
4409fi
4410
4411
4412  test -n "$DIFF" && break
4413done
4414
4415
4416    if test "x$DIFF" = x; then
4417        if test "xgdiff diff" = x; then
4418          PROG_NAME=diff
4419        else
4420          PROG_NAME=gdiff diff
4421        fi
4422        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4423$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4424        as_fn_error $? "Cannot continue" "$LINENO" 5
4425    fi
4426
4427
4428
4429    for ac_prog in dirname
4430do
4431  # Extract the first word of "$ac_prog", so it can be a program name with args.
4432set dummy $ac_prog; ac_word=$2
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434$as_echo_n "checking for $ac_word... " >&6; }
4435if test "${ac_cv_path_DIRNAME+set}" = set; then :
4436  $as_echo_n "(cached) " >&6
4437else
4438  case $DIRNAME in
4439  [\\/]* | ?:[\\/]*)
4440  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4441  ;;
4442  *)
4443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444for as_dir in $PATH
4445do
4446  IFS=$as_save_IFS
4447  test -z "$as_dir" && as_dir=.
4448    for ac_exec_ext in '' $ac_executable_extensions; do
4449  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4450    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4452    break 2
4453  fi
4454done
4455  done
4456IFS=$as_save_IFS
4457
4458  ;;
4459esac
4460fi
4461DIRNAME=$ac_cv_path_DIRNAME
4462if test -n "$DIRNAME"; then
4463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4464$as_echo "$DIRNAME" >&6; }
4465else
4466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4467$as_echo "no" >&6; }
4468fi
4469
4470
4471  test -n "$DIRNAME" && break
4472done
4473
4474
4475    if test "x$DIRNAME" = x; then
4476        if test "xdirname" = x; then
4477          PROG_NAME=dirname
4478        else
4479          PROG_NAME=dirname
4480        fi
4481        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4482$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4483        as_fn_error $? "Cannot continue" "$LINENO" 5
4484    fi
4485
4486
4487
4488    for ac_prog in echo
4489do
4490  # Extract the first word of "$ac_prog", so it can be a program name with args.
4491set dummy $ac_prog; ac_word=$2
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493$as_echo_n "checking for $ac_word... " >&6; }
4494if test "${ac_cv_path_ECHO+set}" = set; then :
4495  $as_echo_n "(cached) " >&6
4496else
4497  case $ECHO in
4498  [\\/]* | ?:[\\/]*)
4499  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4500  ;;
4501  *)
4502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH
4504do
4505  IFS=$as_save_IFS
4506  test -z "$as_dir" && as_dir=.
4507    for ac_exec_ext in '' $ac_executable_extensions; do
4508  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4509    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511    break 2
4512  fi
4513done
4514  done
4515IFS=$as_save_IFS
4516
4517  ;;
4518esac
4519fi
4520ECHO=$ac_cv_path_ECHO
4521if test -n "$ECHO"; then
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4523$as_echo "$ECHO" >&6; }
4524else
4525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526$as_echo "no" >&6; }
4527fi
4528
4529
4530  test -n "$ECHO" && break
4531done
4532
4533
4534    if test "x$ECHO" = x; then
4535        if test "xecho" = x; then
4536          PROG_NAME=echo
4537        else
4538          PROG_NAME=echo
4539        fi
4540        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4541$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4542        as_fn_error $? "Cannot continue" "$LINENO" 5
4543    fi
4544
4545
4546
4547    for ac_prog in expr
4548do
4549  # Extract the first word of "$ac_prog", so it can be a program name with args.
4550set dummy $ac_prog; ac_word=$2
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4552$as_echo_n "checking for $ac_word... " >&6; }
4553if test "${ac_cv_path_EXPR+set}" = set; then :
4554  $as_echo_n "(cached) " >&6
4555else
4556  case $EXPR in
4557  [\\/]* | ?:[\\/]*)
4558  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4559  ;;
4560  *)
4561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562for as_dir in $PATH
4563do
4564  IFS=$as_save_IFS
4565  test -z "$as_dir" && as_dir=.
4566    for ac_exec_ext in '' $ac_executable_extensions; do
4567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4568    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570    break 2
4571  fi
4572done
4573  done
4574IFS=$as_save_IFS
4575
4576  ;;
4577esac
4578fi
4579EXPR=$ac_cv_path_EXPR
4580if test -n "$EXPR"; then
4581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4582$as_echo "$EXPR" >&6; }
4583else
4584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585$as_echo "no" >&6; }
4586fi
4587
4588
4589  test -n "$EXPR" && break
4590done
4591
4592
4593    if test "x$EXPR" = x; then
4594        if test "xexpr" = x; then
4595          PROG_NAME=expr
4596        else
4597          PROG_NAME=expr
4598        fi
4599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4600$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4601        as_fn_error $? "Cannot continue" "$LINENO" 5
4602    fi
4603
4604
4605
4606    for ac_prog in file
4607do
4608  # Extract the first word of "$ac_prog", so it can be a program name with args.
4609set dummy $ac_prog; ac_word=$2
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611$as_echo_n "checking for $ac_word... " >&6; }
4612if test "${ac_cv_path_FILE+set}" = set; then :
4613  $as_echo_n "(cached) " >&6
4614else
4615  case $FILE in
4616  [\\/]* | ?:[\\/]*)
4617  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4618  ;;
4619  *)
4620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621for as_dir in $PATH
4622do
4623  IFS=$as_save_IFS
4624  test -z "$as_dir" && as_dir=.
4625    for ac_exec_ext in '' $ac_executable_extensions; do
4626  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4627    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4629    break 2
4630  fi
4631done
4632  done
4633IFS=$as_save_IFS
4634
4635  ;;
4636esac
4637fi
4638FILE=$ac_cv_path_FILE
4639if test -n "$FILE"; then
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4641$as_echo "$FILE" >&6; }
4642else
4643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644$as_echo "no" >&6; }
4645fi
4646
4647
4648  test -n "$FILE" && break
4649done
4650
4651
4652    if test "x$FILE" = x; then
4653        if test "xfile" = x; then
4654          PROG_NAME=file
4655        else
4656          PROG_NAME=file
4657        fi
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4659$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4660        as_fn_error $? "Cannot continue" "$LINENO" 5
4661    fi
4662
4663
4664
4665    for ac_prog in find
4666do
4667  # Extract the first word of "$ac_prog", so it can be a program name with args.
4668set dummy $ac_prog; ac_word=$2
4669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670$as_echo_n "checking for $ac_word... " >&6; }
4671if test "${ac_cv_path_FIND+set}" = set; then :
4672  $as_echo_n "(cached) " >&6
4673else
4674  case $FIND in
4675  [\\/]* | ?:[\\/]*)
4676  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4677  ;;
4678  *)
4679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in $PATH
4681do
4682  IFS=$as_save_IFS
4683  test -z "$as_dir" && as_dir=.
4684    for ac_exec_ext in '' $ac_executable_extensions; do
4685  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4686    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688    break 2
4689  fi
4690done
4691  done
4692IFS=$as_save_IFS
4693
4694  ;;
4695esac
4696fi
4697FIND=$ac_cv_path_FIND
4698if test -n "$FIND"; then
4699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4700$as_echo "$FIND" >&6; }
4701else
4702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703$as_echo "no" >&6; }
4704fi
4705
4706
4707  test -n "$FIND" && break
4708done
4709
4710
4711    if test "x$FIND" = x; then
4712        if test "xfind" = x; then
4713          PROG_NAME=find
4714        else
4715          PROG_NAME=find
4716        fi
4717        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4718$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4719        as_fn_error $? "Cannot continue" "$LINENO" 5
4720    fi
4721
4722
4723
4724    for ac_prog in head
4725do
4726  # Extract the first word of "$ac_prog", so it can be a program name with args.
4727set dummy $ac_prog; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
4730if test "${ac_cv_path_HEAD+set}" = set; then :
4731  $as_echo_n "(cached) " >&6
4732else
4733  case $HEAD in
4734  [\\/]* | ?:[\\/]*)
4735  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4736  ;;
4737  *)
4738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741  IFS=$as_save_IFS
4742  test -z "$as_dir" && as_dir=.
4743    for ac_exec_ext in '' $ac_executable_extensions; do
4744  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4745    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747    break 2
4748  fi
4749done
4750  done
4751IFS=$as_save_IFS
4752
4753  ;;
4754esac
4755fi
4756HEAD=$ac_cv_path_HEAD
4757if test -n "$HEAD"; then
4758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4759$as_echo "$HEAD" >&6; }
4760else
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
4763fi
4764
4765
4766  test -n "$HEAD" && break
4767done
4768
4769
4770    if test "x$HEAD" = x; then
4771        if test "xhead" = x; then
4772          PROG_NAME=head
4773        else
4774          PROG_NAME=head
4775        fi
4776        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4777$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4778        as_fn_error $? "Cannot continue" "$LINENO" 5
4779    fi
4780
4781
4782
4783    for ac_prog in ln
4784do
4785  # Extract the first word of "$ac_prog", so it can be a program name with args.
4786set dummy $ac_prog; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
4789if test "${ac_cv_path_LN+set}" = set; then :
4790  $as_echo_n "(cached) " >&6
4791else
4792  case $LN in
4793  [\\/]* | ?:[\\/]*)
4794  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4795  ;;
4796  *)
4797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in $PATH
4799do
4800  IFS=$as_save_IFS
4801  test -z "$as_dir" && as_dir=.
4802    for ac_exec_ext in '' $ac_executable_extensions; do
4803  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4804    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4806    break 2
4807  fi
4808done
4809  done
4810IFS=$as_save_IFS
4811
4812  ;;
4813esac
4814fi
4815LN=$ac_cv_path_LN
4816if test -n "$LN"; then
4817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4818$as_echo "$LN" >&6; }
4819else
4820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
4822fi
4823
4824
4825  test -n "$LN" && break
4826done
4827
4828
4829    if test "x$LN" = x; then
4830        if test "xln" = x; then
4831          PROG_NAME=ln
4832        else
4833          PROG_NAME=ln
4834        fi
4835        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4836$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4837        as_fn_error $? "Cannot continue" "$LINENO" 5
4838    fi
4839
4840
4841
4842    for ac_prog in ls
4843do
4844  # Extract the first word of "$ac_prog", so it can be a program name with args.
4845set dummy $ac_prog; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
4848if test "${ac_cv_path_LS+set}" = set; then :
4849  $as_echo_n "(cached) " >&6
4850else
4851  case $LS in
4852  [\\/]* | ?:[\\/]*)
4853  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4854  ;;
4855  *)
4856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in $PATH
4858do
4859  IFS=$as_save_IFS
4860  test -z "$as_dir" && as_dir=.
4861    for ac_exec_ext in '' $ac_executable_extensions; do
4862  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4863    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4865    break 2
4866  fi
4867done
4868  done
4869IFS=$as_save_IFS
4870
4871  ;;
4872esac
4873fi
4874LS=$ac_cv_path_LS
4875if test -n "$LS"; then
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4877$as_echo "$LS" >&6; }
4878else
4879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
4881fi
4882
4883
4884  test -n "$LS" && break
4885done
4886
4887
4888    if test "x$LS" = x; then
4889        if test "xls" = x; then
4890          PROG_NAME=ls
4891        else
4892          PROG_NAME=ls
4893        fi
4894        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4895$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4896        as_fn_error $? "Cannot continue" "$LINENO" 5
4897    fi
4898
4899
4900
4901    for ac_prog in mkdir
4902do
4903  # Extract the first word of "$ac_prog", so it can be a program name with args.
4904set dummy $ac_prog; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
4907if test "${ac_cv_path_MKDIR+set}" = set; then :
4908  $as_echo_n "(cached) " >&6
4909else
4910  case $MKDIR in
4911  [\\/]* | ?:[\\/]*)
4912  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4913  ;;
4914  *)
4915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916for as_dir in $PATH
4917do
4918  IFS=$as_save_IFS
4919  test -z "$as_dir" && as_dir=.
4920    for ac_exec_ext in '' $ac_executable_extensions; do
4921  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4922    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924    break 2
4925  fi
4926done
4927  done
4928IFS=$as_save_IFS
4929
4930  ;;
4931esac
4932fi
4933MKDIR=$ac_cv_path_MKDIR
4934if test -n "$MKDIR"; then
4935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4936$as_echo "$MKDIR" >&6; }
4937else
4938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942
4943  test -n "$MKDIR" && break
4944done
4945
4946
4947    if test "x$MKDIR" = x; then
4948        if test "xmkdir" = x; then
4949          PROG_NAME=mkdir
4950        else
4951          PROG_NAME=mkdir
4952        fi
4953        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4954$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4955        as_fn_error $? "Cannot continue" "$LINENO" 5
4956    fi
4957
4958
4959
4960    for ac_prog in mktemp
4961do
4962  # Extract the first word of "$ac_prog", so it can be a program name with args.
4963set dummy $ac_prog; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if test "${ac_cv_path_MKTEMP+set}" = set; then :
4967  $as_echo_n "(cached) " >&6
4968else
4969  case $MKTEMP in
4970  [\\/]* | ?:[\\/]*)
4971  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4972  ;;
4973  *)
4974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975for as_dir in $PATH
4976do
4977  IFS=$as_save_IFS
4978  test -z "$as_dir" && as_dir=.
4979    for ac_exec_ext in '' $ac_executable_extensions; do
4980  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4981    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983    break 2
4984  fi
4985done
4986  done
4987IFS=$as_save_IFS
4988
4989  ;;
4990esac
4991fi
4992MKTEMP=$ac_cv_path_MKTEMP
4993if test -n "$MKTEMP"; then
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4995$as_echo "$MKTEMP" >&6; }
4996else
4997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999fi
5000
5001
5002  test -n "$MKTEMP" && break
5003done
5004
5005
5006    if test "x$MKTEMP" = x; then
5007        if test "xmktemp" = x; then
5008          PROG_NAME=mktemp
5009        else
5010          PROG_NAME=mktemp
5011        fi
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5013$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5014        as_fn_error $? "Cannot continue" "$LINENO" 5
5015    fi
5016
5017
5018
5019    for ac_prog in mv
5020do
5021  # Extract the first word of "$ac_prog", so it can be a program name with args.
5022set dummy $ac_prog; ac_word=$2
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024$as_echo_n "checking for $ac_word... " >&6; }
5025if test "${ac_cv_path_MV+set}" = set; then :
5026  $as_echo_n "(cached) " >&6
5027else
5028  case $MV in
5029  [\\/]* | ?:[\\/]*)
5030  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5031  ;;
5032  *)
5033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036  IFS=$as_save_IFS
5037  test -z "$as_dir" && as_dir=.
5038    for ac_exec_ext in '' $ac_executable_extensions; do
5039  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5040    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042    break 2
5043  fi
5044done
5045  done
5046IFS=$as_save_IFS
5047
5048  ;;
5049esac
5050fi
5051MV=$ac_cv_path_MV
5052if test -n "$MV"; then
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5054$as_echo "$MV" >&6; }
5055else
5056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
5058fi
5059
5060
5061  test -n "$MV" && break
5062done
5063
5064
5065    if test "x$MV" = x; then
5066        if test "xmv" = x; then
5067          PROG_NAME=mv
5068        else
5069          PROG_NAME=mv
5070        fi
5071        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5072$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5073        as_fn_error $? "Cannot continue" "$LINENO" 5
5074    fi
5075
5076
5077
5078    for ac_prog in printf
5079do
5080  # Extract the first word of "$ac_prog", so it can be a program name with args.
5081set dummy $ac_prog; ac_word=$2
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
5084if test "${ac_cv_path_PRINTF+set}" = set; then :
5085  $as_echo_n "(cached) " >&6
5086else
5087  case $PRINTF in
5088  [\\/]* | ?:[\\/]*)
5089  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5090  ;;
5091  *)
5092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095  IFS=$as_save_IFS
5096  test -z "$as_dir" && as_dir=.
5097    for ac_exec_ext in '' $ac_executable_extensions; do
5098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5099    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5101    break 2
5102  fi
5103done
5104  done
5105IFS=$as_save_IFS
5106
5107  ;;
5108esac
5109fi
5110PRINTF=$ac_cv_path_PRINTF
5111if test -n "$PRINTF"; then
5112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5113$as_echo "$PRINTF" >&6; }
5114else
5115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
5117fi
5118
5119
5120  test -n "$PRINTF" && break
5121done
5122
5123
5124    if test "x$PRINTF" = x; then
5125        if test "xprintf" = x; then
5126          PROG_NAME=printf
5127        else
5128          PROG_NAME=printf
5129        fi
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5131$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5132        as_fn_error $? "Cannot continue" "$LINENO" 5
5133    fi
5134
5135
5136
5137    for ac_prog in pwd
5138do
5139  # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
5143if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5144  $as_echo_n "(cached) " >&6
5145else
5146  case $THEPWDCMD in
5147  [\\/]* | ?:[\\/]*)
5148  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5149  ;;
5150  *)
5151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154  IFS=$as_save_IFS
5155  test -z "$as_dir" && as_dir=.
5156    for ac_exec_ext in '' $ac_executable_extensions; do
5157  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5158    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160    break 2
5161  fi
5162done
5163  done
5164IFS=$as_save_IFS
5165
5166  ;;
5167esac
5168fi
5169THEPWDCMD=$ac_cv_path_THEPWDCMD
5170if test -n "$THEPWDCMD"; then
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5172$as_echo "$THEPWDCMD" >&6; }
5173else
5174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179  test -n "$THEPWDCMD" && break
5180done
5181
5182
5183    if test "x$THEPWDCMD" = x; then
5184        if test "xpwd" = x; then
5185          PROG_NAME=thepwdcmd
5186        else
5187          PROG_NAME=pwd
5188        fi
5189        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5190$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5191        as_fn_error $? "Cannot continue" "$LINENO" 5
5192    fi
5193
5194
5195
5196    for ac_prog in rm
5197do
5198  # Extract the first word of "$ac_prog", so it can be a program name with args.
5199set dummy $ac_prog; ac_word=$2
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201$as_echo_n "checking for $ac_word... " >&6; }
5202if test "${ac_cv_path_RM+set}" = set; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205  case $RM in
5206  [\\/]* | ?:[\\/]*)
5207  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5208  ;;
5209  *)
5210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  test -z "$as_dir" && as_dir=.
5215    for ac_exec_ext in '' $ac_executable_extensions; do
5216  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5217    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219    break 2
5220  fi
5221done
5222  done
5223IFS=$as_save_IFS
5224
5225  ;;
5226esac
5227fi
5228RM=$ac_cv_path_RM
5229if test -n "$RM"; then
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5231$as_echo "$RM" >&6; }
5232else
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236
5237
5238  test -n "$RM" && break
5239done
5240
5241
5242    if test "x$RM" = x; then
5243        if test "xrm" = x; then
5244          PROG_NAME=rm
5245        else
5246          PROG_NAME=rm
5247        fi
5248        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5249$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5250        as_fn_error $? "Cannot continue" "$LINENO" 5
5251    fi
5252
5253
5254
5255    for ac_prog in sh
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if test "${ac_cv_path_SH+set}" = set; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $SH in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5276    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287SH=$ac_cv_path_SH
5288if test -n "$SH"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5290$as_echo "$SH" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$SH" && break
5298done
5299
5300
5301    if test "x$SH" = x; then
5302        if test "xsh" = x; then
5303          PROG_NAME=sh
5304        else
5305          PROG_NAME=sh
5306        fi
5307        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5308$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5309        as_fn_error $? "Cannot continue" "$LINENO" 5
5310    fi
5311
5312
5313
5314    for ac_prog in sort
5315do
5316  # Extract the first word of "$ac_prog", so it can be a program name with args.
5317set dummy $ac_prog; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if test "${ac_cv_path_SORT+set}" = set; then :
5321  $as_echo_n "(cached) " >&6
5322else
5323  case $SORT in
5324  [\\/]* | ?:[\\/]*)
5325  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5326  ;;
5327  *)
5328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  test -z "$as_dir" && as_dir=.
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5335    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343  ;;
5344esac
5345fi
5346SORT=$ac_cv_path_SORT
5347if test -n "$SORT"; then
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5349$as_echo "$SORT" >&6; }
5350else
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356  test -n "$SORT" && break
5357done
5358
5359
5360    if test "x$SORT" = x; then
5361        if test "xsort" = x; then
5362          PROG_NAME=sort
5363        else
5364          PROG_NAME=sort
5365        fi
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5367$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5368        as_fn_error $? "Cannot continue" "$LINENO" 5
5369    fi
5370
5371
5372
5373    for ac_prog in tail
5374do
5375  # Extract the first word of "$ac_prog", so it can be a program name with args.
5376set dummy $ac_prog; ac_word=$2
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378$as_echo_n "checking for $ac_word... " >&6; }
5379if test "${ac_cv_path_TAIL+set}" = set; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  case $TAIL in
5383  [\\/]* | ?:[\\/]*)
5384  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5385  ;;
5386  *)
5387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388for as_dir in $PATH
5389do
5390  IFS=$as_save_IFS
5391  test -z "$as_dir" && as_dir=.
5392    for ac_exec_ext in '' $ac_executable_extensions; do
5393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5394    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396    break 2
5397  fi
5398done
5399  done
5400IFS=$as_save_IFS
5401
5402  ;;
5403esac
5404fi
5405TAIL=$ac_cv_path_TAIL
5406if test -n "$TAIL"; then
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5408$as_echo "$TAIL" >&6; }
5409else
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413
5414
5415  test -n "$TAIL" && break
5416done
5417
5418
5419    if test "x$TAIL" = x; then
5420        if test "xtail" = x; then
5421          PROG_NAME=tail
5422        else
5423          PROG_NAME=tail
5424        fi
5425        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5426$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5427        as_fn_error $? "Cannot continue" "$LINENO" 5
5428    fi
5429
5430
5431
5432    for ac_prog in tar
5433do
5434  # Extract the first word of "$ac_prog", so it can be a program name with args.
5435set dummy $ac_prog; ac_word=$2
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5437$as_echo_n "checking for $ac_word... " >&6; }
5438if test "${ac_cv_path_TAR+set}" = set; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441  case $TAR in
5442  [\\/]* | ?:[\\/]*)
5443  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5444  ;;
5445  *)
5446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449  IFS=$as_save_IFS
5450  test -z "$as_dir" && as_dir=.
5451    for ac_exec_ext in '' $ac_executable_extensions; do
5452  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5453    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455    break 2
5456  fi
5457done
5458  done
5459IFS=$as_save_IFS
5460
5461  ;;
5462esac
5463fi
5464TAR=$ac_cv_path_TAR
5465if test -n "$TAR"; then
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5467$as_echo "$TAR" >&6; }
5468else
5469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5470$as_echo "no" >&6; }
5471fi
5472
5473
5474  test -n "$TAR" && break
5475done
5476
5477
5478    if test "x$TAR" = x; then
5479        if test "xtar" = x; then
5480          PROG_NAME=tar
5481        else
5482          PROG_NAME=tar
5483        fi
5484        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5485$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5486        as_fn_error $? "Cannot continue" "$LINENO" 5
5487    fi
5488
5489
5490
5491    for ac_prog in tee
5492do
5493  # Extract the first word of "$ac_prog", so it can be a program name with args.
5494set dummy $ac_prog; ac_word=$2
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
5497if test "${ac_cv_path_TEE+set}" = set; then :
5498  $as_echo_n "(cached) " >&6
5499else
5500  case $TEE in
5501  [\\/]* | ?:[\\/]*)
5502  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5503  ;;
5504  *)
5505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506for as_dir in $PATH
5507do
5508  IFS=$as_save_IFS
5509  test -z "$as_dir" && as_dir=.
5510    for ac_exec_ext in '' $ac_executable_extensions; do
5511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5512    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514    break 2
5515  fi
5516done
5517  done
5518IFS=$as_save_IFS
5519
5520  ;;
5521esac
5522fi
5523TEE=$ac_cv_path_TEE
5524if test -n "$TEE"; then
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5526$as_echo "$TEE" >&6; }
5527else
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529$as_echo "no" >&6; }
5530fi
5531
5532
5533  test -n "$TEE" && break
5534done
5535
5536
5537    if test "x$TEE" = x; then
5538        if test "xtee" = x; then
5539          PROG_NAME=tee
5540        else
5541          PROG_NAME=tee
5542        fi
5543        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5544$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5545        as_fn_error $? "Cannot continue" "$LINENO" 5
5546    fi
5547
5548
5549
5550    for ac_prog in touch
5551do
5552  # Extract the first word of "$ac_prog", so it can be a program name with args.
5553set dummy $ac_prog; ac_word=$2
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5555$as_echo_n "checking for $ac_word... " >&6; }
5556if test "${ac_cv_path_TOUCH+set}" = set; then :
5557  $as_echo_n "(cached) " >&6
5558else
5559  case $TOUCH in
5560  [\\/]* | ?:[\\/]*)
5561  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5562  ;;
5563  *)
5564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565for as_dir in $PATH
5566do
5567  IFS=$as_save_IFS
5568  test -z "$as_dir" && as_dir=.
5569    for ac_exec_ext in '' $ac_executable_extensions; do
5570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5571    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573    break 2
5574  fi
5575done
5576  done
5577IFS=$as_save_IFS
5578
5579  ;;
5580esac
5581fi
5582TOUCH=$ac_cv_path_TOUCH
5583if test -n "$TOUCH"; then
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5585$as_echo "$TOUCH" >&6; }
5586else
5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5588$as_echo "no" >&6; }
5589fi
5590
5591
5592  test -n "$TOUCH" && break
5593done
5594
5595
5596    if test "x$TOUCH" = x; then
5597        if test "xtouch" = x; then
5598          PROG_NAME=touch
5599        else
5600          PROG_NAME=touch
5601        fi
5602        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5603$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5604        as_fn_error $? "Cannot continue" "$LINENO" 5
5605    fi
5606
5607
5608
5609    for ac_prog in tr
5610do
5611  # Extract the first word of "$ac_prog", so it can be a program name with args.
5612set dummy $ac_prog; ac_word=$2
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5614$as_echo_n "checking for $ac_word... " >&6; }
5615if test "${ac_cv_path_TR+set}" = set; then :
5616  $as_echo_n "(cached) " >&6
5617else
5618  case $TR in
5619  [\\/]* | ?:[\\/]*)
5620  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5621  ;;
5622  *)
5623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in $PATH
5625do
5626  IFS=$as_save_IFS
5627  test -z "$as_dir" && as_dir=.
5628    for ac_exec_ext in '' $ac_executable_extensions; do
5629  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5630    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5632    break 2
5633  fi
5634done
5635  done
5636IFS=$as_save_IFS
5637
5638  ;;
5639esac
5640fi
5641TR=$ac_cv_path_TR
5642if test -n "$TR"; then
5643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5644$as_echo "$TR" >&6; }
5645else
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647$as_echo "no" >&6; }
5648fi
5649
5650
5651  test -n "$TR" && break
5652done
5653
5654
5655    if test "x$TR" = x; then
5656        if test "xtr" = x; then
5657          PROG_NAME=tr
5658        else
5659          PROG_NAME=tr
5660        fi
5661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5662$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5663        as_fn_error $? "Cannot continue" "$LINENO" 5
5664    fi
5665
5666
5667
5668    for ac_prog in uname
5669do
5670  # Extract the first word of "$ac_prog", so it can be a program name with args.
5671set dummy $ac_prog; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
5674if test "${ac_cv_path_UNAME+set}" = set; then :
5675  $as_echo_n "(cached) " >&6
5676else
5677  case $UNAME in
5678  [\\/]* | ?:[\\/]*)
5679  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5680  ;;
5681  *)
5682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683for as_dir in $PATH
5684do
5685  IFS=$as_save_IFS
5686  test -z "$as_dir" && as_dir=.
5687    for ac_exec_ext in '' $ac_executable_extensions; do
5688  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5689    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5691    break 2
5692  fi
5693done
5694  done
5695IFS=$as_save_IFS
5696
5697  ;;
5698esac
5699fi
5700UNAME=$ac_cv_path_UNAME
5701if test -n "$UNAME"; then
5702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5703$as_echo "$UNAME" >&6; }
5704else
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
5707fi
5708
5709
5710  test -n "$UNAME" && break
5711done
5712
5713
5714    if test "x$UNAME" = x; then
5715        if test "xuname" = x; then
5716          PROG_NAME=uname
5717        else
5718          PROG_NAME=uname
5719        fi
5720        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5721$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5722        as_fn_error $? "Cannot continue" "$LINENO" 5
5723    fi
5724
5725
5726
5727    for ac_prog in uniq
5728do
5729  # Extract the first word of "$ac_prog", so it can be a program name with args.
5730set dummy $ac_prog; ac_word=$2
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5732$as_echo_n "checking for $ac_word... " >&6; }
5733if test "${ac_cv_path_UNIQ+set}" = set; then :
5734  $as_echo_n "(cached) " >&6
5735else
5736  case $UNIQ in
5737  [\\/]* | ?:[\\/]*)
5738  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5739  ;;
5740  *)
5741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742for as_dir in $PATH
5743do
5744  IFS=$as_save_IFS
5745  test -z "$as_dir" && as_dir=.
5746    for ac_exec_ext in '' $ac_executable_extensions; do
5747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5748    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5750    break 2
5751  fi
5752done
5753  done
5754IFS=$as_save_IFS
5755
5756  ;;
5757esac
5758fi
5759UNIQ=$ac_cv_path_UNIQ
5760if test -n "$UNIQ"; then
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5762$as_echo "$UNIQ" >&6; }
5763else
5764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
5766fi
5767
5768
5769  test -n "$UNIQ" && break
5770done
5771
5772
5773    if test "x$UNIQ" = x; then
5774        if test "xuniq" = x; then
5775          PROG_NAME=uniq
5776        else
5777          PROG_NAME=uniq
5778        fi
5779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5780$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5781        as_fn_error $? "Cannot continue" "$LINENO" 5
5782    fi
5783
5784
5785
5786    for ac_prog in wc
5787do
5788  # Extract the first word of "$ac_prog", so it can be a program name with args.
5789set dummy $ac_prog; ac_word=$2
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5791$as_echo_n "checking for $ac_word... " >&6; }
5792if test "${ac_cv_path_WC+set}" = set; then :
5793  $as_echo_n "(cached) " >&6
5794else
5795  case $WC in
5796  [\\/]* | ?:[\\/]*)
5797  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5798  ;;
5799  *)
5800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803  IFS=$as_save_IFS
5804  test -z "$as_dir" && as_dir=.
5805    for ac_exec_ext in '' $ac_executable_extensions; do
5806  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5807    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5809    break 2
5810  fi
5811done
5812  done
5813IFS=$as_save_IFS
5814
5815  ;;
5816esac
5817fi
5818WC=$ac_cv_path_WC
5819if test -n "$WC"; then
5820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5821$as_echo "$WC" >&6; }
5822else
5823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824$as_echo "no" >&6; }
5825fi
5826
5827
5828  test -n "$WC" && break
5829done
5830
5831
5832    if test "x$WC" = x; then
5833        if test "xwc" = x; then
5834          PROG_NAME=wc
5835        else
5836          PROG_NAME=wc
5837        fi
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5839$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5840        as_fn_error $? "Cannot continue" "$LINENO" 5
5841    fi
5842
5843
5844
5845    for ac_prog in which
5846do
5847  # Extract the first word of "$ac_prog", so it can be a program name with args.
5848set dummy $ac_prog; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if test "${ac_cv_path_WHICH+set}" = set; then :
5852  $as_echo_n "(cached) " >&6
5853else
5854  case $WHICH in
5855  [\\/]* | ?:[\\/]*)
5856  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5857  ;;
5858  *)
5859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5860for as_dir in $PATH
5861do
5862  IFS=$as_save_IFS
5863  test -z "$as_dir" && as_dir=.
5864    for ac_exec_ext in '' $ac_executable_extensions; do
5865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5866    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5868    break 2
5869  fi
5870done
5871  done
5872IFS=$as_save_IFS
5873
5874  ;;
5875esac
5876fi
5877WHICH=$ac_cv_path_WHICH
5878if test -n "$WHICH"; then
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5880$as_echo "$WHICH" >&6; }
5881else
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883$as_echo "no" >&6; }
5884fi
5885
5886
5887  test -n "$WHICH" && break
5888done
5889
5890
5891    if test "x$WHICH" = x; then
5892        if test "xwhich" = x; then
5893          PROG_NAME=which
5894        else
5895          PROG_NAME=which
5896        fi
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899        as_fn_error $? "Cannot continue" "$LINENO" 5
5900    fi
5901
5902
5903
5904    for ac_prog in xargs
5905do
5906  # Extract the first word of "$ac_prog", so it can be a program name with args.
5907set dummy $ac_prog; ac_word=$2
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909$as_echo_n "checking for $ac_word... " >&6; }
5910if test "${ac_cv_path_XARGS+set}" = set; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913  case $XARGS in
5914  [\\/]* | ?:[\\/]*)
5915  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5916  ;;
5917  *)
5918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921  IFS=$as_save_IFS
5922  test -z "$as_dir" && as_dir=.
5923    for ac_exec_ext in '' $ac_executable_extensions; do
5924  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5925    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927    break 2
5928  fi
5929done
5930  done
5931IFS=$as_save_IFS
5932
5933  ;;
5934esac
5935fi
5936XARGS=$ac_cv_path_XARGS
5937if test -n "$XARGS"; then
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5939$as_echo "$XARGS" >&6; }
5940else
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942$as_echo "no" >&6; }
5943fi
5944
5945
5946  test -n "$XARGS" && break
5947done
5948
5949
5950    if test "x$XARGS" = x; then
5951        if test "xxargs" = x; then
5952          PROG_NAME=xargs
5953        else
5954          PROG_NAME=xargs
5955        fi
5956        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5957$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5958        as_fn_error $? "Cannot continue" "$LINENO" 5
5959    fi
5960
5961
5962
5963# Then required tools that require some special treatment.
5964for ac_prog in gawk mawk nawk awk
5965do
5966  # Extract the first word of "$ac_prog", so it can be a program name with args.
5967set dummy $ac_prog; ac_word=$2
5968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5969$as_echo_n "checking for $ac_word... " >&6; }
5970if test "${ac_cv_prog_AWK+set}" = set; then :
5971  $as_echo_n "(cached) " >&6
5972else
5973  if test -n "$AWK"; then
5974  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5975else
5976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979  IFS=$as_save_IFS
5980  test -z "$as_dir" && as_dir=.
5981    for ac_exec_ext in '' $ac_executable_extensions; do
5982  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5983    ac_cv_prog_AWK="$ac_prog"
5984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985    break 2
5986  fi
5987done
5988  done
5989IFS=$as_save_IFS
5990
5991fi
5992fi
5993AWK=$ac_cv_prog_AWK
5994if test -n "$AWK"; then
5995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5996$as_echo "$AWK" >&6; }
5997else
5998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999$as_echo "no" >&6; }
6000fi
6001
6002
6003  test -n "$AWK" && break
6004done
6005
6006
6007    if test "x$AWK" = x; then
6008        if test "x" = x; then
6009          PROG_NAME=awk
6010        else
6011          PROG_NAME=
6012        fi
6013        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6014$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6015        as_fn_error $? "Cannot continue" "$LINENO" 5
6016    fi
6017
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6019$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6020if test "${ac_cv_path_GREP+set}" = set; then :
6021  $as_echo_n "(cached) " >&6
6022else
6023  if test -z "$GREP"; then
6024  ac_path_GREP_found=false
6025  # Loop through the user's path and test for each of PROGNAME-LIST
6026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6028do
6029  IFS=$as_save_IFS
6030  test -z "$as_dir" && as_dir=.
6031    for ac_prog in grep ggrep; do
6032    for ac_exec_ext in '' $ac_executable_extensions; do
6033      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6034      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6035# Check for GNU ac_path_GREP and select it if it is found.
6036  # Check for GNU $ac_path_GREP
6037case `"$ac_path_GREP" --version 2>&1` in
6038*GNU*)
6039  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6040*)
6041  ac_count=0
6042  $as_echo_n 0123456789 >"conftest.in"
6043  while :
6044  do
6045    cat "conftest.in" "conftest.in" >"conftest.tmp"
6046    mv "conftest.tmp" "conftest.in"
6047    cp "conftest.in" "conftest.nl"
6048    $as_echo 'GREP' >> "conftest.nl"
6049    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6050    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6051    as_fn_arith $ac_count + 1 && ac_count=$as_val
6052    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6053      # Best one so far, save it but keep looking for a better one
6054      ac_cv_path_GREP="$ac_path_GREP"
6055      ac_path_GREP_max=$ac_count
6056    fi
6057    # 10*(2^10) chars as input seems more than enough
6058    test $ac_count -gt 10 && break
6059  done
6060  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6061esac
6062
6063      $ac_path_GREP_found && break 3
6064    done
6065  done
6066  done
6067IFS=$as_save_IFS
6068  if test -z "$ac_cv_path_GREP"; then
6069    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6070  fi
6071else
6072  ac_cv_path_GREP=$GREP
6073fi
6074
6075fi
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6077$as_echo "$ac_cv_path_GREP" >&6; }
6078 GREP="$ac_cv_path_GREP"
6079
6080
6081
6082    if test "x$GREP" = x; then
6083        if test "x" = x; then
6084          PROG_NAME=grep
6085        else
6086          PROG_NAME=
6087        fi
6088        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6089$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6090        as_fn_error $? "Cannot continue" "$LINENO" 5
6091    fi
6092
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6094$as_echo_n "checking for egrep... " >&6; }
6095if test "${ac_cv_path_EGREP+set}" = set; then :
6096  $as_echo_n "(cached) " >&6
6097else
6098  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6099   then ac_cv_path_EGREP="$GREP -E"
6100   else
6101     if test -z "$EGREP"; then
6102  ac_path_EGREP_found=false
6103  # Loop through the user's path and test for each of PROGNAME-LIST
6104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6106do
6107  IFS=$as_save_IFS
6108  test -z "$as_dir" && as_dir=.
6109    for ac_prog in egrep; do
6110    for ac_exec_ext in '' $ac_executable_extensions; do
6111      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6112      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6113# Check for GNU ac_path_EGREP and select it if it is found.
6114  # Check for GNU $ac_path_EGREP
6115case `"$ac_path_EGREP" --version 2>&1` in
6116*GNU*)
6117  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6118*)
6119  ac_count=0
6120  $as_echo_n 0123456789 >"conftest.in"
6121  while :
6122  do
6123    cat "conftest.in" "conftest.in" >"conftest.tmp"
6124    mv "conftest.tmp" "conftest.in"
6125    cp "conftest.in" "conftest.nl"
6126    $as_echo 'EGREP' >> "conftest.nl"
6127    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6128    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6129    as_fn_arith $ac_count + 1 && ac_count=$as_val
6130    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6131      # Best one so far, save it but keep looking for a better one
6132      ac_cv_path_EGREP="$ac_path_EGREP"
6133      ac_path_EGREP_max=$ac_count
6134    fi
6135    # 10*(2^10) chars as input seems more than enough
6136    test $ac_count -gt 10 && break
6137  done
6138  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6139esac
6140
6141      $ac_path_EGREP_found && break 3
6142    done
6143  done
6144  done
6145IFS=$as_save_IFS
6146  if test -z "$ac_cv_path_EGREP"; then
6147    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6148  fi
6149else
6150  ac_cv_path_EGREP=$EGREP
6151fi
6152
6153   fi
6154fi
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6156$as_echo "$ac_cv_path_EGREP" >&6; }
6157 EGREP="$ac_cv_path_EGREP"
6158
6159
6160
6161    if test "x$EGREP" = x; then
6162        if test "x" = x; then
6163          PROG_NAME=egrep
6164        else
6165          PROG_NAME=
6166        fi
6167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6169        as_fn_error $? "Cannot continue" "$LINENO" 5
6170    fi
6171
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6173$as_echo_n "checking for fgrep... " >&6; }
6174if test "${ac_cv_path_FGREP+set}" = set; then :
6175  $as_echo_n "(cached) " >&6
6176else
6177  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6178   then ac_cv_path_FGREP="$GREP -F"
6179   else
6180     if test -z "$FGREP"; then
6181  ac_path_FGREP_found=false
6182  # Loop through the user's path and test for each of PROGNAME-LIST
6183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6185do
6186  IFS=$as_save_IFS
6187  test -z "$as_dir" && as_dir=.
6188    for ac_prog in fgrep; do
6189    for ac_exec_ext in '' $ac_executable_extensions; do
6190      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6191      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6192# Check for GNU ac_path_FGREP and select it if it is found.
6193  # Check for GNU $ac_path_FGREP
6194case `"$ac_path_FGREP" --version 2>&1` in
6195*GNU*)
6196  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6197*)
6198  ac_count=0
6199  $as_echo_n 0123456789 >"conftest.in"
6200  while :
6201  do
6202    cat "conftest.in" "conftest.in" >"conftest.tmp"
6203    mv "conftest.tmp" "conftest.in"
6204    cp "conftest.in" "conftest.nl"
6205    $as_echo 'FGREP' >> "conftest.nl"
6206    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6207    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6208    as_fn_arith $ac_count + 1 && ac_count=$as_val
6209    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6210      # Best one so far, save it but keep looking for a better one
6211      ac_cv_path_FGREP="$ac_path_FGREP"
6212      ac_path_FGREP_max=$ac_count
6213    fi
6214    # 10*(2^10) chars as input seems more than enough
6215    test $ac_count -gt 10 && break
6216  done
6217  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6218esac
6219
6220      $ac_path_FGREP_found && break 3
6221    done
6222  done
6223  done
6224IFS=$as_save_IFS
6225  if test -z "$ac_cv_path_FGREP"; then
6226    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6227  fi
6228else
6229  ac_cv_path_FGREP=$FGREP
6230fi
6231
6232   fi
6233fi
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6235$as_echo "$ac_cv_path_FGREP" >&6; }
6236 FGREP="$ac_cv_path_FGREP"
6237
6238
6239
6240    if test "x$FGREP" = x; then
6241        if test "x" = x; then
6242          PROG_NAME=fgrep
6243        else
6244          PROG_NAME=
6245        fi
6246        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6247$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6248        as_fn_error $? "Cannot continue" "$LINENO" 5
6249    fi
6250
6251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6252$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6253if test "${ac_cv_path_SED+set}" = set; then :
6254  $as_echo_n "(cached) " >&6
6255else
6256            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6257     for ac_i in 1 2 3 4 5 6 7; do
6258       ac_script="$ac_script$as_nl$ac_script"
6259     done
6260     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6261     { ac_script=; unset ac_script;}
6262     if test -z "$SED"; then
6263  ac_path_SED_found=false
6264  # Loop through the user's path and test for each of PROGNAME-LIST
6265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266for as_dir in $PATH
6267do
6268  IFS=$as_save_IFS
6269  test -z "$as_dir" && as_dir=.
6270    for ac_prog in sed gsed; do
6271    for ac_exec_ext in '' $ac_executable_extensions; do
6272      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6273      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6274# Check for GNU ac_path_SED and select it if it is found.
6275  # Check for GNU $ac_path_SED
6276case `"$ac_path_SED" --version 2>&1` in
6277*GNU*)
6278  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6279*)
6280  ac_count=0
6281  $as_echo_n 0123456789 >"conftest.in"
6282  while :
6283  do
6284    cat "conftest.in" "conftest.in" >"conftest.tmp"
6285    mv "conftest.tmp" "conftest.in"
6286    cp "conftest.in" "conftest.nl"
6287    $as_echo '' >> "conftest.nl"
6288    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6289    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6290    as_fn_arith $ac_count + 1 && ac_count=$as_val
6291    if test $ac_count -gt ${ac_path_SED_max-0}; then
6292      # Best one so far, save it but keep looking for a better one
6293      ac_cv_path_SED="$ac_path_SED"
6294      ac_path_SED_max=$ac_count
6295    fi
6296    # 10*(2^10) chars as input seems more than enough
6297    test $ac_count -gt 10 && break
6298  done
6299  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6300esac
6301
6302      $ac_path_SED_found && break 3
6303    done
6304  done
6305  done
6306IFS=$as_save_IFS
6307  if test -z "$ac_cv_path_SED"; then
6308    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6309  fi
6310else
6311  ac_cv_path_SED=$SED
6312fi
6313
6314fi
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6316$as_echo "$ac_cv_path_SED" >&6; }
6317 SED="$ac_cv_path_SED"
6318  rm -f conftest.sed
6319
6320
6321    if test "x$SED" = x; then
6322        if test "x" = x; then
6323          PROG_NAME=sed
6324        else
6325          PROG_NAME=
6326        fi
6327        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6328$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6329        as_fn_error $? "Cannot continue" "$LINENO" 5
6330    fi
6331
6332
6333for ac_prog in nawk gawk awk
6334do
6335  # Extract the first word of "$ac_prog", so it can be a program name with args.
6336set dummy $ac_prog; ac_word=$2
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338$as_echo_n "checking for $ac_word... " >&6; }
6339if test "${ac_cv_path_NAWK+set}" = set; then :
6340  $as_echo_n "(cached) " >&6
6341else
6342  case $NAWK in
6343  [\\/]* | ?:[\\/]*)
6344  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6345  ;;
6346  *)
6347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350  IFS=$as_save_IFS
6351  test -z "$as_dir" && as_dir=.
6352    for ac_exec_ext in '' $ac_executable_extensions; do
6353  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6354    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356    break 2
6357  fi
6358done
6359  done
6360IFS=$as_save_IFS
6361
6362  ;;
6363esac
6364fi
6365NAWK=$ac_cv_path_NAWK
6366if test -n "$NAWK"; then
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6368$as_echo "$NAWK" >&6; }
6369else
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375  test -n "$NAWK" && break
6376done
6377
6378
6379    if test "x$NAWK" = x; then
6380        if test "x" = x; then
6381          PROG_NAME=nawk
6382        else
6383          PROG_NAME=
6384        fi
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6386$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6387        as_fn_error $? "Cannot continue" "$LINENO" 5
6388    fi
6389
6390
6391# Always force rm.
6392RM="$RM -f"
6393
6394# These are not required on all platforms
6395# Extract the first word of "cygpath", so it can be a program name with args.
6396set dummy cygpath; ac_word=$2
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6398$as_echo_n "checking for $ac_word... " >&6; }
6399if test "${ac_cv_path_CYGPATH+set}" = set; then :
6400  $as_echo_n "(cached) " >&6
6401else
6402  case $CYGPATH in
6403  [\\/]* | ?:[\\/]*)
6404  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6405  ;;
6406  *)
6407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410  IFS=$as_save_IFS
6411  test -z "$as_dir" && as_dir=.
6412    for ac_exec_ext in '' $ac_executable_extensions; do
6413  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6414    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416    break 2
6417  fi
6418done
6419  done
6420IFS=$as_save_IFS
6421
6422  ;;
6423esac
6424fi
6425CYGPATH=$ac_cv_path_CYGPATH
6426if test -n "$CYGPATH"; then
6427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6428$as_echo "$CYGPATH" >&6; }
6429else
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
6434
6435# Extract the first word of "readlink", so it can be a program name with args.
6436set dummy readlink; ac_word=$2
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6438$as_echo_n "checking for $ac_word... " >&6; }
6439if test "${ac_cv_path_READLINK+set}" = set; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442  case $READLINK in
6443  [\\/]* | ?:[\\/]*)
6444  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6445  ;;
6446  *)
6447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448for as_dir in $PATH
6449do
6450  IFS=$as_save_IFS
6451  test -z "$as_dir" && as_dir=.
6452    for ac_exec_ext in '' $ac_executable_extensions; do
6453  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6454    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6456    break 2
6457  fi
6458done
6459  done
6460IFS=$as_save_IFS
6461
6462  ;;
6463esac
6464fi
6465READLINK=$ac_cv_path_READLINK
6466if test -n "$READLINK"; then
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6468$as_echo "$READLINK" >&6; }
6469else
6470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
6472fi
6473
6474
6475# Extract the first word of "df", so it can be a program name with args.
6476set dummy df; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if test "${ac_cv_path_DF+set}" = set; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $DF in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6494    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505DF=$ac_cv_path_DF
6506if test -n "$DF"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6508$as_echo "$DF" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515# Extract the first word of "SetFile", so it can be a program name with args.
6516set dummy SetFile; ac_word=$2
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518$as_echo_n "checking for $ac_word... " >&6; }
6519if test "${ac_cv_path_SETFILE+set}" = set; then :
6520  $as_echo_n "(cached) " >&6
6521else
6522  case $SETFILE in
6523  [\\/]* | ?:[\\/]*)
6524  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6525  ;;
6526  *)
6527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528for as_dir in $PATH
6529do
6530  IFS=$as_save_IFS
6531  test -z "$as_dir" && as_dir=.
6532    for ac_exec_ext in '' $ac_executable_extensions; do
6533  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6534    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536    break 2
6537  fi
6538done
6539  done
6540IFS=$as_save_IFS
6541
6542  ;;
6543esac
6544fi
6545SETFILE=$ac_cv_path_SETFILE
6546if test -n "$SETFILE"; then
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6548$as_echo "$SETFILE" >&6; }
6549else
6550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555
6556
6557# Now we can determine OpenJDK build and target platforms. This is required to
6558# have early on.
6559# Make sure we can run config.sub.
6560$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6561  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6562
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6564$as_echo_n "checking build system type... " >&6; }
6565if test "${ac_cv_build+set}" = set; then :
6566  $as_echo_n "(cached) " >&6
6567else
6568  ac_build_alias=$build_alias
6569test "x$ac_build_alias" = x &&
6570  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6571test "x$ac_build_alias" = x &&
6572  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6573ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6574  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6575
6576fi
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6578$as_echo "$ac_cv_build" >&6; }
6579case $ac_cv_build in
6580*-*-*) ;;
6581*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6582esac
6583build=$ac_cv_build
6584ac_save_IFS=$IFS; IFS='-'
6585set x $ac_cv_build
6586shift
6587build_cpu=$1
6588build_vendor=$2
6589shift; shift
6590# Remember, the first character of IFS is used to create $*,
6591# except with old shells:
6592build_os=$*
6593IFS=$ac_save_IFS
6594case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6595
6596
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6598$as_echo_n "checking host system type... " >&6; }
6599if test "${ac_cv_host+set}" = set; then :
6600  $as_echo_n "(cached) " >&6
6601else
6602  if test "x$host_alias" = x; then
6603  ac_cv_host=$ac_cv_build
6604else
6605  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6606    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6607fi
6608
6609fi
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6611$as_echo "$ac_cv_host" >&6; }
6612case $ac_cv_host in
6613*-*-*) ;;
6614*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6615esac
6616host=$ac_cv_host
6617ac_save_IFS=$IFS; IFS='-'
6618set x $ac_cv_host
6619shift
6620host_cpu=$1
6621host_vendor=$2
6622shift; shift
6623# Remember, the first character of IFS is used to create $*,
6624# except with old shells:
6625host_os=$*
6626IFS=$ac_save_IFS
6627case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6628
6629
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6631$as_echo_n "checking target system type... " >&6; }
6632if test "${ac_cv_target+set}" = set; then :
6633  $as_echo_n "(cached) " >&6
6634else
6635  if test "x$target_alias" = x; then
6636  ac_cv_target=$ac_cv_host
6637else
6638  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6639    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6640fi
6641
6642fi
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6644$as_echo "$ac_cv_target" >&6; }
6645case $ac_cv_target in
6646*-*-*) ;;
6647*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6648esac
6649target=$ac_cv_target
6650ac_save_IFS=$IFS; IFS='-'
6651set x $ac_cv_target
6652shift
6653target_cpu=$1
6654target_vendor=$2
6655shift; shift
6656# Remember, the first character of IFS is used to create $*,
6657# except with old shells:
6658target_os=$*
6659IFS=$ac_save_IFS
6660case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6661
6662
6663# The aliases save the names the user supplied, while $host etc.
6664# will get canonicalized.
6665test -n "$target_alias" &&
6666  test "$program_prefix$program_suffix$program_transform_name" = \
6667    NONENONEs,x,x, &&
6668  program_prefix=${target_alias}-
6669
6670# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6671# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6672# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6673# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6674# to use the configure naming style.
6675
6676
6677
6678
6679
6680    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6681    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6682    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6683    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6684    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6685    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6686
6687
6688
6689    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6690
6691  case "$build_os" in
6692    *linux*)
6693      VAR_OS=linux
6694      VAR_OS_API=posix
6695      VAR_OS_ENV=linux
6696      ;;
6697    *solaris*)
6698      VAR_OS=solaris
6699      VAR_OS_API=posix
6700      VAR_OS_ENV=solaris
6701      ;;
6702    *darwin*)
6703      VAR_OS=macosx
6704      VAR_OS_API=posix
6705      VAR_OS_ENV=macosx
6706      ;;
6707    *bsd*)
6708      VAR_OS=bsd
6709      VAR_OS_API=posix
6710      VAR_OS_ENV=bsd
6711      ;;
6712    *cygwin*)
6713      VAR_OS=windows
6714      VAR_OS_API=winapi
6715      VAR_OS_ENV=windows.cygwin
6716      ;;
6717    *mingw*)
6718      VAR_OS=windows
6719      VAR_OS_API=winapi
6720      VAR_OS_ENV=windows.msys
6721      ;;
6722    *)
6723      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6724      ;;
6725  esac
6726
6727
6728  # First argument is the cpu name from the trip/quad
6729  case "$build_cpu" in
6730    x86_64)
6731      VAR_CPU=x86_64
6732      VAR_CPU_ARCH=x86
6733      VAR_CPU_BITS=64
6734      VAR_CPU_ENDIAN=little
6735      ;;
6736    i?86)
6737      VAR_CPU=x86
6738      VAR_CPU_ARCH=x86
6739      VAR_CPU_BITS=32
6740      VAR_CPU_ENDIAN=little
6741      ;;
6742    arm*)
6743      VAR_CPU=arm
6744      VAR_CPU_ARCH=arm
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=little
6747      ;;
6748    powerpc)
6749      VAR_CPU=ppc
6750      VAR_CPU_ARCH=ppc
6751      VAR_CPU_BITS=32
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    powerpc64)
6755      VAR_CPU=ppc64
6756      VAR_CPU_ARCH=ppc
6757      VAR_CPU_BITS=64
6758      VAR_CPU_ENDIAN=big
6759       ;;
6760    sparc)
6761      VAR_CPU=sparc
6762      VAR_CPU_ARCH=sparc
6763      VAR_CPU_BITS=32
6764      VAR_CPU_ENDIAN=big
6765       ;;
6766    sparcv9)
6767      VAR_CPU=sparcv9
6768      VAR_CPU_ARCH=sparc
6769      VAR_CPU_BITS=64
6770      VAR_CPU_ENDIAN=big
6771       ;;
6772    *)
6773      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6774      ;;
6775  esac
6776
6777    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6778    OPENJDK_BUILD_OS="$VAR_OS"
6779    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6780    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6781    OPENJDK_BUILD_CPU="$VAR_CPU"
6782    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6783    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6784    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6785
6786
6787
6788
6789
6790
6791
6792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6793$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6795$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6796
6797    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6798
6799  case "$host_os" in
6800    *linux*)
6801      VAR_OS=linux
6802      VAR_OS_API=posix
6803      VAR_OS_ENV=linux
6804      ;;
6805    *solaris*)
6806      VAR_OS=solaris
6807      VAR_OS_API=posix
6808      VAR_OS_ENV=solaris
6809      ;;
6810    *darwin*)
6811      VAR_OS=macosx
6812      VAR_OS_API=posix
6813      VAR_OS_ENV=macosx
6814      ;;
6815    *bsd*)
6816      VAR_OS=bsd
6817      VAR_OS_API=posix
6818      VAR_OS_ENV=bsd
6819      ;;
6820    *cygwin*)
6821      VAR_OS=windows
6822      VAR_OS_API=winapi
6823      VAR_OS_ENV=windows.cygwin
6824      ;;
6825    *mingw*)
6826      VAR_OS=windows
6827      VAR_OS_API=winapi
6828      VAR_OS_ENV=windows.msys
6829      ;;
6830    *)
6831      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6832      ;;
6833  esac
6834
6835
6836  # First argument is the cpu name from the trip/quad
6837  case "$host_cpu" in
6838    x86_64)
6839      VAR_CPU=x86_64
6840      VAR_CPU_ARCH=x86
6841      VAR_CPU_BITS=64
6842      VAR_CPU_ENDIAN=little
6843      ;;
6844    i?86)
6845      VAR_CPU=x86
6846      VAR_CPU_ARCH=x86
6847      VAR_CPU_BITS=32
6848      VAR_CPU_ENDIAN=little
6849      ;;
6850    arm*)
6851      VAR_CPU=arm
6852      VAR_CPU_ARCH=arm
6853      VAR_CPU_BITS=32
6854      VAR_CPU_ENDIAN=little
6855      ;;
6856    powerpc)
6857      VAR_CPU=ppc
6858      VAR_CPU_ARCH=ppc
6859      VAR_CPU_BITS=32
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    powerpc64)
6863      VAR_CPU=ppc64
6864      VAR_CPU_ARCH=ppc
6865      VAR_CPU_BITS=64
6866      VAR_CPU_ENDIAN=big
6867       ;;
6868    sparc)
6869      VAR_CPU=sparc
6870      VAR_CPU_ARCH=sparc
6871      VAR_CPU_BITS=32
6872      VAR_CPU_ENDIAN=big
6873       ;;
6874    sparcv9)
6875      VAR_CPU=sparcv9
6876      VAR_CPU_ARCH=sparc
6877      VAR_CPU_BITS=64
6878      VAR_CPU_ENDIAN=big
6879       ;;
6880    *)
6881      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6882      ;;
6883  esac
6884
6885    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6886    OPENJDK_TARGET_OS="$VAR_OS"
6887    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6888    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6889    OPENJDK_TARGET_CPU="$VAR_CPU"
6890    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6891    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6892    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6893
6894
6895
6896
6897
6898
6899
6900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6901$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6903$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6904
6905
6906
6907# Check whether --with-target-bits was given.
6908if test "${with_target_bits+set}" = set; then :
6909  withval=$with_target_bits;
6910fi
6911
6912
6913  # We have three types of compiles:
6914  # native  == normal compilation, target system == build system
6915  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6916  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6917  #
6918  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6919    # We're doing a proper cross-compilation
6920    COMPILE_TYPE="cross"
6921  else
6922    COMPILE_TYPE="native"
6923  fi
6924
6925  if test "x$with_target_bits" != x; then
6926    if test "x$COMPILE_TYPE" = "xcross"; then
6927      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6928    fi
6929
6930    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6931      # A reduced build is requested
6932      COMPILE_TYPE="reduced"
6933      OPENJDK_TARGET_CPU_BITS=32
6934      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6935        OPENJDK_TARGET_CPU=x86
6936      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6937        OPENJDK_TARGET_CPU=sparc
6938      else
6939        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6940      fi
6941    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6942      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
6943    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6944      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6945$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6946    else
6947      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6948    fi
6949  fi
6950
6951
6952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6953$as_echo_n "checking compilation type... " >&6; }
6954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6955$as_echo "$COMPILE_TYPE" >&6; }
6956
6957
6958    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6959       REQUIRED_OS_NAME=SunOS
6960       REQUIRED_OS_VERSION=5.10
6961    fi
6962    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6963       REQUIRED_OS_NAME=Linux
6964       REQUIRED_OS_VERSION=2.6
6965    fi
6966    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6967        REQUIRED_OS_NAME=Windows
6968        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6969            REQUIRED_OS_VERSION=5.2
6970        else
6971            REQUIRED_OS_VERSION=5.1
6972        fi
6973    fi
6974    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6975        REQUIRED_OS_NAME=Darwin
6976        REQUIRED_OS_VERSION=11.2
6977    fi
6978
6979
6980
6981
6982
6983    # Also store the legacy naming of the cpu.
6984    # Ie i586 and amd64 instead of x86 and x86_64
6985    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6986    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6987      OPENJDK_TARGET_CPU_LEGACY="i586"
6988    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6989      # On all platforms except MacOSX replace x86_64 with amd64.
6990      OPENJDK_TARGET_CPU_LEGACY="amd64"
6991    fi
6992
6993
6994    # And the second legacy naming of the cpu.
6995    # Ie i386 and amd64 instead of x86 and x86_64.
6996    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6997    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6998      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6999    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7000      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7001    fi
7002
7003
7004    # This is the name of the cpu (but using i386 and amd64 instead of
7005    # x86 and x86_64, respectively), preceeded by a /, to be used when
7006    # locating libraries. On macosx, it's empty, though.
7007    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7008    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7009        OPENJDK_TARGET_CPU_LIBDIR=""
7010    fi
7011
7012
7013    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7014    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7015    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7016    OPENJDK_TARGET_CPU_ISADIR=""
7017    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7018      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7020      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7021          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7022      fi
7023    fi
7024
7025
7026    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7027    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7028    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7029      # On linux only, we replace x86 with i386.
7030      OPENJDK_TARGET_CPU_OSARCH="i386"
7031    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7032      # On all platforms except macosx, we replace x86_64 with amd64.
7033      OPENJDK_TARGET_CPU_OSARCH="amd64"
7034    fi
7035
7036
7037    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7038    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7039      OPENJDK_TARGET_CPU_JLI="i386"
7040    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7041      # On all platforms except macosx, we replace x86_64 with amd64.
7042      OPENJDK_TARGET_CPU_JLI="amd64"
7043    fi
7044    # Now setup the -D flags for building libjli.
7045    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7046    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7047      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7048        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7049      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7050        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7051      fi
7052    fi
7053
7054
7055    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7056    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7057        OPENJDK_TARGET_OS_API_DIR="solaris"
7058    fi
7059    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7060        OPENJDK_TARGET_OS_API_DIR="windows"
7061    fi
7062
7063
7064    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7065        A_LP64="LP64:="
7066        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7067        # unpack200.exe
7068        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7069            ADD_LP64="-D_LP64=1"
7070        fi
7071    fi
7072    LP64=$A_LP64
7073
7074
7075    if test "x$COMPILE_TYPE" = "xcross"; then
7076      # FIXME: ... or should this include reduced builds..?
7077      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7078    else
7079      DEFINE_CROSS_COMPILE_ARCH=""
7080    fi
7081
7082
7083
7084
7085# Continue setting up basic stuff. Most remaining code require fundamental tools.
7086
7087# Locate the directory of this script.
7088SCRIPT="$0"
7089
7090    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7091        # Follow a chain of symbolic links. Use readlink
7092        # where it exists, else fall back to horribly
7093        # complicated shell code.
7094        if test "x$READLINK_TESTED" != yes; then
7095            # On MacOSX there is a readlink tool with a different
7096            # purpose than the GNU readlink tool. Check the found readlink.
7097            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7098            if test "x$ISGNU" = x; then
7099                 # A readlink that we do not know how to use.
7100                 # Are there other non-GNU readlinks out there?
7101                 READLINK_TESTED=yes
7102                 READLINK=
7103            fi
7104        fi
7105
7106        if test "x$READLINK" != x; then
7107            SCRIPT=`$READLINK -f $SCRIPT`
7108        else
7109            # Save the current directory for restoring afterwards
7110            STARTDIR=$PWD
7111            COUNTER=0
7112            sym_link_dir=`$DIRNAME $SCRIPT`
7113            sym_link_file=`$BASENAME $SCRIPT`
7114            # Use the system pwd and not the shell builtin to resolve directory symlinks
7115            cd $sym_link_dir
7116            cd `$THEPWDCMD`
7117            sym_link_dir=`$THEPWDCMD`
7118            # Resolve file symlinks
7119            while test $COUNTER -lt 20; do
7120                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7121                if test "x$ISLINK" == x; then
7122                    # This is not a symbolic link! We are done!
7123                    break
7124                fi
7125                # Again resolve directory symlinks since the target of the just found
7126                # link could be in a different directory
7127                cd `$DIRNAME $ISLINK`
7128                sym_link_dir=`$THEPWDCMD`
7129                sym_link_file=`$BASENAME $ISLINK`
7130                let COUNTER=COUNTER+1
7131            done
7132            cd $STARTDIR
7133            SCRIPT=$sym_link_dir/$sym_link_file
7134        fi
7135    fi
7136
7137AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7138
7139# Where is the source? It is located two levels above the configure script.
7140CURDIR="$PWD"
7141cd "$AUTOCONF_DIR/../.."
7142SRC_ROOT="`$THEPWDCMD`"
7143
7144if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7145  PATH_SEP=";"
7146
7147  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7148  if test $SRC_ROOT_LENGTH -gt 100; then
7149      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7150  fi
7151
7152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7154$as_echo_n "checking cygwin release... " >&6; }
7155    CYGWIN_VERSION=`$UNAME -r`
7156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7157$as_echo "$CYGWIN_VERSION" >&6; }
7158    WINDOWS_ENV_VENDOR='cygwin'
7159    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7160
7161    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7162    if test "x$CYGWIN_VERSION_OK" = x; then
7163      { $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
7164$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;}
7165      as_fn_error $? "Cannot continue" "$LINENO" 5
7166    fi
7167    if test "x$CYGPATH" = x; then
7168        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7169    fi
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7171$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7172    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7173    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7174    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7175    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7177$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7178    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7179    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7180    if test "x$test_cygdrive_prefix" = x; then
7181        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7182    fi
7183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7185$as_echo_n "checking msys release... " >&6; }
7186    MSYS_VERSION=`$UNAME -r`
7187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7188$as_echo "$MSYS_VERSION" >&6; }
7189
7190    WINDOWS_ENV_VENDOR='msys'
7191    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7192
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7194$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7195    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7196    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7197
7198  windows_path="$MSYS_ROOT_PATH"
7199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7200    unix_path=`$CYGPATH -u "$windows_path"`
7201    MSYS_ROOT_PATH="$unix_path"
7202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7204    MSYS_ROOT_PATH="$unix_path"
7205  fi
7206
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7208$as_echo "$MSYS_ROOT_PATH" >&6; }
7209    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7210  else
7211    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7212  fi
7213
7214  # Test if windows or unix (cygwin/msys) find is first in path.
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7216$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7217  FIND_BINARY_OUTPUT=`find --version 2>&1`
7218  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7220$as_echo "unix style" >&6; }
7221  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7223$as_echo "Windows" >&6; }
7224    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7225$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7226    { $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
7227$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7228    as_fn_error $? "Cannot continue" "$LINENO" 5
7229  else
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7231$as_echo "unknown" >&6; }
7232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7233$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7234  fi
7235
7236else
7237  PATH_SEP=":"
7238fi
7239
7240
7241
7242cd "$CURDIR"
7243
7244
7245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7246
7247  # Input might be given as Windows format, start by converting to
7248  # unix format.
7249  path="$SRC_ROOT"
7250  new_path=`$CYGPATH -u "$path"`
7251
7252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7255  # "foo.exe" is OK but "foo" is an error.
7256  #
7257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7258  # It is also a way to make sure we got the proper file name for the real test later on.
7259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7260  if test "x$test_shortpath" = x; then
7261    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7262$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7263    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7264  fi
7265
7266  # Call helper function which possibly converts this using DOS-style short mode.
7267  # If so, the updated path is stored in $new_path.
7268
7269  input_path="$new_path"
7270  # Check if we need to convert this using DOS-style short mode. If the path
7271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7272  # take no chances and rewrite it.
7273  # Note: m4 eats our [], so we need to use [ and ] instead.
7274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7275  if test "x$has_forbidden_chars" != x; then
7276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7280      # Going to short mode and back again did indeed matter. Since short mode is
7281      # case insensitive, let's make it lowercase to improve readability.
7282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7283      # Now convert it back to Unix-stile (cygpath)
7284      input_path=`$CYGPATH -u "$shortmode_path"`
7285      new_path="$input_path"
7286    fi
7287  fi
7288
7289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7290  if test "x$test_cygdrive_prefix" = x; then
7291    # As a simple fix, exclude /usr/bin since it's not a real path.
7292    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7294      # a path prefixed by /cygdrive for fixpath to work.
7295      new_path="$CYGWIN_ROOT_PATH$input_path"
7296    fi
7297  fi
7298
7299
7300  if test "x$path" != "x$new_path"; then
7301    SRC_ROOT="$new_path"
7302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7303$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7304  fi
7305
7306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7307
7308  path="$SRC_ROOT"
7309  has_colon=`$ECHO $path | $GREP ^.:`
7310  new_path="$path"
7311  if test "x$has_colon" = x; then
7312    # Not in mixed or Windows style, start by that.
7313    new_path=`cmd //c echo $path`
7314  fi
7315
7316
7317  input_path="$new_path"
7318  # Check if we need to convert this using DOS-style short mode. If the path
7319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7320  # take no chances and rewrite it.
7321  # Note: m4 eats our [], so we need to use [ and ] instead.
7322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7323  if test "x$has_forbidden_chars" != x; then
7324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7326  fi
7327
7328
7329  windows_path="$new_path"
7330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7331    unix_path=`$CYGPATH -u "$windows_path"`
7332    new_path="$unix_path"
7333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7335    new_path="$unix_path"
7336  fi
7337
7338  if test "x$path" != "x$new_path"; then
7339    SRC_ROOT="$new_path"
7340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7341$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7342  fi
7343
7344  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7345  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7346
7347  else
7348    # We're on a posix platform. Hooray! :)
7349    path="$SRC_ROOT"
7350
7351    if test ! -f "$path" && test ! -d "$path"; then
7352      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7353    fi
7354
7355    has_space=`$ECHO "$path" | $GREP " "`
7356    if test "x$has_space" != x; then
7357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7358$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7359      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7360    fi
7361  fi
7362
7363
7364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7365
7366  # Input might be given as Windows format, start by converting to
7367  # unix format.
7368  path="$CURDIR"
7369  new_path=`$CYGPATH -u "$path"`
7370
7371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7374  # "foo.exe" is OK but "foo" is an error.
7375  #
7376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7377  # It is also a way to make sure we got the proper file name for the real test later on.
7378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7379  if test "x$test_shortpath" = x; then
7380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7381$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7382    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7383  fi
7384
7385  # Call helper function which possibly converts this using DOS-style short mode.
7386  # If so, the updated path is stored in $new_path.
7387
7388  input_path="$new_path"
7389  # Check if we need to convert this using DOS-style short mode. If the path
7390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7391  # take no chances and rewrite it.
7392  # Note: m4 eats our [], so we need to use [ and ] instead.
7393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7394  if test "x$has_forbidden_chars" != x; then
7395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7399      # Going to short mode and back again did indeed matter. Since short mode is
7400      # case insensitive, let's make it lowercase to improve readability.
7401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7402      # Now convert it back to Unix-stile (cygpath)
7403      input_path=`$CYGPATH -u "$shortmode_path"`
7404      new_path="$input_path"
7405    fi
7406  fi
7407
7408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7409  if test "x$test_cygdrive_prefix" = x; then
7410    # As a simple fix, exclude /usr/bin since it's not a real path.
7411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7413      # a path prefixed by /cygdrive for fixpath to work.
7414      new_path="$CYGWIN_ROOT_PATH$input_path"
7415    fi
7416  fi
7417
7418
7419  if test "x$path" != "x$new_path"; then
7420    CURDIR="$new_path"
7421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7422$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7423  fi
7424
7425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7426
7427  path="$CURDIR"
7428  has_colon=`$ECHO $path | $GREP ^.:`
7429  new_path="$path"
7430  if test "x$has_colon" = x; then
7431    # Not in mixed or Windows style, start by that.
7432    new_path=`cmd //c echo $path`
7433  fi
7434
7435
7436  input_path="$new_path"
7437  # Check if we need to convert this using DOS-style short mode. If the path
7438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7439  # take no chances and rewrite it.
7440  # Note: m4 eats our [], so we need to use [ and ] instead.
7441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7442  if test "x$has_forbidden_chars" != x; then
7443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7445  fi
7446
7447
7448  windows_path="$new_path"
7449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7450    unix_path=`$CYGPATH -u "$windows_path"`
7451    new_path="$unix_path"
7452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7454    new_path="$unix_path"
7455  fi
7456
7457  if test "x$path" != "x$new_path"; then
7458    CURDIR="$new_path"
7459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7460$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7461  fi
7462
7463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7465
7466  else
7467    # We're on a posix platform. Hooray! :)
7468    path="$CURDIR"
7469
7470    if test ! -f "$path" && test ! -d "$path"; then
7471      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7472    fi
7473
7474    has_space=`$ECHO "$path" | $GREP " "`
7475    if test "x$has_space" != x; then
7476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7477$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7478      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7479    fi
7480  fi
7481
7482
7483if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7484    # Add extra search paths on solaris for utilities like ar and as etc...
7485    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7486fi
7487
7488# You can force the sys-root if the sys-root encoded into the cross compiler tools
7489# is not correct.
7490
7491# Check whether --with-sys-root was given.
7492if test "${with_sys_root+set}" = set; then :
7493  withval=$with_sys_root;
7494fi
7495
7496
7497if test "x$with_sys_root" != x; then
7498  SYS_ROOT=$with_sys_root
7499else
7500  SYS_ROOT=/
7501fi
7502
7503
7504
7505# Check whether --with-tools-dir was given.
7506if test "${with_tools_dir+set}" = set; then :
7507  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7508fi
7509
7510
7511
7512# Check whether --with-devkit was given.
7513if test "${with_devkit+set}" = set; then :
7514  withval=$with_devkit;
7515    if test "x$with_sys_root" != x; then
7516      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7517    fi
7518    if test "x$with_tools_dir" != x; then
7519      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7520    fi
7521    TOOLS_DIR=$with_devkit/bin
7522    SYS_ROOT=$with_devkit/$host_alias/libc
7523
7524fi
7525
7526
7527
7528
7529# Setup default logging of stdout and stderr to build.log in the output root.
7530BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7531BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7532BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7533
7534
7535
7536
7537
7538# Check if it's a pure open build or if custom sources are to be used.
7539
7540  # Check whether --enable-openjdk-only was given.
7541if test "${enable_openjdk_only+set}" = set; then :
7542  enableval=$enable_openjdk_only;
7543else
7544  enable_openjdk_only="no"
7545fi
7546
7547
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7549$as_echo_n "checking for presence of closed sources... " >&6; }
7550  if test -d "$SRC_ROOT/jdk/src/closed"; then
7551    CLOSED_SOURCE_PRESENT=yes
7552  else
7553    CLOSED_SOURCE_PRESENT=no
7554  fi
7555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7556$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7557
7558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7559$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7560  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7562$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7563
7564  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7565    OPENJDK=true
7566    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7567      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7568$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7569    fi
7570  else
7571    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7572      OPENJDK=true
7573    else
7574      OPENJDK=false
7575    fi
7576  fi
7577
7578  if test "x$OPENJDK" = "xtrue"; then
7579    SET_OPENJDK="OPENJDK=true"
7580  fi
7581
7582
7583
7584
7585# These are needed to be able to create a configuration name (and thus the output directory)
7586
7587###############################################################################
7588#
7589# Check which variant of the JDK that we want to build.
7590# Currently we have:
7591#    normal:   standard edition
7592# but the custom make system may add other variants
7593#
7594# Effectively the JDK variant gives a name to a specific set of
7595# modules to compile into the JDK. In the future, these modules
7596# might even be Jigsaw modules.
7597#
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7599$as_echo_n "checking which variant of the JDK to build... " >&6; }
7600
7601# Check whether --with-jdk-variant was given.
7602if test "${with_jdk_variant+set}" = set; then :
7603  withval=$with_jdk_variant;
7604fi
7605
7606
7607if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7608    JDK_VARIANT="normal"
7609else
7610    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7611fi
7612
7613
7614
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7616$as_echo "$JDK_VARIANT" >&6; }
7617
7618
7619
7620###############################################################################
7621#
7622# Check which variants of the JVM that we want to build.
7623# Currently we have:
7624#    server: normal interpreter and a tiered C1/C2 compiler
7625#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7626#    minimal1: reduced form of client with optional VM services and features stripped out
7627#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7628#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7629#    zero: no machine code interpreter, no compiler
7630#    zeroshark: zero interpreter and shark/llvm compiler backend
7631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7632$as_echo_n "checking which variants of the JVM to build... " >&6; }
7633
7634# Check whether --with-jvm-variants was given.
7635if test "${with_jvm_variants+set}" = set; then :
7636  withval=$with_jvm_variants;
7637fi
7638
7639
7640if test "x$with_jvm_variants" = x; then
7641     with_jvm_variants="server"
7642fi
7643
7644JVM_VARIANTS=",$with_jvm_variants,"
7645TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7646
7647if test "x$TEST_VARIANTS" != "x,"; then
7648   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7649fi
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7651$as_echo "$with_jvm_variants" >&6; }
7652
7653JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7654JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7655JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7656JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7657JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7658JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7659
7660if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7661    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7662        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7663    fi
7664fi
7665if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7666    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7667        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7668    fi
7669fi
7670if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7671    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7672        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7673    fi
7674fi
7675
7676# Replace the commas with AND for use in the build directory name.
7677ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7678COUNT_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/'`
7679if test "x$COUNT_VARIANTS" != "x,1"; then
7680    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7681else
7682    BUILDING_MULTIPLE_JVM_VARIANTS=no
7683fi
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7694   MACOSX_UNIVERSAL="true"
7695fi
7696
7697
7698
7699
7700
7701###############################################################################
7702#
7703# Set the debug level
7704#    release: no debug information, all optimizations, no asserts.
7705#    fastdebug: debug information (-g), all optimizations, all asserts
7706#    slowdebug: debug information (-g), no optimizations, all asserts
7707#
7708DEBUG_LEVEL="release"
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7710$as_echo_n "checking which debug level to use... " >&6; }
7711# Check whether --enable-debug was given.
7712if test "${enable_debug+set}" = set; then :
7713  enableval=$enable_debug;
7714        ENABLE_DEBUG="${enableval}"
7715        DEBUG_LEVEL="fastdebug"
7716
7717else
7718  ENABLE_DEBUG="no"
7719fi
7720
7721
7722
7723# Check whether --with-debug-level was given.
7724if test "${with_debug_level+set}" = set; then :
7725  withval=$with_debug_level;
7726        DEBUG_LEVEL="${withval}"
7727        if test "x$ENABLE_DEBUG" = xyes; then
7728			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7729        fi
7730
7731fi
7732
7733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7734$as_echo "$DEBUG_LEVEL" >&6; }
7735
7736if test "x$DEBUG_LEVEL" != xrelease && \
7737   test "x$DEBUG_LEVEL" != xfastdebug && \
7738   test "x$DEBUG_LEVEL" != xslowdebug; then
7739   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7740fi
7741
7742
7743###############################################################################
7744#
7745# Setup legacy vars/targets and new vars to deal with different debug levels.
7746#
7747
7748case $DEBUG_LEVEL in
7749      release )
7750          VARIANT="OPT"
7751          FASTDEBUG="false"
7752          DEBUG_CLASSFILES="false"
7753          BUILD_VARIANT_RELEASE=""
7754          HOTSPOT_DEBUG_LEVEL="product"
7755          HOTSPOT_EXPORT="product"
7756           ;;
7757      fastdebug )
7758          VARIANT="DBG"
7759          FASTDEBUG="true"
7760          DEBUG_CLASSFILES="true"
7761          BUILD_VARIANT_RELEASE="-fastdebug"
7762          HOTSPOT_DEBUG_LEVEL="fastdebug"
7763          HOTSPOT_EXPORT="fastdebug"
7764           ;;
7765      slowdebug )
7766          VARIANT="DBG"
7767          FASTDEBUG="false"
7768          DEBUG_CLASSFILES="true"
7769          BUILD_VARIANT_RELEASE="-debug"
7770          HOTSPOT_DEBUG_LEVEL="jvmg"
7771          HOTSPOT_EXPORT="debug"
7772           ;;
7773esac
7774
7775#####
7776# Generate the legacy makefile targets for hotspot.
7777# The hotspot api for selecting the build artifacts, really, needs to be improved.
7778# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7779# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7780# But until then ...
7781HOTSPOT_TARGET=""
7782
7783if test "x$JVM_VARIANT_SERVER" = xtrue; then
7784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7785fi
7786
7787if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7789fi
7790
7791if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7793fi
7794
7795if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7796    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7797fi
7798
7799if test "x$JVM_VARIANT_ZERO" = xtrue; then
7800    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7801fi
7802
7803if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7804    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7805fi
7806
7807HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7808
7809# On Macosx universal binaries are produced, but they only contain
7810# 64 bit intel. This invalidates control of which jvms are built
7811# from configure, but only server is valid anyway. Fix this
7812# when hotspot makefiles are rewritten.
7813if test "x$MACOSX_UNIVERSAL" = xtrue; then
7814    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7815fi
7816
7817#####
7818
7819
7820
7821
7822
7823
7824
7825
7826# With basic setup done, call the custom early hook.
7827
7828
7829# To properly create a configuration name, we need to have the OpenJDK target
7830# and options (variants and debug level) parsed.
7831
7832
7833
7834# Check whether --with-conf-name was given.
7835if test "${with_conf_name+set}" = set; then :
7836  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7837fi
7838
7839
7840# Test from where we are running configure, in or outside of src root.
7841# To enable comparison of directories, CURDIR needs to be symlink free
7842# just like SRC_ROOT already is
7843NOSYM_CURDIR="$CURDIR"
7844
7845    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7846        # Follow a chain of symbolic links. Use readlink
7847        # where it exists, else fall back to horribly
7848        # complicated shell code.
7849        if test "x$READLINK_TESTED" != yes; then
7850            # On MacOSX there is a readlink tool with a different
7851            # purpose than the GNU readlink tool. Check the found readlink.
7852            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7853            if test "x$ISGNU" = x; then
7854                 # A readlink that we do not know how to use.
7855                 # Are there other non-GNU readlinks out there?
7856                 READLINK_TESTED=yes
7857                 READLINK=
7858            fi
7859        fi
7860
7861        if test "x$READLINK" != x; then
7862            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7863        else
7864            # Save the current directory for restoring afterwards
7865            STARTDIR=$PWD
7866            COUNTER=0
7867            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7868            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7869            # Use the system pwd and not the shell builtin to resolve directory symlinks
7870            cd $sym_link_dir
7871            cd `$THEPWDCMD`
7872            sym_link_dir=`$THEPWDCMD`
7873            # Resolve file symlinks
7874            while test $COUNTER -lt 20; do
7875                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7876                if test "x$ISLINK" == x; then
7877                    # This is not a symbolic link! We are done!
7878                    break
7879                fi
7880                # Again resolve directory symlinks since the target of the just found
7881                # link could be in a different directory
7882                cd `$DIRNAME $ISLINK`
7883                sym_link_dir=`$THEPWDCMD`
7884                sym_link_file=`$BASENAME $ISLINK`
7885                let COUNTER=COUNTER+1
7886            done
7887            cd $STARTDIR
7888            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7889        fi
7890    fi
7891
7892if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7893        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7894        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7895    # We are running configure from the src root.
7896    # Create a default ./build/target-variant-debuglevel output root.
7897    if test "x${CONF_NAME}" = x; then
7898        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7899    fi
7900    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7901    $MKDIR -p "$OUTPUT_ROOT"
7902    if test ! -d "$OUTPUT_ROOT"; then
7903        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7904    fi
7905else
7906    # We are running configure from outside of the src dir.
7907    # Then use the current directory as output dir!
7908    # If configuration is situated in normal build directory, just use the build
7909    # directory name as configuration name, otherwise use the complete path.
7910    if test "x${CONF_NAME}" = x; then
7911        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7912    fi
7913    OUTPUT_ROOT="$CURDIR"
7914
7915    # WARNING: This might be a bad thing to do. You need to be sure you want to
7916    # have a configuration in this directory. Do some sanity checks!
7917
7918    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7919      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7920      # other files
7921      files_present=`$LS $OUTPUT_ROOT`
7922      # Configure has already touched config.log and confdefs.h in the current dir when this check
7923      # is performed.
7924      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7925                                             | $TR -d '\n'`
7926      if test "x$filtered_files" != x; then
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7928$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7930$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7932$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7933        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7934$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7935        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7936$as_echo "$as_me: seriously mess up just about everything." >&6;}
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7938$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7940$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7941        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7942      fi
7943    fi
7944fi
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7946$as_echo_n "checking what configuration name to use... " >&6; }
7947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7948$as_echo "$CONF_NAME" >&6; }
7949
7950
7951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7952
7953  # Input might be given as Windows format, start by converting to
7954  # unix format.
7955  path="$OUTPUT_ROOT"
7956  new_path=`$CYGPATH -u "$path"`
7957
7958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7961  # "foo.exe" is OK but "foo" is an error.
7962  #
7963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7964  # It is also a way to make sure we got the proper file name for the real test later on.
7965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7966  if test "x$test_shortpath" = x; then
7967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7968$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7969    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7970  fi
7971
7972  # Call helper function which possibly converts this using DOS-style short mode.
7973  # If so, the updated path is stored in $new_path.
7974
7975  input_path="$new_path"
7976  # Check if we need to convert this using DOS-style short mode. If the path
7977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7978  # take no chances and rewrite it.
7979  # Note: m4 eats our [], so we need to use [ and ] instead.
7980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7981  if test "x$has_forbidden_chars" != x; then
7982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7986      # Going to short mode and back again did indeed matter. Since short mode is
7987      # case insensitive, let's make it lowercase to improve readability.
7988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7989      # Now convert it back to Unix-stile (cygpath)
7990      input_path=`$CYGPATH -u "$shortmode_path"`
7991      new_path="$input_path"
7992    fi
7993  fi
7994
7995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7996  if test "x$test_cygdrive_prefix" = x; then
7997    # As a simple fix, exclude /usr/bin since it's not a real path.
7998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8000      # a path prefixed by /cygdrive for fixpath to work.
8001      new_path="$CYGWIN_ROOT_PATH$input_path"
8002    fi
8003  fi
8004
8005
8006  if test "x$path" != "x$new_path"; then
8007    OUTPUT_ROOT="$new_path"
8008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8009$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8010  fi
8011
8012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8013
8014  path="$OUTPUT_ROOT"
8015  has_colon=`$ECHO $path | $GREP ^.:`
8016  new_path="$path"
8017  if test "x$has_colon" = x; then
8018    # Not in mixed or Windows style, start by that.
8019    new_path=`cmd //c echo $path`
8020  fi
8021
8022
8023  input_path="$new_path"
8024  # Check if we need to convert this using DOS-style short mode. If the path
8025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8026  # take no chances and rewrite it.
8027  # Note: m4 eats our [], so we need to use [ and ] instead.
8028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8029  if test "x$has_forbidden_chars" != x; then
8030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8032  fi
8033
8034
8035  windows_path="$new_path"
8036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8037    unix_path=`$CYGPATH -u "$windows_path"`
8038    new_path="$unix_path"
8039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8041    new_path="$unix_path"
8042  fi
8043
8044  if test "x$path" != "x$new_path"; then
8045    OUTPUT_ROOT="$new_path"
8046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8047$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8048  fi
8049
8050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8052
8053  else
8054    # We're on a posix platform. Hooray! :)
8055    path="$OUTPUT_ROOT"
8056
8057    if test ! -f "$path" && test ! -d "$path"; then
8058      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8059    fi
8060
8061    has_space=`$ECHO "$path" | $GREP " "`
8062    if test "x$has_space" != x; then
8063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8064$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8065      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8066    fi
8067  fi
8068
8069
8070SPEC=$OUTPUT_ROOT/spec.gmk
8071
8072CONF_NAME=$CONF_NAME
8073
8074OUTPUT_ROOT=$OUTPUT_ROOT
8075
8076
8077# Most of the probed defines are put into config.h
8078ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8079
8080# The spec.gmk file contains all variables for the make system.
8081ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8082
8083# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8084ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8085
8086# The bootcycle-spec.gmk file contains support for boot cycle builds.
8087ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8088
8089# The compare.sh is used to compare the build output to other builds.
8090ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8091
8092# Spec.sh is currently used by compare-objects.sh
8093ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8094
8095# The generated Makefile knows where the spec.gmk is and where the source is.
8096# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8097# which will look for generated configurations
8098ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8099
8100
8101# Save the arguments given to us
8102echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8103
8104
8105# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8106
8107    for ac_prog in apt-get yum port pkgutil pkgadd
8108do
8109  # Extract the first word of "$ac_prog", so it can be a program name with args.
8110set dummy $ac_prog; ac_word=$2
8111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8112$as_echo_n "checking for $ac_word... " >&6; }
8113if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8114  $as_echo_n "(cached) " >&6
8115else
8116  if test -n "$PKGHANDLER"; then
8117  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8118else
8119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8126    ac_cv_prog_PKGHANDLER="$ac_prog"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134fi
8135fi
8136PKGHANDLER=$ac_cv_prog_PKGHANDLER
8137if test -n "$PKGHANDLER"; then
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8139$as_echo "$PKGHANDLER" >&6; }
8140else
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142$as_echo "no" >&6; }
8143fi
8144
8145
8146  test -n "$PKGHANDLER" && break
8147done
8148
8149
8150
8151# Setup tools that requires more complex handling, or that is not needed by the configure script.
8152
8153
8154  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8155  if test "x$MAKE" != x; then
8156    # User has supplied a make, test it.
8157    if test ! -f "$MAKE"; then
8158      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8159    fi
8160
8161  MAKE_CANDIDATE=""$MAKE""
8162  DESCRIPTION="user supplied MAKE=$MAKE"
8163  if test "x$MAKE_CANDIDATE" != x; then
8164    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8165$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8166    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8167    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8168    if test "x$IS_GNU_MAKE" = x; then
8169      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8170$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8171    else
8172      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8173      if test "x$IS_MODERN_MAKE" = x; then
8174        { $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
8175$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;}
8176      else
8177        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8178          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8179            MAKE_EXPECTED_ENV='cygwin'
8180          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8181            MAKE_EXPECTED_ENV='msys'
8182          else
8183            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8184          fi
8185          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8186          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8187        else
8188          # Not relevant for non-Windows
8189          IS_MAKE_CORRECT_ENV=true
8190        fi
8191        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8192          { $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
8193$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;}
8194        else
8195          FOUND_MAKE=$MAKE_CANDIDATE
8196
8197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8198
8199  # First separate the path from the arguments. This will split at the first
8200  # space.
8201  complete="$FOUND_MAKE"
8202  path="${complete%% *}"
8203  tmp="$complete EOL"
8204  arguments="${tmp#* }"
8205
8206  # Input might be given as Windows format, start by converting to
8207  # unix format.
8208  new_path=`$CYGPATH -u "$path"`
8209
8210  # Now try to locate executable using which
8211  new_path=`$WHICH "$new_path" 2> /dev/null`
8212  # bat and cmd files are not always considered executable in cygwin causing which
8213  # to not find them
8214  if test "x$new_path" = x \
8215           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8216           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8217    new_path=`$CYGPATH -u "$path"`
8218  fi
8219  if test "x$new_path" = x; then
8220    # Oops. Which didn't find the executable.
8221    # The splitting of arguments from the executable at a space might have been incorrect,
8222    # since paths with space are more likely in Windows. Give it another try with the whole
8223    # argument.
8224    path="$complete"
8225    arguments="EOL"
8226    new_path=`$CYGPATH -u "$path"`
8227    new_path=`$WHICH "$new_path" 2> /dev/null`
8228    # bat and cmd files are not always considered executable in cygwin causing which
8229    # to not find them
8230    if test "x$new_path" = x \
8231             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8232             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8233      new_path=`$CYGPATH -u "$path"`
8234    fi
8235    if test "x$new_path" = x; then
8236      # It's still not found. Now this is an unrecoverable error.
8237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8238$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8239      has_space=`$ECHO "$complete" | $GREP " "`
8240      if test "x$has_space" != x; then
8241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8243      fi
8244      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8245    fi
8246  fi
8247
8248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8251  # "foo.exe" is OK but "foo" is an error.
8252  #
8253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8254  # It is also a way to make sure we got the proper file name for the real test later on.
8255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8256  if test "x$test_shortpath" = x; then
8257    # Short path failed, file does not exist as specified.
8258    # Try adding .exe or .cmd
8259    if test -f "${new_path}.exe"; then
8260       input_to_shortpath="${new_path}.exe"
8261    elif test -f "${new_path}.cmd"; then
8262       input_to_shortpath="${new_path}.cmd"
8263    else
8264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8265$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8266      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8267$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8268      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8269    fi
8270  else
8271    input_to_shortpath="$new_path"
8272  fi
8273
8274  # Call helper function which possibly converts this using DOS-style short mode.
8275  # If so, the updated path is stored in $new_path.
8276  new_path="$input_to_shortpath"
8277
8278  input_path="$input_to_shortpath"
8279  # Check if we need to convert this using DOS-style short mode. If the path
8280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8281  # take no chances and rewrite it.
8282  # Note: m4 eats our [], so we need to use [ and ] instead.
8283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8284  if test "x$has_forbidden_chars" != x; then
8285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8289      # Going to short mode and back again did indeed matter. Since short mode is
8290      # case insensitive, let's make it lowercase to improve readability.
8291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8292      # Now convert it back to Unix-stile (cygpath)
8293      input_path=`$CYGPATH -u "$shortmode_path"`
8294      new_path="$input_path"
8295    fi
8296  fi
8297
8298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8299  if test "x$test_cygdrive_prefix" = x; then
8300    # As a simple fix, exclude /usr/bin since it's not a real path.
8301    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8303      # a path prefixed by /cygdrive for fixpath to work.
8304      new_path="$CYGWIN_ROOT_PATH$input_path"
8305    fi
8306  fi
8307
8308  # remove trailing .exe if any
8309  new_path="${new_path/%.exe/}"
8310
8311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8312
8313  # First separate the path from the arguments. This will split at the first
8314  # space.
8315  complete="$FOUND_MAKE"
8316  path="${complete%% *}"
8317  tmp="$complete EOL"
8318  arguments="${tmp#* }"
8319
8320  # Input might be given as Windows format, start by converting to
8321  # unix format.
8322  new_path="$path"
8323
8324  windows_path="$new_path"
8325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8326    unix_path=`$CYGPATH -u "$windows_path"`
8327    new_path="$unix_path"
8328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8330    new_path="$unix_path"
8331  fi
8332
8333
8334  # Now try to locate executable using which
8335  new_path=`$WHICH "$new_path" 2> /dev/null`
8336
8337  if test "x$new_path" = x; then
8338    # Oops. Which didn't find the executable.
8339    # The splitting of arguments from the executable at a space might have been incorrect,
8340    # since paths with space are more likely in Windows. Give it another try with the whole
8341    # argument.
8342    path="$complete"
8343    arguments="EOL"
8344    new_path="$path"
8345
8346  windows_path="$new_path"
8347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8348    unix_path=`$CYGPATH -u "$windows_path"`
8349    new_path="$unix_path"
8350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8352    new_path="$unix_path"
8353  fi
8354
8355
8356    new_path=`$WHICH "$new_path" 2> /dev/null`
8357
8358    if test "x$new_path" = x; then
8359      # It's still not found. Now this is an unrecoverable error.
8360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8361$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8362      has_space=`$ECHO "$complete" | $GREP " "`
8363      if test "x$has_space" != x; then
8364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8366      fi
8367      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8368    fi
8369  fi
8370
8371  # Now new_path has a complete unix path to the binary
8372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8373    # Keep paths in /bin as-is, but remove trailing .exe if any
8374    new_path="${new_path/%.exe/}"
8375    # Do not save /bin paths to all_fixpath_prefixes!
8376  else
8377    # Not in mixed or Windows style, start by that.
8378    new_path=`cmd //c echo $new_path`
8379
8380  input_path="$new_path"
8381  # Check if we need to convert this using DOS-style short mode. If the path
8382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8383  # take no chances and rewrite it.
8384  # Note: m4 eats our [], so we need to use [ and ] instead.
8385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8386  if test "x$has_forbidden_chars" != x; then
8387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8389  fi
8390
8391    # Output is in $new_path
8392
8393  windows_path="$new_path"
8394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8395    unix_path=`$CYGPATH -u "$windows_path"`
8396    new_path="$unix_path"
8397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8399    new_path="$unix_path"
8400  fi
8401
8402    # remove trailing .exe if any
8403    new_path="${new_path/%.exe/}"
8404
8405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8407  fi
8408
8409  else
8410    # We're on a posix platform. Hooray! :)
8411    # First separate the path from the arguments. This will split at the first
8412    # space.
8413    complete="$FOUND_MAKE"
8414    path="${complete%% *}"
8415    tmp="$complete EOL"
8416    arguments="${tmp#* }"
8417
8418    # Cannot rely on the command "which" here since it doesn't always work.
8419    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8420    if test -z "$is_absolute_path"; then
8421      # Path to executable is not absolute. Find it.
8422      IFS_save="$IFS"
8423      IFS=:
8424      for p in $PATH; do
8425        if test -f "$p/$path" && test -x "$p/$path"; then
8426          new_path="$p/$path"
8427          break
8428        fi
8429      done
8430      IFS="$IFS_save"
8431    else
8432      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8433$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8434      new_path="$path"
8435    fi
8436
8437    if test "x$new_path" = x; then
8438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8440        has_space=`$ECHO "$complete" | $GREP " "`
8441        if test "x$has_space" != x; then
8442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8444        fi
8445        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8446      fi
8447  fi
8448
8449      # Now join together the path and the arguments once again
8450      if test "x$arguments" != xEOL; then
8451        new_complete="$new_path ${arguments% *}"
8452      else
8453        new_complete="$new_path"
8454      fi
8455
8456  if test "x$complete" != "x$new_complete"; then
8457      FOUND_MAKE="$new_complete"
8458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8459$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8460    fi
8461
8462        fi
8463      fi
8464    fi
8465  fi
8466
8467    if test "x$FOUND_MAKE" = x; then
8468      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8469    fi
8470  else
8471    # Try our hardest to locate a correct version of GNU make
8472    for ac_prog in gmake
8473do
8474  # Extract the first word of "$ac_prog", so it can be a program name with args.
8475set dummy $ac_prog; ac_word=$2
8476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8477$as_echo_n "checking for $ac_word... " >&6; }
8478if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8479  $as_echo_n "(cached) " >&6
8480else
8481  case $CHECK_GMAKE in
8482  [\\/]* | ?:[\\/]*)
8483  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8484  ;;
8485  *)
8486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8487for as_dir in $PATH
8488do
8489  IFS=$as_save_IFS
8490  test -z "$as_dir" && as_dir=.
8491    for ac_exec_ext in '' $ac_executable_extensions; do
8492  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8493    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8495    break 2
8496  fi
8497done
8498  done
8499IFS=$as_save_IFS
8500
8501  ;;
8502esac
8503fi
8504CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8505if test -n "$CHECK_GMAKE"; then
8506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8507$as_echo "$CHECK_GMAKE" >&6; }
8508else
8509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8510$as_echo "no" >&6; }
8511fi
8512
8513
8514  test -n "$CHECK_GMAKE" && break
8515done
8516
8517
8518  MAKE_CANDIDATE=""$CHECK_GMAKE""
8519  DESCRIPTION="gmake in PATH"
8520  if test "x$MAKE_CANDIDATE" != x; then
8521    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8522$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8523    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8524    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8525    if test "x$IS_GNU_MAKE" = x; then
8526      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8527$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8528    else
8529      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8530      if test "x$IS_MODERN_MAKE" = x; then
8531        { $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
8532$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;}
8533      else
8534        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8535          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8536            MAKE_EXPECTED_ENV='cygwin'
8537          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8538            MAKE_EXPECTED_ENV='msys'
8539          else
8540            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8541          fi
8542          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8543          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8544        else
8545          # Not relevant for non-Windows
8546          IS_MAKE_CORRECT_ENV=true
8547        fi
8548        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8549          { $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
8550$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;}
8551        else
8552          FOUND_MAKE=$MAKE_CANDIDATE
8553
8554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8555
8556  # First separate the path from the arguments. This will split at the first
8557  # space.
8558  complete="$FOUND_MAKE"
8559  path="${complete%% *}"
8560  tmp="$complete EOL"
8561  arguments="${tmp#* }"
8562
8563  # Input might be given as Windows format, start by converting to
8564  # unix format.
8565  new_path=`$CYGPATH -u "$path"`
8566
8567  # Now try to locate executable using which
8568  new_path=`$WHICH "$new_path" 2> /dev/null`
8569  # bat and cmd files are not always considered executable in cygwin causing which
8570  # to not find them
8571  if test "x$new_path" = x \
8572           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8573           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8574    new_path=`$CYGPATH -u "$path"`
8575  fi
8576  if test "x$new_path" = x; then
8577    # Oops. Which didn't find the executable.
8578    # The splitting of arguments from the executable at a space might have been incorrect,
8579    # since paths with space are more likely in Windows. Give it another try with the whole
8580    # argument.
8581    path="$complete"
8582    arguments="EOL"
8583    new_path=`$CYGPATH -u "$path"`
8584    new_path=`$WHICH "$new_path" 2> /dev/null`
8585    # bat and cmd files are not always considered executable in cygwin causing which
8586    # to not find them
8587    if test "x$new_path" = x \
8588             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8589             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8590      new_path=`$CYGPATH -u "$path"`
8591    fi
8592    if test "x$new_path" = x; then
8593      # It's still not found. Now this is an unrecoverable error.
8594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8596      has_space=`$ECHO "$complete" | $GREP " "`
8597      if test "x$has_space" != x; then
8598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8600      fi
8601      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8602    fi
8603  fi
8604
8605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8608  # "foo.exe" is OK but "foo" is an error.
8609  #
8610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8611  # It is also a way to make sure we got the proper file name for the real test later on.
8612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8613  if test "x$test_shortpath" = x; then
8614    # Short path failed, file does not exist as specified.
8615    # Try adding .exe or .cmd
8616    if test -f "${new_path}.exe"; then
8617       input_to_shortpath="${new_path}.exe"
8618    elif test -f "${new_path}.cmd"; then
8619       input_to_shortpath="${new_path}.cmd"
8620    else
8621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8622$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8625      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8626    fi
8627  else
8628    input_to_shortpath="$new_path"
8629  fi
8630
8631  # Call helper function which possibly converts this using DOS-style short mode.
8632  # If so, the updated path is stored in $new_path.
8633  new_path="$input_to_shortpath"
8634
8635  input_path="$input_to_shortpath"
8636  # Check if we need to convert this using DOS-style short mode. If the path
8637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8638  # take no chances and rewrite it.
8639  # Note: m4 eats our [], so we need to use [ and ] instead.
8640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8641  if test "x$has_forbidden_chars" != x; then
8642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8646      # Going to short mode and back again did indeed matter. Since short mode is
8647      # case insensitive, let's make it lowercase to improve readability.
8648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8649      # Now convert it back to Unix-stile (cygpath)
8650      input_path=`$CYGPATH -u "$shortmode_path"`
8651      new_path="$input_path"
8652    fi
8653  fi
8654
8655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8656  if test "x$test_cygdrive_prefix" = x; then
8657    # As a simple fix, exclude /usr/bin since it's not a real path.
8658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8660      # a path prefixed by /cygdrive for fixpath to work.
8661      new_path="$CYGWIN_ROOT_PATH$input_path"
8662    fi
8663  fi
8664
8665  # remove trailing .exe if any
8666  new_path="${new_path/%.exe/}"
8667
8668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8669
8670  # First separate the path from the arguments. This will split at the first
8671  # space.
8672  complete="$FOUND_MAKE"
8673  path="${complete%% *}"
8674  tmp="$complete EOL"
8675  arguments="${tmp#* }"
8676
8677  # Input might be given as Windows format, start by converting to
8678  # unix format.
8679  new_path="$path"
8680
8681  windows_path="$new_path"
8682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8683    unix_path=`$CYGPATH -u "$windows_path"`
8684    new_path="$unix_path"
8685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8687    new_path="$unix_path"
8688  fi
8689
8690
8691  # Now try to locate executable using which
8692  new_path=`$WHICH "$new_path" 2> /dev/null`
8693
8694  if test "x$new_path" = x; then
8695    # Oops. Which didn't find the executable.
8696    # The splitting of arguments from the executable at a space might have been incorrect,
8697    # since paths with space are more likely in Windows. Give it another try with the whole
8698    # argument.
8699    path="$complete"
8700    arguments="EOL"
8701    new_path="$path"
8702
8703  windows_path="$new_path"
8704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8705    unix_path=`$CYGPATH -u "$windows_path"`
8706    new_path="$unix_path"
8707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8709    new_path="$unix_path"
8710  fi
8711
8712
8713    new_path=`$WHICH "$new_path" 2> /dev/null`
8714
8715    if test "x$new_path" = x; then
8716      # It's still not found. Now this is an unrecoverable error.
8717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8718$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8719      has_space=`$ECHO "$complete" | $GREP " "`
8720      if test "x$has_space" != x; then
8721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8723      fi
8724      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8725    fi
8726  fi
8727
8728  # Now new_path has a complete unix path to the binary
8729  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8730    # Keep paths in /bin as-is, but remove trailing .exe if any
8731    new_path="${new_path/%.exe/}"
8732    # Do not save /bin paths to all_fixpath_prefixes!
8733  else
8734    # Not in mixed or Windows style, start by that.
8735    new_path=`cmd //c echo $new_path`
8736
8737  input_path="$new_path"
8738  # Check if we need to convert this using DOS-style short mode. If the path
8739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8740  # take no chances and rewrite it.
8741  # Note: m4 eats our [], so we need to use [ and ] instead.
8742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8743  if test "x$has_forbidden_chars" != x; then
8744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8746  fi
8747
8748    # Output is in $new_path
8749
8750  windows_path="$new_path"
8751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8752    unix_path=`$CYGPATH -u "$windows_path"`
8753    new_path="$unix_path"
8754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8756    new_path="$unix_path"
8757  fi
8758
8759    # remove trailing .exe if any
8760    new_path="${new_path/%.exe/}"
8761
8762    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8763    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8764  fi
8765
8766  else
8767    # We're on a posix platform. Hooray! :)
8768    # First separate the path from the arguments. This will split at the first
8769    # space.
8770    complete="$FOUND_MAKE"
8771    path="${complete%% *}"
8772    tmp="$complete EOL"
8773    arguments="${tmp#* }"
8774
8775    # Cannot rely on the command "which" here since it doesn't always work.
8776    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8777    if test -z "$is_absolute_path"; then
8778      # Path to executable is not absolute. Find it.
8779      IFS_save="$IFS"
8780      IFS=:
8781      for p in $PATH; do
8782        if test -f "$p/$path" && test -x "$p/$path"; then
8783          new_path="$p/$path"
8784          break
8785        fi
8786      done
8787      IFS="$IFS_save"
8788    else
8789      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8790$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8791      new_path="$path"
8792    fi
8793
8794    if test "x$new_path" = x; then
8795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8797        has_space=`$ECHO "$complete" | $GREP " "`
8798        if test "x$has_space" != x; then
8799          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8800$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8801        fi
8802        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8803      fi
8804  fi
8805
8806      # Now join together the path and the arguments once again
8807      if test "x$arguments" != xEOL; then
8808        new_complete="$new_path ${arguments% *}"
8809      else
8810        new_complete="$new_path"
8811      fi
8812
8813  if test "x$complete" != "x$new_complete"; then
8814      FOUND_MAKE="$new_complete"
8815      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8816$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8817    fi
8818
8819        fi
8820      fi
8821    fi
8822  fi
8823
8824
8825    if test "x$FOUND_MAKE" = x; then
8826      for ac_prog in make
8827do
8828  # Extract the first word of "$ac_prog", so it can be a program name with args.
8829set dummy $ac_prog; ac_word=$2
8830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8831$as_echo_n "checking for $ac_word... " >&6; }
8832if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8833  $as_echo_n "(cached) " >&6
8834else
8835  case $CHECK_MAKE in
8836  [\\/]* | ?:[\\/]*)
8837  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8838  ;;
8839  *)
8840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8841for as_dir in $PATH
8842do
8843  IFS=$as_save_IFS
8844  test -z "$as_dir" && as_dir=.
8845    for ac_exec_ext in '' $ac_executable_extensions; do
8846  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8847    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8849    break 2
8850  fi
8851done
8852  done
8853IFS=$as_save_IFS
8854
8855  ;;
8856esac
8857fi
8858CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8859if test -n "$CHECK_MAKE"; then
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8861$as_echo "$CHECK_MAKE" >&6; }
8862else
8863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8864$as_echo "no" >&6; }
8865fi
8866
8867
8868  test -n "$CHECK_MAKE" && break
8869done
8870
8871
8872  MAKE_CANDIDATE=""$CHECK_MAKE""
8873  DESCRIPTION="make in PATH"
8874  if test "x$MAKE_CANDIDATE" != x; then
8875    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8876$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8877    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8878    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8879    if test "x$IS_GNU_MAKE" = x; then
8880      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8881$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8882    else
8883      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8884      if test "x$IS_MODERN_MAKE" = x; then
8885        { $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
8886$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;}
8887      else
8888        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8889          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8890            MAKE_EXPECTED_ENV='cygwin'
8891          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8892            MAKE_EXPECTED_ENV='msys'
8893          else
8894            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8895          fi
8896          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8897          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8898        else
8899          # Not relevant for non-Windows
8900          IS_MAKE_CORRECT_ENV=true
8901        fi
8902        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8903          { $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
8904$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;}
8905        else
8906          FOUND_MAKE=$MAKE_CANDIDATE
8907
8908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8909
8910  # First separate the path from the arguments. This will split at the first
8911  # space.
8912  complete="$FOUND_MAKE"
8913  path="${complete%% *}"
8914  tmp="$complete EOL"
8915  arguments="${tmp#* }"
8916
8917  # Input might be given as Windows format, start by converting to
8918  # unix format.
8919  new_path=`$CYGPATH -u "$path"`
8920
8921  # Now try to locate executable using which
8922  new_path=`$WHICH "$new_path" 2> /dev/null`
8923  # bat and cmd files are not always considered executable in cygwin causing which
8924  # to not find them
8925  if test "x$new_path" = x \
8926           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8927           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8928    new_path=`$CYGPATH -u "$path"`
8929  fi
8930  if test "x$new_path" = x; then
8931    # Oops. Which didn't find the executable.
8932    # The splitting of arguments from the executable at a space might have been incorrect,
8933    # since paths with space are more likely in Windows. Give it another try with the whole
8934    # argument.
8935    path="$complete"
8936    arguments="EOL"
8937    new_path=`$CYGPATH -u "$path"`
8938    new_path=`$WHICH "$new_path" 2> /dev/null`
8939    # bat and cmd files are not always considered executable in cygwin causing which
8940    # to not find them
8941    if test "x$new_path" = x \
8942             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8943             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8944      new_path=`$CYGPATH -u "$path"`
8945    fi
8946    if test "x$new_path" = x; then
8947      # It's still not found. Now this is an unrecoverable error.
8948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8949$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8950      has_space=`$ECHO "$complete" | $GREP " "`
8951      if test "x$has_space" != x; then
8952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8954      fi
8955      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8956    fi
8957  fi
8958
8959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8962  # "foo.exe" is OK but "foo" is an error.
8963  #
8964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8965  # It is also a way to make sure we got the proper file name for the real test later on.
8966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8967  if test "x$test_shortpath" = x; then
8968    # Short path failed, file does not exist as specified.
8969    # Try adding .exe or .cmd
8970    if test -f "${new_path}.exe"; then
8971       input_to_shortpath="${new_path}.exe"
8972    elif test -f "${new_path}.cmd"; then
8973       input_to_shortpath="${new_path}.cmd"
8974    else
8975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8980    fi
8981  else
8982    input_to_shortpath="$new_path"
8983  fi
8984
8985  # Call helper function which possibly converts this using DOS-style short mode.
8986  # If so, the updated path is stored in $new_path.
8987  new_path="$input_to_shortpath"
8988
8989  input_path="$input_to_shortpath"
8990  # Check if we need to convert this using DOS-style short mode. If the path
8991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8992  # take no chances and rewrite it.
8993  # Note: m4 eats our [], so we need to use [ and ] instead.
8994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8995  if test "x$has_forbidden_chars" != x; then
8996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9000      # Going to short mode and back again did indeed matter. Since short mode is
9001      # case insensitive, let's make it lowercase to improve readability.
9002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9003      # Now convert it back to Unix-stile (cygpath)
9004      input_path=`$CYGPATH -u "$shortmode_path"`
9005      new_path="$input_path"
9006    fi
9007  fi
9008
9009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9010  if test "x$test_cygdrive_prefix" = x; then
9011    # As a simple fix, exclude /usr/bin since it's not a real path.
9012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9014      # a path prefixed by /cygdrive for fixpath to work.
9015      new_path="$CYGWIN_ROOT_PATH$input_path"
9016    fi
9017  fi
9018
9019  # remove trailing .exe if any
9020  new_path="${new_path/%.exe/}"
9021
9022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9023
9024  # First separate the path from the arguments. This will split at the first
9025  # space.
9026  complete="$FOUND_MAKE"
9027  path="${complete%% *}"
9028  tmp="$complete EOL"
9029  arguments="${tmp#* }"
9030
9031  # Input might be given as Windows format, start by converting to
9032  # unix format.
9033  new_path="$path"
9034
9035  windows_path="$new_path"
9036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9037    unix_path=`$CYGPATH -u "$windows_path"`
9038    new_path="$unix_path"
9039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9041    new_path="$unix_path"
9042  fi
9043
9044
9045  # Now try to locate executable using which
9046  new_path=`$WHICH "$new_path" 2> /dev/null`
9047
9048  if test "x$new_path" = x; then
9049    # Oops. Which didn't find the executable.
9050    # The splitting of arguments from the executable at a space might have been incorrect,
9051    # since paths with space are more likely in Windows. Give it another try with the whole
9052    # argument.
9053    path="$complete"
9054    arguments="EOL"
9055    new_path="$path"
9056
9057  windows_path="$new_path"
9058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9059    unix_path=`$CYGPATH -u "$windows_path"`
9060    new_path="$unix_path"
9061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9063    new_path="$unix_path"
9064  fi
9065
9066
9067    new_path=`$WHICH "$new_path" 2> /dev/null`
9068
9069    if test "x$new_path" = x; then
9070      # It's still not found. Now this is an unrecoverable error.
9071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9072$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9073      has_space=`$ECHO "$complete" | $GREP " "`
9074      if test "x$has_space" != x; then
9075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9077      fi
9078      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9079    fi
9080  fi
9081
9082  # Now new_path has a complete unix path to the binary
9083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9084    # Keep paths in /bin as-is, but remove trailing .exe if any
9085    new_path="${new_path/%.exe/}"
9086    # Do not save /bin paths to all_fixpath_prefixes!
9087  else
9088    # Not in mixed or Windows style, start by that.
9089    new_path=`cmd //c echo $new_path`
9090
9091  input_path="$new_path"
9092  # Check if we need to convert this using DOS-style short mode. If the path
9093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9094  # take no chances and rewrite it.
9095  # Note: m4 eats our [], so we need to use [ and ] instead.
9096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9097  if test "x$has_forbidden_chars" != x; then
9098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9100  fi
9101
9102    # Output is in $new_path
9103
9104  windows_path="$new_path"
9105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9106    unix_path=`$CYGPATH -u "$windows_path"`
9107    new_path="$unix_path"
9108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9110    new_path="$unix_path"
9111  fi
9112
9113    # remove trailing .exe if any
9114    new_path="${new_path/%.exe/}"
9115
9116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9118  fi
9119
9120  else
9121    # We're on a posix platform. Hooray! :)
9122    # First separate the path from the arguments. This will split at the first
9123    # space.
9124    complete="$FOUND_MAKE"
9125    path="${complete%% *}"
9126    tmp="$complete EOL"
9127    arguments="${tmp#* }"
9128
9129    # Cannot rely on the command "which" here since it doesn't always work.
9130    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9131    if test -z "$is_absolute_path"; then
9132      # Path to executable is not absolute. Find it.
9133      IFS_save="$IFS"
9134      IFS=:
9135      for p in $PATH; do
9136        if test -f "$p/$path" && test -x "$p/$path"; then
9137          new_path="$p/$path"
9138          break
9139        fi
9140      done
9141      IFS="$IFS_save"
9142    else
9143      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9144$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9145      new_path="$path"
9146    fi
9147
9148    if test "x$new_path" = x; then
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9150$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9151        has_space=`$ECHO "$complete" | $GREP " "`
9152        if test "x$has_space" != x; then
9153          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9155        fi
9156        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9157      fi
9158  fi
9159
9160      # Now join together the path and the arguments once again
9161      if test "x$arguments" != xEOL; then
9162        new_complete="$new_path ${arguments% *}"
9163      else
9164        new_complete="$new_path"
9165      fi
9166
9167  if test "x$complete" != "x$new_complete"; then
9168      FOUND_MAKE="$new_complete"
9169      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9170$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9171    fi
9172
9173        fi
9174      fi
9175    fi
9176  fi
9177
9178    fi
9179
9180    if test "x$FOUND_MAKE" = x; then
9181      if test "x$TOOLS_DIR" != x; then
9182        # We have a tools-dir, check that as well before giving up.
9183        OLD_PATH=$PATH
9184        PATH=$TOOLS_DIR:$PATH
9185        for ac_prog in gmake
9186do
9187  # Extract the first word of "$ac_prog", so it can be a program name with args.
9188set dummy $ac_prog; ac_word=$2
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190$as_echo_n "checking for $ac_word... " >&6; }
9191if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9192  $as_echo_n "(cached) " >&6
9193else
9194  case $CHECK_TOOLSDIR_GMAKE in
9195  [\\/]* | ?:[\\/]*)
9196  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9197  ;;
9198  *)
9199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9200for as_dir in $PATH
9201do
9202  IFS=$as_save_IFS
9203  test -z "$as_dir" && as_dir=.
9204    for ac_exec_ext in '' $ac_executable_extensions; do
9205  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9206    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9208    break 2
9209  fi
9210done
9211  done
9212IFS=$as_save_IFS
9213
9214  ;;
9215esac
9216fi
9217CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9218if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9220$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9221else
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223$as_echo "no" >&6; }
9224fi
9225
9226
9227  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9228done
9229
9230
9231  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9232  DESCRIPTION="gmake in tools-dir"
9233  if test "x$MAKE_CANDIDATE" != x; then
9234    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9235$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9236    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9237    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9238    if test "x$IS_GNU_MAKE" = x; then
9239      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9240$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9241    else
9242      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9243      if test "x$IS_MODERN_MAKE" = x; then
9244        { $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
9245$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;}
9246      else
9247        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9248          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9249            MAKE_EXPECTED_ENV='cygwin'
9250          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9251            MAKE_EXPECTED_ENV='msys'
9252          else
9253            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9254          fi
9255          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9256          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9257        else
9258          # Not relevant for non-Windows
9259          IS_MAKE_CORRECT_ENV=true
9260        fi
9261        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9262          { $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
9263$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;}
9264        else
9265          FOUND_MAKE=$MAKE_CANDIDATE
9266
9267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9268
9269  # First separate the path from the arguments. This will split at the first
9270  # space.
9271  complete="$FOUND_MAKE"
9272  path="${complete%% *}"
9273  tmp="$complete EOL"
9274  arguments="${tmp#* }"
9275
9276  # Input might be given as Windows format, start by converting to
9277  # unix format.
9278  new_path=`$CYGPATH -u "$path"`
9279
9280  # Now try to locate executable using which
9281  new_path=`$WHICH "$new_path" 2> /dev/null`
9282  # bat and cmd files are not always considered executable in cygwin causing which
9283  # to not find them
9284  if test "x$new_path" = x \
9285           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9286           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9287    new_path=`$CYGPATH -u "$path"`
9288  fi
9289  if test "x$new_path" = x; then
9290    # Oops. Which didn't find the executable.
9291    # The splitting of arguments from the executable at a space might have been incorrect,
9292    # since paths with space are more likely in Windows. Give it another try with the whole
9293    # argument.
9294    path="$complete"
9295    arguments="EOL"
9296    new_path=`$CYGPATH -u "$path"`
9297    new_path=`$WHICH "$new_path" 2> /dev/null`
9298    # bat and cmd files are not always considered executable in cygwin causing which
9299    # to not find them
9300    if test "x$new_path" = x \
9301             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9302             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9303      new_path=`$CYGPATH -u "$path"`
9304    fi
9305    if test "x$new_path" = x; then
9306      # It's still not found. Now this is an unrecoverable error.
9307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9308$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9309      has_space=`$ECHO "$complete" | $GREP " "`
9310      if test "x$has_space" != x; then
9311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9313      fi
9314      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9315    fi
9316  fi
9317
9318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9321  # "foo.exe" is OK but "foo" is an error.
9322  #
9323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9324  # It is also a way to make sure we got the proper file name for the real test later on.
9325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9326  if test "x$test_shortpath" = x; then
9327    # Short path failed, file does not exist as specified.
9328    # Try adding .exe or .cmd
9329    if test -f "${new_path}.exe"; then
9330       input_to_shortpath="${new_path}.exe"
9331    elif test -f "${new_path}.cmd"; then
9332       input_to_shortpath="${new_path}.cmd"
9333    else
9334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9335$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9336      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9337$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9338      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9339    fi
9340  else
9341    input_to_shortpath="$new_path"
9342  fi
9343
9344  # Call helper function which possibly converts this using DOS-style short mode.
9345  # If so, the updated path is stored in $new_path.
9346  new_path="$input_to_shortpath"
9347
9348  input_path="$input_to_shortpath"
9349  # Check if we need to convert this using DOS-style short mode. If the path
9350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9351  # take no chances and rewrite it.
9352  # Note: m4 eats our [], so we need to use [ and ] instead.
9353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9354  if test "x$has_forbidden_chars" != x; then
9355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9359      # Going to short mode and back again did indeed matter. Since short mode is
9360      # case insensitive, let's make it lowercase to improve readability.
9361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9362      # Now convert it back to Unix-stile (cygpath)
9363      input_path=`$CYGPATH -u "$shortmode_path"`
9364      new_path="$input_path"
9365    fi
9366  fi
9367
9368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9369  if test "x$test_cygdrive_prefix" = x; then
9370    # As a simple fix, exclude /usr/bin since it's not a real path.
9371    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9373      # a path prefixed by /cygdrive for fixpath to work.
9374      new_path="$CYGWIN_ROOT_PATH$input_path"
9375    fi
9376  fi
9377
9378  # remove trailing .exe if any
9379  new_path="${new_path/%.exe/}"
9380
9381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9382
9383  # First separate the path from the arguments. This will split at the first
9384  # space.
9385  complete="$FOUND_MAKE"
9386  path="${complete%% *}"
9387  tmp="$complete EOL"
9388  arguments="${tmp#* }"
9389
9390  # Input might be given as Windows format, start by converting to
9391  # unix format.
9392  new_path="$path"
9393
9394  windows_path="$new_path"
9395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9396    unix_path=`$CYGPATH -u "$windows_path"`
9397    new_path="$unix_path"
9398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9400    new_path="$unix_path"
9401  fi
9402
9403
9404  # Now try to locate executable using which
9405  new_path=`$WHICH "$new_path" 2> /dev/null`
9406
9407  if test "x$new_path" = x; then
9408    # Oops. Which didn't find the executable.
9409    # The splitting of arguments from the executable at a space might have been incorrect,
9410    # since paths with space are more likely in Windows. Give it another try with the whole
9411    # argument.
9412    path="$complete"
9413    arguments="EOL"
9414    new_path="$path"
9415
9416  windows_path="$new_path"
9417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9418    unix_path=`$CYGPATH -u "$windows_path"`
9419    new_path="$unix_path"
9420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9422    new_path="$unix_path"
9423  fi
9424
9425
9426    new_path=`$WHICH "$new_path" 2> /dev/null`
9427
9428    if test "x$new_path" = x; then
9429      # It's still not found. Now this is an unrecoverable error.
9430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9431$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9432      has_space=`$ECHO "$complete" | $GREP " "`
9433      if test "x$has_space" != x; then
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9436      fi
9437      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9438    fi
9439  fi
9440
9441  # Now new_path has a complete unix path to the binary
9442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9443    # Keep paths in /bin as-is, but remove trailing .exe if any
9444    new_path="${new_path/%.exe/}"
9445    # Do not save /bin paths to all_fixpath_prefixes!
9446  else
9447    # Not in mixed or Windows style, start by that.
9448    new_path=`cmd //c echo $new_path`
9449
9450  input_path="$new_path"
9451  # Check if we need to convert this using DOS-style short mode. If the path
9452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9453  # take no chances and rewrite it.
9454  # Note: m4 eats our [], so we need to use [ and ] instead.
9455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9456  if test "x$has_forbidden_chars" != x; then
9457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9459  fi
9460
9461    # Output is in $new_path
9462
9463  windows_path="$new_path"
9464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9465    unix_path=`$CYGPATH -u "$windows_path"`
9466    new_path="$unix_path"
9467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9469    new_path="$unix_path"
9470  fi
9471
9472    # remove trailing .exe if any
9473    new_path="${new_path/%.exe/}"
9474
9475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9477  fi
9478
9479  else
9480    # We're on a posix platform. Hooray! :)
9481    # First separate the path from the arguments. This will split at the first
9482    # space.
9483    complete="$FOUND_MAKE"
9484    path="${complete%% *}"
9485    tmp="$complete EOL"
9486    arguments="${tmp#* }"
9487
9488    # Cannot rely on the command "which" here since it doesn't always work.
9489    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9490    if test -z "$is_absolute_path"; then
9491      # Path to executable is not absolute. Find it.
9492      IFS_save="$IFS"
9493      IFS=:
9494      for p in $PATH; do
9495        if test -f "$p/$path" && test -x "$p/$path"; then
9496          new_path="$p/$path"
9497          break
9498        fi
9499      done
9500      IFS="$IFS_save"
9501    else
9502      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9503$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9504      new_path="$path"
9505    fi
9506
9507    if test "x$new_path" = x; then
9508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9509$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9510        has_space=`$ECHO "$complete" | $GREP " "`
9511        if test "x$has_space" != x; then
9512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9514        fi
9515        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9516      fi
9517  fi
9518
9519      # Now join together the path and the arguments once again
9520      if test "x$arguments" != xEOL; then
9521        new_complete="$new_path ${arguments% *}"
9522      else
9523        new_complete="$new_path"
9524      fi
9525
9526  if test "x$complete" != "x$new_complete"; then
9527      FOUND_MAKE="$new_complete"
9528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9529$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9530    fi
9531
9532        fi
9533      fi
9534    fi
9535  fi
9536
9537        if test "x$FOUND_MAKE" = x; then
9538          for ac_prog in make
9539do
9540  # Extract the first word of "$ac_prog", so it can be a program name with args.
9541set dummy $ac_prog; ac_word=$2
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9543$as_echo_n "checking for $ac_word... " >&6; }
9544if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9545  $as_echo_n "(cached) " >&6
9546else
9547  case $CHECK_TOOLSDIR_MAKE in
9548  [\\/]* | ?:[\\/]*)
9549  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9550  ;;
9551  *)
9552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9553for as_dir in $PATH
9554do
9555  IFS=$as_save_IFS
9556  test -z "$as_dir" && as_dir=.
9557    for ac_exec_ext in '' $ac_executable_extensions; do
9558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9559    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9561    break 2
9562  fi
9563done
9564  done
9565IFS=$as_save_IFS
9566
9567  ;;
9568esac
9569fi
9570CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9571if test -n "$CHECK_TOOLSDIR_MAKE"; then
9572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9573$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9574else
9575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9576$as_echo "no" >&6; }
9577fi
9578
9579
9580  test -n "$CHECK_TOOLSDIR_MAKE" && break
9581done
9582
9583
9584  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9585  DESCRIPTION="make in tools-dir"
9586  if test "x$MAKE_CANDIDATE" != x; then
9587    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9588$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9589    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9590    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9591    if test "x$IS_GNU_MAKE" = x; then
9592      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9593$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9594    else
9595      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9596      if test "x$IS_MODERN_MAKE" = x; then
9597        { $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
9598$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;}
9599      else
9600        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9601          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9602            MAKE_EXPECTED_ENV='cygwin'
9603          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9604            MAKE_EXPECTED_ENV='msys'
9605          else
9606            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9607          fi
9608          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9609          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9610        else
9611          # Not relevant for non-Windows
9612          IS_MAKE_CORRECT_ENV=true
9613        fi
9614        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9615          { $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
9616$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;}
9617        else
9618          FOUND_MAKE=$MAKE_CANDIDATE
9619
9620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9621
9622  # First separate the path from the arguments. This will split at the first
9623  # space.
9624  complete="$FOUND_MAKE"
9625  path="${complete%% *}"
9626  tmp="$complete EOL"
9627  arguments="${tmp#* }"
9628
9629  # Input might be given as Windows format, start by converting to
9630  # unix format.
9631  new_path=`$CYGPATH -u "$path"`
9632
9633  # Now try to locate executable using which
9634  new_path=`$WHICH "$new_path" 2> /dev/null`
9635  # bat and cmd files are not always considered executable in cygwin causing which
9636  # to not find them
9637  if test "x$new_path" = x \
9638           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9639           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9640    new_path=`$CYGPATH -u "$path"`
9641  fi
9642  if test "x$new_path" = x; then
9643    # Oops. Which didn't find the executable.
9644    # The splitting of arguments from the executable at a space might have been incorrect,
9645    # since paths with space are more likely in Windows. Give it another try with the whole
9646    # argument.
9647    path="$complete"
9648    arguments="EOL"
9649    new_path=`$CYGPATH -u "$path"`
9650    new_path=`$WHICH "$new_path" 2> /dev/null`
9651    # bat and cmd files are not always considered executable in cygwin causing which
9652    # to not find them
9653    if test "x$new_path" = x \
9654             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9655             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9656      new_path=`$CYGPATH -u "$path"`
9657    fi
9658    if test "x$new_path" = x; then
9659      # It's still not found. Now this is an unrecoverable error.
9660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9662      has_space=`$ECHO "$complete" | $GREP " "`
9663      if test "x$has_space" != x; then
9664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9666      fi
9667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9668    fi
9669  fi
9670
9671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9674  # "foo.exe" is OK but "foo" is an error.
9675  #
9676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9677  # It is also a way to make sure we got the proper file name for the real test later on.
9678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9679  if test "x$test_shortpath" = x; then
9680    # Short path failed, file does not exist as specified.
9681    # Try adding .exe or .cmd
9682    if test -f "${new_path}.exe"; then
9683       input_to_shortpath="${new_path}.exe"
9684    elif test -f "${new_path}.cmd"; then
9685       input_to_shortpath="${new_path}.cmd"
9686    else
9687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9692    fi
9693  else
9694    input_to_shortpath="$new_path"
9695  fi
9696
9697  # Call helper function which possibly converts this using DOS-style short mode.
9698  # If so, the updated path is stored in $new_path.
9699  new_path="$input_to_shortpath"
9700
9701  input_path="$input_to_shortpath"
9702  # Check if we need to convert this using DOS-style short mode. If the path
9703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9704  # take no chances and rewrite it.
9705  # Note: m4 eats our [], so we need to use [ and ] instead.
9706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9707  if test "x$has_forbidden_chars" != x; then
9708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9712      # Going to short mode and back again did indeed matter. Since short mode is
9713      # case insensitive, let's make it lowercase to improve readability.
9714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9715      # Now convert it back to Unix-stile (cygpath)
9716      input_path=`$CYGPATH -u "$shortmode_path"`
9717      new_path="$input_path"
9718    fi
9719  fi
9720
9721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9722  if test "x$test_cygdrive_prefix" = x; then
9723    # As a simple fix, exclude /usr/bin since it's not a real path.
9724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9726      # a path prefixed by /cygdrive for fixpath to work.
9727      new_path="$CYGWIN_ROOT_PATH$input_path"
9728    fi
9729  fi
9730
9731  # remove trailing .exe if any
9732  new_path="${new_path/%.exe/}"
9733
9734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9735
9736  # First separate the path from the arguments. This will split at the first
9737  # space.
9738  complete="$FOUND_MAKE"
9739  path="${complete%% *}"
9740  tmp="$complete EOL"
9741  arguments="${tmp#* }"
9742
9743  # Input might be given as Windows format, start by converting to
9744  # unix format.
9745  new_path="$path"
9746
9747  windows_path="$new_path"
9748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9749    unix_path=`$CYGPATH -u "$windows_path"`
9750    new_path="$unix_path"
9751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9753    new_path="$unix_path"
9754  fi
9755
9756
9757  # Now try to locate executable using which
9758  new_path=`$WHICH "$new_path" 2> /dev/null`
9759
9760  if test "x$new_path" = x; then
9761    # Oops. Which didn't find the executable.
9762    # The splitting of arguments from the executable at a space might have been incorrect,
9763    # since paths with space are more likely in Windows. Give it another try with the whole
9764    # argument.
9765    path="$complete"
9766    arguments="EOL"
9767    new_path="$path"
9768
9769  windows_path="$new_path"
9770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9771    unix_path=`$CYGPATH -u "$windows_path"`
9772    new_path="$unix_path"
9773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9775    new_path="$unix_path"
9776  fi
9777
9778
9779    new_path=`$WHICH "$new_path" 2> /dev/null`
9780
9781    if test "x$new_path" = x; then
9782      # It's still not found. Now this is an unrecoverable error.
9783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9784$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9785      has_space=`$ECHO "$complete" | $GREP " "`
9786      if test "x$has_space" != x; then
9787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9789      fi
9790      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9791    fi
9792  fi
9793
9794  # Now new_path has a complete unix path to the binary
9795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9796    # Keep paths in /bin as-is, but remove trailing .exe if any
9797    new_path="${new_path/%.exe/}"
9798    # Do not save /bin paths to all_fixpath_prefixes!
9799  else
9800    # Not in mixed or Windows style, start by that.
9801    new_path=`cmd //c echo $new_path`
9802
9803  input_path="$new_path"
9804  # Check if we need to convert this using DOS-style short mode. If the path
9805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9806  # take no chances and rewrite it.
9807  # Note: m4 eats our [], so we need to use [ and ] instead.
9808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9809  if test "x$has_forbidden_chars" != x; then
9810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9812  fi
9813
9814    # Output is in $new_path
9815
9816  windows_path="$new_path"
9817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9818    unix_path=`$CYGPATH -u "$windows_path"`
9819    new_path="$unix_path"
9820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9822    new_path="$unix_path"
9823  fi
9824
9825    # remove trailing .exe if any
9826    new_path="${new_path/%.exe/}"
9827
9828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9830  fi
9831
9832  else
9833    # We're on a posix platform. Hooray! :)
9834    # First separate the path from the arguments. This will split at the first
9835    # space.
9836    complete="$FOUND_MAKE"
9837    path="${complete%% *}"
9838    tmp="$complete EOL"
9839    arguments="${tmp#* }"
9840
9841    # Cannot rely on the command "which" here since it doesn't always work.
9842    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9843    if test -z "$is_absolute_path"; then
9844      # Path to executable is not absolute. Find it.
9845      IFS_save="$IFS"
9846      IFS=:
9847      for p in $PATH; do
9848        if test -f "$p/$path" && test -x "$p/$path"; then
9849          new_path="$p/$path"
9850          break
9851        fi
9852      done
9853      IFS="$IFS_save"
9854    else
9855      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9856$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9857      new_path="$path"
9858    fi
9859
9860    if test "x$new_path" = x; then
9861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9862$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9863        has_space=`$ECHO "$complete" | $GREP " "`
9864        if test "x$has_space" != x; then
9865          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9866$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9867        fi
9868        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9869      fi
9870  fi
9871
9872      # Now join together the path and the arguments once again
9873      if test "x$arguments" != xEOL; then
9874        new_complete="$new_path ${arguments% *}"
9875      else
9876        new_complete="$new_path"
9877      fi
9878
9879  if test "x$complete" != "x$new_complete"; then
9880      FOUND_MAKE="$new_complete"
9881      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9882$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9883    fi
9884
9885        fi
9886      fi
9887    fi
9888  fi
9889
9890        fi
9891        PATH=$OLD_PATH
9892      fi
9893    fi
9894
9895    if test "x$FOUND_MAKE" = x; then
9896      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
9897    fi
9898  fi
9899
9900  MAKE=$FOUND_MAKE
9901
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9903$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9904
9905
9906
9907    # Test if find supports -delete
9908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9909$as_echo_n "checking if find supports -delete... " >&6; }
9910    FIND_DELETE="-delete"
9911
9912    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9913
9914    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9915
9916    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9917    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9918        # No, it does not.
9919        rm $DELETEDIR/TestIfFindSupportsDelete
9920        FIND_DELETE="-exec rm \{\} \+"
9921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
9923    else
9924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9925$as_echo "yes" >&6; }
9926    fi
9927    rmdir $DELETEDIR
9928
9929
9930
9931# These tools might not be installed by default,
9932# need hint on how to install them.
9933
9934    for ac_prog in unzip
9935do
9936  # Extract the first word of "$ac_prog", so it can be a program name with args.
9937set dummy $ac_prog; ac_word=$2
9938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9939$as_echo_n "checking for $ac_word... " >&6; }
9940if test "${ac_cv_path_UNZIP+set}" = set; then :
9941  $as_echo_n "(cached) " >&6
9942else
9943  case $UNZIP in
9944  [\\/]* | ?:[\\/]*)
9945  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9946  ;;
9947  *)
9948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9949for as_dir in $PATH
9950do
9951  IFS=$as_save_IFS
9952  test -z "$as_dir" && as_dir=.
9953    for ac_exec_ext in '' $ac_executable_extensions; do
9954  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9955    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9957    break 2
9958  fi
9959done
9960  done
9961IFS=$as_save_IFS
9962
9963  ;;
9964esac
9965fi
9966UNZIP=$ac_cv_path_UNZIP
9967if test -n "$UNZIP"; then
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9969$as_echo "$UNZIP" >&6; }
9970else
9971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973fi
9974
9975
9976  test -n "$UNZIP" && break
9977done
9978
9979
9980    if test "x$UNZIP" = x; then
9981        if test "xunzip" = x; then
9982          PROG_NAME=unzip
9983        else
9984          PROG_NAME=unzip
9985        fi
9986        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9987$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9988        as_fn_error $? "Cannot continue" "$LINENO" 5
9989    fi
9990
9991
9992
9993    for ac_prog in zip
9994do
9995  # Extract the first word of "$ac_prog", so it can be a program name with args.
9996set dummy $ac_prog; ac_word=$2
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9998$as_echo_n "checking for $ac_word... " >&6; }
9999if test "${ac_cv_path_ZIP+set}" = set; then :
10000  $as_echo_n "(cached) " >&6
10001else
10002  case $ZIP in
10003  [\\/]* | ?:[\\/]*)
10004  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10005  ;;
10006  *)
10007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10008for as_dir in $PATH
10009do
10010  IFS=$as_save_IFS
10011  test -z "$as_dir" && as_dir=.
10012    for ac_exec_ext in '' $ac_executable_extensions; do
10013  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10014    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10016    break 2
10017  fi
10018done
10019  done
10020IFS=$as_save_IFS
10021
10022  ;;
10023esac
10024fi
10025ZIP=$ac_cv_path_ZIP
10026if test -n "$ZIP"; then
10027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10028$as_echo "$ZIP" >&6; }
10029else
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031$as_echo "no" >&6; }
10032fi
10033
10034
10035  test -n "$ZIP" && break
10036done
10037
10038
10039    if test "x$ZIP" = x; then
10040        if test "xzip" = x; then
10041          PROG_NAME=zip
10042        else
10043          PROG_NAME=zip
10044        fi
10045        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10046$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10047        as_fn_error $? "Cannot continue" "$LINENO" 5
10048    fi
10049
10050
10051
10052# Non-required basic tools
10053
10054# Extract the first word of "ldd", so it can be a program name with args.
10055set dummy ldd; ac_word=$2
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10057$as_echo_n "checking for $ac_word... " >&6; }
10058if test "${ac_cv_path_LDD+set}" = set; then :
10059  $as_echo_n "(cached) " >&6
10060else
10061  case $LDD in
10062  [\\/]* | ?:[\\/]*)
10063  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10064  ;;
10065  *)
10066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10067for as_dir in $PATH
10068do
10069  IFS=$as_save_IFS
10070  test -z "$as_dir" && as_dir=.
10071    for ac_exec_ext in '' $ac_executable_extensions; do
10072  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10073    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10075    break 2
10076  fi
10077done
10078  done
10079IFS=$as_save_IFS
10080
10081  ;;
10082esac
10083fi
10084LDD=$ac_cv_path_LDD
10085if test -n "$LDD"; then
10086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10087$as_echo "$LDD" >&6; }
10088else
10089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
10091fi
10092
10093
10094if test "x$LDD" = "x"; then
10095    # List shared lib dependencies is used for
10096    # debug output and checking for forbidden dependencies.
10097    # We can build without it.
10098    LDD="true"
10099fi
10100# Extract the first word of "otool", so it can be a program name with args.
10101set dummy otool; ac_word=$2
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10103$as_echo_n "checking for $ac_word... " >&6; }
10104if test "${ac_cv_path_OTOOL+set}" = set; then :
10105  $as_echo_n "(cached) " >&6
10106else
10107  case $OTOOL in
10108  [\\/]* | ?:[\\/]*)
10109  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10110  ;;
10111  *)
10112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10113for as_dir in $PATH
10114do
10115  IFS=$as_save_IFS
10116  test -z "$as_dir" && as_dir=.
10117    for ac_exec_ext in '' $ac_executable_extensions; do
10118  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10119    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10121    break 2
10122  fi
10123done
10124  done
10125IFS=$as_save_IFS
10126
10127  ;;
10128esac
10129fi
10130OTOOL=$ac_cv_path_OTOOL
10131if test -n "$OTOOL"; then
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10133$as_echo "$OTOOL" >&6; }
10134else
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136$as_echo "no" >&6; }
10137fi
10138
10139
10140if test "x$OTOOL" = "x"; then
10141   OTOOL="true"
10142fi
10143for ac_prog in readelf greadelf
10144do
10145  # Extract the first word of "$ac_prog", so it can be a program name with args.
10146set dummy $ac_prog; ac_word=$2
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10148$as_echo_n "checking for $ac_word... " >&6; }
10149if test "${ac_cv_path_READELF+set}" = set; then :
10150  $as_echo_n "(cached) " >&6
10151else
10152  case $READELF in
10153  [\\/]* | ?:[\\/]*)
10154  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10155  ;;
10156  *)
10157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10158for as_dir in $PATH
10159do
10160  IFS=$as_save_IFS
10161  test -z "$as_dir" && as_dir=.
10162    for ac_exec_ext in '' $ac_executable_extensions; do
10163  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10164    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10166    break 2
10167  fi
10168done
10169  done
10170IFS=$as_save_IFS
10171
10172  ;;
10173esac
10174fi
10175READELF=$ac_cv_path_READELF
10176if test -n "$READELF"; then
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10178$as_echo "$READELF" >&6; }
10179else
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182fi
10183
10184
10185  test -n "$READELF" && break
10186done
10187
10188# Extract the first word of "hg", so it can be a program name with args.
10189set dummy hg; ac_word=$2
10190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10191$as_echo_n "checking for $ac_word... " >&6; }
10192if test "${ac_cv_path_HG+set}" = set; then :
10193  $as_echo_n "(cached) " >&6
10194else
10195  case $HG in
10196  [\\/]* | ?:[\\/]*)
10197  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10198  ;;
10199  *)
10200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201for as_dir in $PATH
10202do
10203  IFS=$as_save_IFS
10204  test -z "$as_dir" && as_dir=.
10205    for ac_exec_ext in '' $ac_executable_extensions; do
10206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10207    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10209    break 2
10210  fi
10211done
10212  done
10213IFS=$as_save_IFS
10214
10215  ;;
10216esac
10217fi
10218HG=$ac_cv_path_HG
10219if test -n "$HG"; then
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10221$as_echo "$HG" >&6; }
10222else
10223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224$as_echo "no" >&6; }
10225fi
10226
10227
10228# Extract the first word of "stat", so it can be a program name with args.
10229set dummy stat; ac_word=$2
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10231$as_echo_n "checking for $ac_word... " >&6; }
10232if test "${ac_cv_path_STAT+set}" = set; then :
10233  $as_echo_n "(cached) " >&6
10234else
10235  case $STAT in
10236  [\\/]* | ?:[\\/]*)
10237  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10238  ;;
10239  *)
10240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10241for as_dir in $PATH
10242do
10243  IFS=$as_save_IFS
10244  test -z "$as_dir" && as_dir=.
10245    for ac_exec_ext in '' $ac_executable_extensions; do
10246  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10247    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10249    break 2
10250  fi
10251done
10252  done
10253IFS=$as_save_IFS
10254
10255  ;;
10256esac
10257fi
10258STAT=$ac_cv_path_STAT
10259if test -n "$STAT"; then
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10261$as_echo "$STAT" >&6; }
10262else
10263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
10268# Extract the first word of "time", so it can be a program name with args.
10269set dummy time; ac_word=$2
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10271$as_echo_n "checking for $ac_word... " >&6; }
10272if test "${ac_cv_path_TIME+set}" = set; then :
10273  $as_echo_n "(cached) " >&6
10274else
10275  case $TIME in
10276  [\\/]* | ?:[\\/]*)
10277  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10278  ;;
10279  *)
10280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10281for as_dir in $PATH
10282do
10283  IFS=$as_save_IFS
10284  test -z "$as_dir" && as_dir=.
10285    for ac_exec_ext in '' $ac_executable_extensions; do
10286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10287    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10289    break 2
10290  fi
10291done
10292  done
10293IFS=$as_save_IFS
10294
10295  ;;
10296esac
10297fi
10298TIME=$ac_cv_path_TIME
10299if test -n "$TIME"; then
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10301$as_echo "$TIME" >&6; }
10302else
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
10305fi
10306
10307
10308
10309if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10310
10311    for ac_prog in comm
10312do
10313  # Extract the first word of "$ac_prog", so it can be a program name with args.
10314set dummy $ac_prog; ac_word=$2
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316$as_echo_n "checking for $ac_word... " >&6; }
10317if test "${ac_cv_path_COMM+set}" = set; then :
10318  $as_echo_n "(cached) " >&6
10319else
10320  case $COMM in
10321  [\\/]* | ?:[\\/]*)
10322  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10323  ;;
10324  *)
10325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326for as_dir in $PATH
10327do
10328  IFS=$as_save_IFS
10329  test -z "$as_dir" && as_dir=.
10330    for ac_exec_ext in '' $ac_executable_extensions; do
10331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10332    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334    break 2
10335  fi
10336done
10337  done
10338IFS=$as_save_IFS
10339
10340  ;;
10341esac
10342fi
10343COMM=$ac_cv_path_COMM
10344if test -n "$COMM"; then
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10346$as_echo "$COMM" >&6; }
10347else
10348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
10350fi
10351
10352
10353  test -n "$COMM" && break
10354done
10355
10356
10357    if test "x$COMM" = x; then
10358        if test "xcomm" = x; then
10359          PROG_NAME=comm
10360        else
10361          PROG_NAME=comm
10362        fi
10363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10365        as_fn_error $? "Cannot continue" "$LINENO" 5
10366    fi
10367
10368
10369fi
10370
10371
10372# Check if pkg-config is available.
10373
10374
10375if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10376	if test -n "$ac_tool_prefix"; then
10377  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10378set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10380$as_echo_n "checking for $ac_word... " >&6; }
10381if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10382  $as_echo_n "(cached) " >&6
10383else
10384  case $PKG_CONFIG in
10385  [\\/]* | ?:[\\/]*)
10386  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10387  ;;
10388  *)
10389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10390for as_dir in $PATH
10391do
10392  IFS=$as_save_IFS
10393  test -z "$as_dir" && as_dir=.
10394    for ac_exec_ext in '' $ac_executable_extensions; do
10395  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10396    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10398    break 2
10399  fi
10400done
10401  done
10402IFS=$as_save_IFS
10403
10404  ;;
10405esac
10406fi
10407PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10408if test -n "$PKG_CONFIG"; then
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10410$as_echo "$PKG_CONFIG" >&6; }
10411else
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415
10416
10417fi
10418if test -z "$ac_cv_path_PKG_CONFIG"; then
10419  ac_pt_PKG_CONFIG=$PKG_CONFIG
10420  # Extract the first word of "pkg-config", so it can be a program name with args.
10421set dummy pkg-config; ac_word=$2
10422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10423$as_echo_n "checking for $ac_word... " >&6; }
10424if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10425  $as_echo_n "(cached) " >&6
10426else
10427  case $ac_pt_PKG_CONFIG in
10428  [\\/]* | ?:[\\/]*)
10429  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10430  ;;
10431  *)
10432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10433for as_dir in $PATH
10434do
10435  IFS=$as_save_IFS
10436  test -z "$as_dir" && as_dir=.
10437    for ac_exec_ext in '' $ac_executable_extensions; do
10438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10439    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10441    break 2
10442  fi
10443done
10444  done
10445IFS=$as_save_IFS
10446
10447  ;;
10448esac
10449fi
10450ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10451if test -n "$ac_pt_PKG_CONFIG"; then
10452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10453$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10454else
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10456$as_echo "no" >&6; }
10457fi
10458
10459  if test "x$ac_pt_PKG_CONFIG" = x; then
10460    PKG_CONFIG=""
10461  else
10462    case $cross_compiling:$ac_tool_warned in
10463yes:)
10464{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10465$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10466ac_tool_warned=yes ;;
10467esac
10468    PKG_CONFIG=$ac_pt_PKG_CONFIG
10469  fi
10470else
10471  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10472fi
10473
10474fi
10475if test -n "$PKG_CONFIG"; then
10476	_pkg_min_version=0.9.0
10477	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10478$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10479	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10480		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10481$as_echo "yes" >&6; }
10482	else
10483		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10484$as_echo "no" >&6; }
10485		PKG_CONFIG=""
10486	fi
10487
10488fi
10489
10490# After basic tools have been setup, we can check build os specific details.
10491
10492###############################################################################
10493
10494# Note that this is the build platform OS version!
10495
10496OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10497OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10498OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10499OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10500
10501
10502
10503
10504
10505# Setup builddeps, for automatic downloading of tools we need.
10506# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10507# boot-jdk setup, but we need to have basic tools setup first.
10508
10509
10510# Check whether --with-builddeps-conf was given.
10511if test "${with_builddeps_conf+set}" = set; then :
10512  withval=$with_builddeps_conf;
10513fi
10514
10515
10516
10517# Check whether --with-builddeps-server was given.
10518if test "${with_builddeps_server+set}" = set; then :
10519  withval=$with_builddeps_server;
10520fi
10521
10522
10523
10524# Check whether --with-builddeps-dir was given.
10525if test "${with_builddeps_dir+set}" = set; then :
10526  withval=$with_builddeps_dir;
10527else
10528  with_builddeps_dir=/localhome/builddeps
10529fi
10530
10531
10532
10533# Check whether --with-builddeps-group was given.
10534if test "${with_builddeps_group+set}" = set; then :
10535  withval=$with_builddeps_group;
10536fi
10537
10538
10539
10540
10541    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10542        if test "x$with_builddeps_conf" != x; then
10543            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10544$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10545            builddepsfile=$with_builddeps_conf
10546            if test -s $builddepsfile; then
10547                . $builddepsfile
10548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10549$as_echo "loaded!" >&6; }
10550            else
10551               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10552           fi
10553        else
10554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10555$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10556            builddepsfile=`mktemp`
10557            touch $builddepsfile
10558            # Put all found confs into a single file.
10559            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10560            # Source the file to acquire the variables
10561            if test -s $builddepsfile; then
10562                . $builddepsfile
10563                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10564$as_echo "found at least one!" >&6; }
10565            else
10566               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10567           fi
10568        fi
10569        # Create build and target names that use _ instead of "-" and ".".
10570        # This is necessary to use them in variable names.
10571        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10572        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10573        # Extract rewrite information for build and target
10574        eval rewritten_build=\${REWRITE_${build_var}}
10575        if test "x$rewritten_build" = x; then
10576            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10577            echo Build stays the same $rewritten_build
10578        else
10579            echo Rewriting build for builddeps into $rewritten_build
10580        fi
10581        eval rewritten_target=\${REWRITE_${target_var}}
10582        if test "x$rewritten_target" = x; then
10583            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10584            echo Target stays the same $rewritten_target
10585        else
10586            echo Rewriting target for builddeps into $rewritten_target
10587        fi
10588        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10589        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10590    fi
10591    for ac_prog in 7z unzip
10592do
10593  # Extract the first word of "$ac_prog", so it can be a program name with args.
10594set dummy $ac_prog; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  if test -n "$BDEPS_UNZIP"; then
10601  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10602else
10603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604for as_dir in $PATH
10605do
10606  IFS=$as_save_IFS
10607  test -z "$as_dir" && as_dir=.
10608    for ac_exec_ext in '' $ac_executable_extensions; do
10609  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10610    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612    break 2
10613  fi
10614done
10615  done
10616IFS=$as_save_IFS
10617
10618fi
10619fi
10620BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10621if test -n "$BDEPS_UNZIP"; then
10622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10623$as_echo "$BDEPS_UNZIP" >&6; }
10624else
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10626$as_echo "no" >&6; }
10627fi
10628
10629
10630  test -n "$BDEPS_UNZIP" && break
10631done
10632
10633    if test "x$BDEPS_UNZIP" = x7z; then
10634        BDEPS_UNZIP="7z x"
10635    fi
10636
10637    for ac_prog in wget lftp ftp
10638do
10639  # Extract the first word of "$ac_prog", so it can be a program name with args.
10640set dummy $ac_prog; ac_word=$2
10641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10642$as_echo_n "checking for $ac_word... " >&6; }
10643if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10644  $as_echo_n "(cached) " >&6
10645else
10646  if test -n "$BDEPS_FTP"; then
10647  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10648else
10649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10650for as_dir in $PATH
10651do
10652  IFS=$as_save_IFS
10653  test -z "$as_dir" && as_dir=.
10654    for ac_exec_ext in '' $ac_executable_extensions; do
10655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10656    ac_cv_prog_BDEPS_FTP="$ac_prog"
10657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10658    break 2
10659  fi
10660done
10661  done
10662IFS=$as_save_IFS
10663
10664fi
10665fi
10666BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10667if test -n "$BDEPS_FTP"; then
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10669$as_echo "$BDEPS_FTP" >&6; }
10670else
10671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
10673fi
10674
10675
10676  test -n "$BDEPS_FTP" && break
10677done
10678
10679
10680
10681###############################################################################
10682#
10683# Determine OpenJDK variants, options and version numbers.
10684#
10685###############################################################################
10686
10687# We need build & target for this.
10688
10689
10690###############################################################################
10691#
10692# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10693# We always build headless support.
10694#
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10696$as_echo_n "checking headful support... " >&6; }
10697# Check whether --enable-headful was given.
10698if test "${enable_headful+set}" = set; then :
10699  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10700else
10701  SUPPORT_HEADFUL=yes
10702fi
10703
10704
10705SUPPORT_HEADLESS=yes
10706BUILD_HEADLESS="BUILD_HEADLESS:=true"
10707
10708if test "x$SUPPORT_HEADFUL" = xyes; then
10709    # We are building both headful and headless.
10710    headful_msg="inlude support for both headful and headless"
10711fi
10712
10713if test "x$SUPPORT_HEADFUL" = xno; then
10714    # Thus we are building headless only.
10715    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10716    headful_msg="headless only"
10717fi
10718
10719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10720$as_echo "$headful_msg" >&6; }
10721
10722
10723
10724
10725
10726# Control wether Hotspot runs Queens test after build.
10727# Check whether --enable-hotspot-test-in-build was given.
10728if test "${enable_hotspot_test_in_build+set}" = set; then :
10729  enableval=$enable_hotspot_test_in_build;
10730else
10731  enable_hotspot_test_in_build=no
10732fi
10733
10734if test "x$enable_hotspot_test_in_build" = "xyes"; then
10735    TEST_IN_BUILD=true
10736else
10737    TEST_IN_BUILD=false
10738fi
10739
10740
10741###############################################################################
10742#
10743# Choose cacerts source file
10744#
10745
10746# Check whether --with-cacerts-file was given.
10747if test "${with_cacerts_file+set}" = set; then :
10748  withval=$with_cacerts_file;
10749fi
10750
10751if test "x$with_cacerts_file" != x; then
10752    CACERTS_FILE=$with_cacerts_file
10753else
10754    if test "x$OPENJDK" = "xtrue"; then
10755        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10756    else
10757        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10758    fi
10759fi
10760
10761
10762###############################################################################
10763#
10764# Enable or disable unlimited crypto
10765#
10766# Check whether --enable-unlimited-crypto was given.
10767if test "${enable_unlimited_crypto+set}" = set; then :
10768  enableval=$enable_unlimited_crypto;
10769else
10770  enable_unlimited_crypto=no
10771fi
10772
10773if test "x$enable_unlimited_crypto" = "xyes"; then
10774    UNLIMITED_CRYPTO=true
10775else
10776    UNLIMITED_CRYPTO=false
10777fi
10778
10779
10780###############################################################################
10781#
10782# Enable or disable the elliptic curve crypto implementation
10783#
10784
10785
10786###############################################################################
10787#
10788# Compress jars
10789#
10790COMPRESS_JARS=false
10791
10792
10793
10794
10795# Source the version numbers
10796. $AUTOCONF_DIR/version-numbers
10797
10798# Get the settings from parameters
10799
10800# Check whether --with-milestone was given.
10801if test "${with_milestone+set}" = set; then :
10802  withval=$with_milestone;
10803fi
10804
10805if test "x$with_milestone" = xyes; then
10806  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10807elif test "x$with_milestone" != x; then
10808    MILESTONE="$with_milestone"
10809fi
10810if test "x$MILESTONE" = x; then
10811  MILESTONE=internal
10812fi
10813
10814
10815# Check whether --with-build-number was given.
10816if test "${with_build_number+set}" = set; then :
10817  withval=$with_build_number;
10818fi
10819
10820if test "x$with_build_number" = xyes; then
10821  as_fn_error $? "Build number must have a value" "$LINENO" 5
10822elif test "x$with_build_number" != x; then
10823  JDK_BUILD_NUMBER="$with_build_number"
10824fi
10825if test "x$JDK_BUILD_NUMBER" = x; then
10826  JDK_BUILD_NUMBER=b00
10827fi
10828
10829
10830# Check whether --with-user-release-suffix was given.
10831if test "${with_user_release_suffix+set}" = set; then :
10832  withval=$with_user_release_suffix;
10833fi
10834
10835if test "x$with_user_release_suffix" = xyes; then
10836  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10837elif test "x$with_user_release_suffix" != x; then
10838  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10839else
10840  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10841  # Avoid [:alnum:] since it depends on the locale.
10842  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10843  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10844fi
10845
10846
10847# Now set the JDK version, milestone, build number etc.
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862COPYRIGHT_YEAR=`date +'%Y'`
10863
10864
10865if test "x$JDK_UPDATE_VERSION" != x; then
10866  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10867else
10868  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10869fi
10870
10871
10872COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10873
10874
10875
10876###############################################################################
10877#
10878# Setup BootJDK, used to bootstrap the build.
10879#
10880###############################################################################
10881
10882
10883BOOT_JDK_FOUND=no
10884
10885# Check whether --with-boot-jdk was given.
10886if test "${with_boot_jdk+set}" = set; then :
10887  withval=$with_boot_jdk;
10888fi
10889
10890
10891# We look for the Boot JDK through various means, going from more certain to
10892# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10893# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10894# must check if this is indeed valid; otherwise we'll continue looking.
10895
10896# Test: Is bootjdk explicitely set by command line arguments?
10897
10898  if test "x$BOOT_JDK_FOUND" = xno; then
10899    # Now execute the test
10900
10901if test "x$with_boot_jdk" != x; then
10902    BOOT_JDK=$with_boot_jdk
10903    BOOT_JDK_FOUND=maybe
10904    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10905$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10906fi
10907
10908
10909    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10910    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10911      # Do we have a bin/java?
10912      if test ! -x "$BOOT_JDK/bin/java"; then
10913        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10915        BOOT_JDK_FOUND=no
10916      else
10917        # Do we have a bin/javac?
10918        if test ! -x "$BOOT_JDK/bin/javac"; then
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10921          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10922$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10923          BOOT_JDK_FOUND=no
10924        else
10925          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10926          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10929            BOOT_JDK_FOUND=no
10930          else
10931            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10932            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10933
10934            # Extra M4 quote needed to protect [] in grep expression.
10935            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10936            if test "x$FOUND_VERSION_78" = x; then
10937              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10939              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10940$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10941              BOOT_JDK_FOUND=no
10942            else
10943              # We're done! :-)
10944              BOOT_JDK_FOUND=yes
10945
10946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10947
10948  # Input might be given as Windows format, start by converting to
10949  # unix format.
10950  path="$BOOT_JDK"
10951  new_path=`$CYGPATH -u "$path"`
10952
10953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10956  # "foo.exe" is OK but "foo" is an error.
10957  #
10958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10959  # It is also a way to make sure we got the proper file name for the real test later on.
10960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10961  if test "x$test_shortpath" = x; then
10962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10964    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10965  fi
10966
10967  # Call helper function which possibly converts this using DOS-style short mode.
10968  # If so, the updated path is stored in $new_path.
10969
10970  input_path="$new_path"
10971  # Check if we need to convert this using DOS-style short mode. If the path
10972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10973  # take no chances and rewrite it.
10974  # Note: m4 eats our [], so we need to use [ and ] instead.
10975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10976  if test "x$has_forbidden_chars" != x; then
10977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10981      # Going to short mode and back again did indeed matter. Since short mode is
10982      # case insensitive, let's make it lowercase to improve readability.
10983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10984      # Now convert it back to Unix-stile (cygpath)
10985      input_path=`$CYGPATH -u "$shortmode_path"`
10986      new_path="$input_path"
10987    fi
10988  fi
10989
10990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10991  if test "x$test_cygdrive_prefix" = x; then
10992    # As a simple fix, exclude /usr/bin since it's not a real path.
10993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10995      # a path prefixed by /cygdrive for fixpath to work.
10996      new_path="$CYGWIN_ROOT_PATH$input_path"
10997    fi
10998  fi
10999
11000
11001  if test "x$path" != "x$new_path"; then
11002    BOOT_JDK="$new_path"
11003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11005  fi
11006
11007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11008
11009  path="$BOOT_JDK"
11010  has_colon=`$ECHO $path | $GREP ^.:`
11011  new_path="$path"
11012  if test "x$has_colon" = x; then
11013    # Not in mixed or Windows style, start by that.
11014    new_path=`cmd //c echo $path`
11015  fi
11016
11017
11018  input_path="$new_path"
11019  # Check if we need to convert this using DOS-style short mode. If the path
11020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11021  # take no chances and rewrite it.
11022  # Note: m4 eats our [], so we need to use [ and ] instead.
11023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11024  if test "x$has_forbidden_chars" != x; then
11025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027  fi
11028
11029
11030  windows_path="$new_path"
11031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11032    unix_path=`$CYGPATH -u "$windows_path"`
11033    new_path="$unix_path"
11034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11036    new_path="$unix_path"
11037  fi
11038
11039  if test "x$path" != "x$new_path"; then
11040    BOOT_JDK="$new_path"
11041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11043  fi
11044
11045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11047
11048  else
11049    # We're on a posix platform. Hooray! :)
11050    path="$BOOT_JDK"
11051
11052    if test ! -f "$path" && test ! -d "$path"; then
11053      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11054    fi
11055
11056    has_space=`$ECHO "$path" | $GREP " "`
11057    if test "x$has_space" != x; then
11058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11061    fi
11062  fi
11063
11064              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11065$as_echo_n "checking for Boot JDK... " >&6; }
11066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11067$as_echo "$BOOT_JDK" >&6; }
11068              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11069$as_echo_n "checking Boot JDK version... " >&6; }
11070              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11071              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11072$as_echo "$BOOT_JDK_VERSION" >&6; }
11073            fi # end check jdk version
11074          fi # end check rt.jar
11075        fi # end check javac
11076      fi # end check java
11077    fi # end check boot jdk found
11078  fi
11079
11080if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11081  # Having specified an argument which is incorrect will produce an instant failure;
11082  # we should not go on looking
11083  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11084fi
11085
11086# Test: Is bootjdk available from builddeps?
11087
11088  if test "x$BOOT_JDK_FOUND" = xno; then
11089    # Now execute the test
11090
11091
11092
11093    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11094        # Source the builddeps file again, to make sure it uses the latest variables!
11095        . $builddepsfile
11096        # Look for a target and build machine specific resource!
11097        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11098        if test "x$resource" = x; then
11099            # Ok, lets instead look for a target specific resource
11100            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11101        fi
11102        if test "x$resource" = x; then
11103            # Ok, lets instead look for a build specific resource
11104            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11105        fi
11106        if test "x$resource" = x; then
11107            # Ok, lets instead look for a generic resource
11108            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11109            resource=${builddep_bootjdk}
11110        fi
11111        if test "x$resource" != x; then
11112            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11113$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11114	    # If the resource in the builddeps.conf file is an existing directory,
11115	    # for example /java/linux/cups
11116	    if test -d ${resource}; then
11117	       depdir=${resource}
11118	    else
11119
11120# bootjdk is for example mymodule
11121# $resource is for example libs/general/libmymod_1_2_3.zip
11122# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11123# $with_builddeps_dir is for example /localhome/builddeps
11124# depdir is the name of the variable into which we store the depdir, eg MYMOD
11125# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11126# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11127    filename=`basename $resource`
11128    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11129    filebase=${filename%%.*}
11130    extension=${filename#*.}
11131    installdir=$with_builddeps_dir/$filebase
11132    if test ! -f $installdir/$filename.unpacked; then
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11134$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11135        if test ! -d $installdir; then
11136            mkdir -p $installdir
11137        fi
11138        if test ! -d $installdir; then
11139            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11140        fi
11141        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11142        touch $tmpfile
11143        if test ! -f $tmpfile; then
11144            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11145        fi
11146
11147    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11148    # $tmpfile is the local file name for the downloaded file.
11149    VALID_TOOL=no
11150    if test "x$BDEPS_FTP" = xwget; then
11151       VALID_TOOL=yes
11152       wget -O $tmpfile $with_builddeps_server/$resource
11153    fi
11154    if test "x$BDEPS_FTP" = xlftp; then
11155       VALID_TOOL=yes
11156       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11157    fi
11158    if test "x$BDEPS_FTP" = xftp; then
11159        VALID_TOOL=yes
11160        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11161        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11162        FTPUSERPWD=${FTPSERVER%%@*}
11163        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11164            FTPUSER=${userpwd%%:*}
11165            FTPPWD=${userpwd#*@}
11166            FTPSERVER=${FTPSERVER#*@}
11167        else
11168            FTPUSER=ftp
11169            FTPPWD=ftp
11170        fi
11171        # the "pass" command does not work on some
11172        # ftp clients (read ftp.exe) but if it works,
11173        # passive mode is better!
11174        (\
11175            echo "user $FTPUSER $FTPPWD"        ;\
11176            echo "pass"                         ;\
11177            echo "bin"                          ;\
11178            echo "get $FTPPATH $tmpfile"              ;\
11179        ) | ftp -in $FTPSERVER
11180    fi
11181    if test "x$VALID_TOOL" != xyes; then
11182       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11183    fi
11184
11185        mv $tmpfile $installdir/$filename
11186        if test ! -s $installdir/$filename; then
11187            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11188        fi
11189        case "$extension" in
11190            zip)  echo "Unzipping $installdir/$filename..."
11191               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11192            ;;
11193            tar.gz) echo "Untaring $installdir/$filename..."
11194               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11195            ;;
11196            tgz) echo "Untaring $installdir/$filename..."
11197               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11198            ;;
11199            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11200            ;;
11201        esac
11202    fi
11203    if test -f $installdir/$filename.unpacked; then
11204        depdir=$installdir
11205    fi
11206
11207	    fi
11208            # Source the builddeps file again, because in the previous command, the depdir
11209            # was updated to point at the current build dependency install directory.
11210            . $builddepsfile
11211            # Now extract variables from the builddeps.conf files.
11212            theroot=${builddep_bootjdk_ROOT}
11213            thecflags=${builddep_bootjdk_CFLAGS}
11214            thelibs=${builddep_bootjdk_LIBS}
11215            if test "x$depdir" = x; then
11216                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11217            fi
11218            BOOT_JDK=$depdir
11219            if test "x$theroot" != x; then
11220               BOOT_JDK="$theroot"
11221            fi
11222            if test "x$thecflags" != x; then
11223               BOOT_JDK_CFLAGS="$thecflags"
11224            fi
11225            if test "x$thelibs" != x; then
11226               BOOT_JDK_LIBS="$thelibs"
11227            fi
11228            BOOT_JDK_FOUND=maybe
11229            else BOOT_JDK_FOUND=no
11230
11231        fi
11232        else BOOT_JDK_FOUND=no
11233
11234    fi
11235
11236
11237
11238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11240      # Do we have a bin/java?
11241      if test ! -x "$BOOT_JDK/bin/java"; then
11242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11244        BOOT_JDK_FOUND=no
11245      else
11246        # Do we have a bin/javac?
11247        if test ! -x "$BOOT_JDK/bin/javac"; then
11248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11252          BOOT_JDK_FOUND=no
11253        else
11254          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11255          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11258            BOOT_JDK_FOUND=no
11259          else
11260            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11262
11263            # Extra M4 quote needed to protect [] in grep expression.
11264            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11265            if test "x$FOUND_VERSION_78" = x; then
11266              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11268              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11269$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11270              BOOT_JDK_FOUND=no
11271            else
11272              # We're done! :-)
11273              BOOT_JDK_FOUND=yes
11274
11275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11276
11277  # Input might be given as Windows format, start by converting to
11278  # unix format.
11279  path="$BOOT_JDK"
11280  new_path=`$CYGPATH -u "$path"`
11281
11282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11285  # "foo.exe" is OK but "foo" is an error.
11286  #
11287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11288  # It is also a way to make sure we got the proper file name for the real test later on.
11289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11290  if test "x$test_shortpath" = x; then
11291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11293    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11294  fi
11295
11296  # Call helper function which possibly converts this using DOS-style short mode.
11297  # If so, the updated path is stored in $new_path.
11298
11299  input_path="$new_path"
11300  # Check if we need to convert this using DOS-style short mode. If the path
11301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11302  # take no chances and rewrite it.
11303  # Note: m4 eats our [], so we need to use [ and ] instead.
11304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11305  if test "x$has_forbidden_chars" != x; then
11306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11310      # Going to short mode and back again did indeed matter. Since short mode is
11311      # case insensitive, let's make it lowercase to improve readability.
11312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11313      # Now convert it back to Unix-stile (cygpath)
11314      input_path=`$CYGPATH -u "$shortmode_path"`
11315      new_path="$input_path"
11316    fi
11317  fi
11318
11319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11320  if test "x$test_cygdrive_prefix" = x; then
11321    # As a simple fix, exclude /usr/bin since it's not a real path.
11322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11324      # a path prefixed by /cygdrive for fixpath to work.
11325      new_path="$CYGWIN_ROOT_PATH$input_path"
11326    fi
11327  fi
11328
11329
11330  if test "x$path" != "x$new_path"; then
11331    BOOT_JDK="$new_path"
11332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11334  fi
11335
11336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11337
11338  path="$BOOT_JDK"
11339  has_colon=`$ECHO $path | $GREP ^.:`
11340  new_path="$path"
11341  if test "x$has_colon" = x; then
11342    # Not in mixed or Windows style, start by that.
11343    new_path=`cmd //c echo $path`
11344  fi
11345
11346
11347  input_path="$new_path"
11348  # Check if we need to convert this using DOS-style short mode. If the path
11349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11350  # take no chances and rewrite it.
11351  # Note: m4 eats our [], so we need to use [ and ] instead.
11352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11353  if test "x$has_forbidden_chars" != x; then
11354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11356  fi
11357
11358
11359  windows_path="$new_path"
11360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11361    unix_path=`$CYGPATH -u "$windows_path"`
11362    new_path="$unix_path"
11363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11365    new_path="$unix_path"
11366  fi
11367
11368  if test "x$path" != "x$new_path"; then
11369    BOOT_JDK="$new_path"
11370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11372  fi
11373
11374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11376
11377  else
11378    # We're on a posix platform. Hooray! :)
11379    path="$BOOT_JDK"
11380
11381    if test ! -f "$path" && test ! -d "$path"; then
11382      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11383    fi
11384
11385    has_space=`$ECHO "$path" | $GREP " "`
11386    if test "x$has_space" != x; then
11387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11390    fi
11391  fi
11392
11393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11394$as_echo_n "checking for Boot JDK... " >&6; }
11395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11396$as_echo "$BOOT_JDK" >&6; }
11397              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11398$as_echo_n "checking Boot JDK version... " >&6; }
11399              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11400              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11401$as_echo "$BOOT_JDK_VERSION" >&6; }
11402            fi # end check jdk version
11403          fi # end check rt.jar
11404        fi # end check javac
11405      fi # end check java
11406    fi # end check boot jdk found
11407  fi
11408
11409
11410# Test: Is $JAVA_HOME set?
11411
11412  if test "x$BOOT_JDK_FOUND" = xno; then
11413    # Now execute the test
11414
11415    if test "x$JAVA_HOME" != x; then
11416        JAVA_HOME_PROCESSED="$JAVA_HOME"
11417
11418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11419
11420  # Input might be given as Windows format, start by converting to
11421  # unix format.
11422  path="$JAVA_HOME_PROCESSED"
11423  new_path=`$CYGPATH -u "$path"`
11424
11425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11428  # "foo.exe" is OK but "foo" is an error.
11429  #
11430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11431  # It is also a way to make sure we got the proper file name for the real test later on.
11432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11433  if test "x$test_shortpath" = x; then
11434    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11435$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11436    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11437  fi
11438
11439  # Call helper function which possibly converts this using DOS-style short mode.
11440  # If so, the updated path is stored in $new_path.
11441
11442  input_path="$new_path"
11443  # Check if we need to convert this using DOS-style short mode. If the path
11444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11445  # take no chances and rewrite it.
11446  # Note: m4 eats our [], so we need to use [ and ] instead.
11447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11448  if test "x$has_forbidden_chars" != x; then
11449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11453      # Going to short mode and back again did indeed matter. Since short mode is
11454      # case insensitive, let's make it lowercase to improve readability.
11455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11456      # Now convert it back to Unix-stile (cygpath)
11457      input_path=`$CYGPATH -u "$shortmode_path"`
11458      new_path="$input_path"
11459    fi
11460  fi
11461
11462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11463  if test "x$test_cygdrive_prefix" = x; then
11464    # As a simple fix, exclude /usr/bin since it's not a real path.
11465    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11467      # a path prefixed by /cygdrive for fixpath to work.
11468      new_path="$CYGWIN_ROOT_PATH$input_path"
11469    fi
11470  fi
11471
11472
11473  if test "x$path" != "x$new_path"; then
11474    JAVA_HOME_PROCESSED="$new_path"
11475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11476$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11477  fi
11478
11479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11480
11481  path="$JAVA_HOME_PROCESSED"
11482  has_colon=`$ECHO $path | $GREP ^.:`
11483  new_path="$path"
11484  if test "x$has_colon" = x; then
11485    # Not in mixed or Windows style, start by that.
11486    new_path=`cmd //c echo $path`
11487  fi
11488
11489
11490  input_path="$new_path"
11491  # Check if we need to convert this using DOS-style short mode. If the path
11492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11493  # take no chances and rewrite it.
11494  # Note: m4 eats our [], so we need to use [ and ] instead.
11495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11496  if test "x$has_forbidden_chars" != x; then
11497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11499  fi
11500
11501
11502  windows_path="$new_path"
11503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11504    unix_path=`$CYGPATH -u "$windows_path"`
11505    new_path="$unix_path"
11506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11508    new_path="$unix_path"
11509  fi
11510
11511  if test "x$path" != "x$new_path"; then
11512    JAVA_HOME_PROCESSED="$new_path"
11513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11514$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11515  fi
11516
11517  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11518  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11519
11520  else
11521    # We're on a posix platform. Hooray! :)
11522    path="$JAVA_HOME_PROCESSED"
11523
11524    if test ! -f "$path" && test ! -d "$path"; then
11525      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11526    fi
11527
11528    has_space=`$ECHO "$path" | $GREP " "`
11529    if test "x$has_space" != x; then
11530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11531$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11532      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11533    fi
11534  fi
11535
11536        if test ! -d "$JAVA_HOME_PROCESSED"; then
11537            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11538$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11539        else
11540          # Aha, the user has set a JAVA_HOME
11541          # let us use that as the Boot JDK.
11542          BOOT_JDK="$JAVA_HOME_PROCESSED"
11543          BOOT_JDK_FOUND=maybe
11544          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11545$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11546        fi
11547    fi
11548
11549
11550    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11551    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11552      # Do we have a bin/java?
11553      if test ! -x "$BOOT_JDK/bin/java"; then
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11556        BOOT_JDK_FOUND=no
11557      else
11558        # Do we have a bin/javac?
11559        if test ! -x "$BOOT_JDK/bin/javac"; then
11560          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11562          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11563$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11564          BOOT_JDK_FOUND=no
11565        else
11566          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11567          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11570            BOOT_JDK_FOUND=no
11571          else
11572            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11573            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11574
11575            # Extra M4 quote needed to protect [] in grep expression.
11576            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11577            if test "x$FOUND_VERSION_78" = x; then
11578              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11580              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11581$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11582              BOOT_JDK_FOUND=no
11583            else
11584              # We're done! :-)
11585              BOOT_JDK_FOUND=yes
11586
11587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11588
11589  # Input might be given as Windows format, start by converting to
11590  # unix format.
11591  path="$BOOT_JDK"
11592  new_path=`$CYGPATH -u "$path"`
11593
11594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11597  # "foo.exe" is OK but "foo" is an error.
11598  #
11599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11600  # It is also a way to make sure we got the proper file name for the real test later on.
11601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11602  if test "x$test_shortpath" = x; then
11603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11606  fi
11607
11608  # Call helper function which possibly converts this using DOS-style short mode.
11609  # If so, the updated path is stored in $new_path.
11610
11611  input_path="$new_path"
11612  # Check if we need to convert this using DOS-style short mode. If the path
11613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11614  # take no chances and rewrite it.
11615  # Note: m4 eats our [], so we need to use [ and ] instead.
11616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11617  if test "x$has_forbidden_chars" != x; then
11618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11622      # Going to short mode and back again did indeed matter. Since short mode is
11623      # case insensitive, let's make it lowercase to improve readability.
11624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11625      # Now convert it back to Unix-stile (cygpath)
11626      input_path=`$CYGPATH -u "$shortmode_path"`
11627      new_path="$input_path"
11628    fi
11629  fi
11630
11631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11632  if test "x$test_cygdrive_prefix" = x; then
11633    # As a simple fix, exclude /usr/bin since it's not a real path.
11634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11636      # a path prefixed by /cygdrive for fixpath to work.
11637      new_path="$CYGWIN_ROOT_PATH$input_path"
11638    fi
11639  fi
11640
11641
11642  if test "x$path" != "x$new_path"; then
11643    BOOT_JDK="$new_path"
11644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11646  fi
11647
11648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11649
11650  path="$BOOT_JDK"
11651  has_colon=`$ECHO $path | $GREP ^.:`
11652  new_path="$path"
11653  if test "x$has_colon" = x; then
11654    # Not in mixed or Windows style, start by that.
11655    new_path=`cmd //c echo $path`
11656  fi
11657
11658
11659  input_path="$new_path"
11660  # Check if we need to convert this using DOS-style short mode. If the path
11661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11662  # take no chances and rewrite it.
11663  # Note: m4 eats our [], so we need to use [ and ] instead.
11664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11665  if test "x$has_forbidden_chars" != x; then
11666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11668  fi
11669
11670
11671  windows_path="$new_path"
11672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11673    unix_path=`$CYGPATH -u "$windows_path"`
11674    new_path="$unix_path"
11675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11677    new_path="$unix_path"
11678  fi
11679
11680  if test "x$path" != "x$new_path"; then
11681    BOOT_JDK="$new_path"
11682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11684  fi
11685
11686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11688
11689  else
11690    # We're on a posix platform. Hooray! :)
11691    path="$BOOT_JDK"
11692
11693    if test ! -f "$path" && test ! -d "$path"; then
11694      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11695    fi
11696
11697    has_space=`$ECHO "$path" | $GREP " "`
11698    if test "x$has_space" != x; then
11699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11701      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11702    fi
11703  fi
11704
11705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11706$as_echo_n "checking for Boot JDK... " >&6; }
11707              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11708$as_echo "$BOOT_JDK" >&6; }
11709              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11710$as_echo_n "checking Boot JDK version... " >&6; }
11711              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11712              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11713$as_echo "$BOOT_JDK_VERSION" >&6; }
11714            fi # end check jdk version
11715          fi # end check rt.jar
11716        fi # end check javac
11717      fi # end check java
11718    fi # end check boot jdk found
11719  fi
11720
11721
11722# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11723
11724  if test "x$BOOT_JDK_FOUND" = xno; then
11725    # Now execute the test
11726
11727    if test -x /usr/libexec/java_home; then
11728        BOOT_JDK=`/usr/libexec/java_home`
11729        BOOT_JDK_FOUND=maybe
11730        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11731$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11732    fi
11733
11734
11735    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11736    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11737      # Do we have a bin/java?
11738      if test ! -x "$BOOT_JDK/bin/java"; then
11739        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11741        BOOT_JDK_FOUND=no
11742      else
11743        # Do we have a bin/javac?
11744        if test ! -x "$BOOT_JDK/bin/javac"; then
11745          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11747          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11748$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11749          BOOT_JDK_FOUND=no
11750        else
11751          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11752          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11753            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11755            BOOT_JDK_FOUND=no
11756          else
11757            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11758            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11759
11760            # Extra M4 quote needed to protect [] in grep expression.
11761            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11762            if test "x$FOUND_VERSION_78" = x; then
11763              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11765              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11766$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11767              BOOT_JDK_FOUND=no
11768            else
11769              # We're done! :-)
11770              BOOT_JDK_FOUND=yes
11771
11772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11773
11774  # Input might be given as Windows format, start by converting to
11775  # unix format.
11776  path="$BOOT_JDK"
11777  new_path=`$CYGPATH -u "$path"`
11778
11779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11782  # "foo.exe" is OK but "foo" is an error.
11783  #
11784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11785  # It is also a way to make sure we got the proper file name for the real test later on.
11786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11787  if test "x$test_shortpath" = x; then
11788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11790    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11791  fi
11792
11793  # Call helper function which possibly converts this using DOS-style short mode.
11794  # If so, the updated path is stored in $new_path.
11795
11796  input_path="$new_path"
11797  # Check if we need to convert this using DOS-style short mode. If the path
11798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11799  # take no chances and rewrite it.
11800  # Note: m4 eats our [], so we need to use [ and ] instead.
11801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11802  if test "x$has_forbidden_chars" != x; then
11803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11807      # Going to short mode and back again did indeed matter. Since short mode is
11808      # case insensitive, let's make it lowercase to improve readability.
11809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11810      # Now convert it back to Unix-stile (cygpath)
11811      input_path=`$CYGPATH -u "$shortmode_path"`
11812      new_path="$input_path"
11813    fi
11814  fi
11815
11816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11817  if test "x$test_cygdrive_prefix" = x; then
11818    # As a simple fix, exclude /usr/bin since it's not a real path.
11819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11821      # a path prefixed by /cygdrive for fixpath to work.
11822      new_path="$CYGWIN_ROOT_PATH$input_path"
11823    fi
11824  fi
11825
11826
11827  if test "x$path" != "x$new_path"; then
11828    BOOT_JDK="$new_path"
11829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11831  fi
11832
11833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11834
11835  path="$BOOT_JDK"
11836  has_colon=`$ECHO $path | $GREP ^.:`
11837  new_path="$path"
11838  if test "x$has_colon" = x; then
11839    # Not in mixed or Windows style, start by that.
11840    new_path=`cmd //c echo $path`
11841  fi
11842
11843
11844  input_path="$new_path"
11845  # Check if we need to convert this using DOS-style short mode. If the path
11846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11847  # take no chances and rewrite it.
11848  # Note: m4 eats our [], so we need to use [ and ] instead.
11849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11850  if test "x$has_forbidden_chars" != x; then
11851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11853  fi
11854
11855
11856  windows_path="$new_path"
11857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11858    unix_path=`$CYGPATH -u "$windows_path"`
11859    new_path="$unix_path"
11860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11862    new_path="$unix_path"
11863  fi
11864
11865  if test "x$path" != "x$new_path"; then
11866    BOOT_JDK="$new_path"
11867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11869  fi
11870
11871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11873
11874  else
11875    # We're on a posix platform. Hooray! :)
11876    path="$BOOT_JDK"
11877
11878    if test ! -f "$path" && test ! -d "$path"; then
11879      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11880    fi
11881
11882    has_space=`$ECHO "$path" | $GREP " "`
11883    if test "x$has_space" != x; then
11884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11886      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11887    fi
11888  fi
11889
11890              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11891$as_echo_n "checking for Boot JDK... " >&6; }
11892              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11893$as_echo "$BOOT_JDK" >&6; }
11894              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11895$as_echo_n "checking Boot JDK version... " >&6; }
11896              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11897              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11898$as_echo "$BOOT_JDK_VERSION" >&6; }
11899            fi # end check jdk version
11900          fi # end check rt.jar
11901        fi # end check javac
11902      fi # end check java
11903    fi # end check boot jdk found
11904  fi
11905
11906
11907# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11908
11909  if test "x$BOOT_JDK_FOUND" = xno; then
11910    # Now execute the test
11911
11912    # Extract the first word of "javac", so it can be a program name with args.
11913set dummy javac; ac_word=$2
11914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11915$as_echo_n "checking for $ac_word... " >&6; }
11916if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11917  $as_echo_n "(cached) " >&6
11918else
11919  case $JAVAC_CHECK in
11920  [\\/]* | ?:[\\/]*)
11921  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11922  ;;
11923  *)
11924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11925for as_dir in $PATH
11926do
11927  IFS=$as_save_IFS
11928  test -z "$as_dir" && as_dir=.
11929    for ac_exec_ext in '' $ac_executable_extensions; do
11930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11931    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11933    break 2
11934  fi
11935done
11936  done
11937IFS=$as_save_IFS
11938
11939  ;;
11940esac
11941fi
11942JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11943if test -n "$JAVAC_CHECK"; then
11944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11945$as_echo "$JAVAC_CHECK" >&6; }
11946else
11947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
11949fi
11950
11951
11952    # Extract the first word of "java", so it can be a program name with args.
11953set dummy java; ac_word=$2
11954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11955$as_echo_n "checking for $ac_word... " >&6; }
11956if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11957  $as_echo_n "(cached) " >&6
11958else
11959  case $JAVA_CHECK in
11960  [\\/]* | ?:[\\/]*)
11961  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11962  ;;
11963  *)
11964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11965for as_dir in $PATH
11966do
11967  IFS=$as_save_IFS
11968  test -z "$as_dir" && as_dir=.
11969    for ac_exec_ext in '' $ac_executable_extensions; do
11970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11971    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11973    break 2
11974  fi
11975done
11976  done
11977IFS=$as_save_IFS
11978
11979  ;;
11980esac
11981fi
11982JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11983if test -n "$JAVA_CHECK"; then
11984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11985$as_echo "$JAVA_CHECK" >&6; }
11986else
11987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
11989fi
11990
11991
11992    BINARY="$JAVAC_CHECK"
11993    if test "x$JAVAC_CHECK" = x; then
11994        BINARY="$JAVA_CHECK"
11995    fi
11996    if test "x$BINARY" != x; then
11997        # So there is a java(c) binary, it might be part of a JDK.
11998        # Lets find the JDK/JRE directory by following symbolic links.
11999        # Linux/GNU systems often have links from /usr/bin/java to
12000        # /etc/alternatives/java to the real JDK binary.
12001
12002    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12003        # Follow a chain of symbolic links. Use readlink
12004        # where it exists, else fall back to horribly
12005        # complicated shell code.
12006        if test "x$READLINK_TESTED" != yes; then
12007            # On MacOSX there is a readlink tool with a different
12008            # purpose than the GNU readlink tool. Check the found readlink.
12009            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12010            if test "x$ISGNU" = x; then
12011                 # A readlink that we do not know how to use.
12012                 # Are there other non-GNU readlinks out there?
12013                 READLINK_TESTED=yes
12014                 READLINK=
12015            fi
12016        fi
12017
12018        if test "x$READLINK" != x; then
12019            BINARY=`$READLINK -f $BINARY`
12020        else
12021            # Save the current directory for restoring afterwards
12022            STARTDIR=$PWD
12023            COUNTER=0
12024            sym_link_dir=`$DIRNAME $BINARY`
12025            sym_link_file=`$BASENAME $BINARY`
12026            # Use the system pwd and not the shell builtin to resolve directory symlinks
12027            cd $sym_link_dir
12028            cd `$THEPWDCMD`
12029            sym_link_dir=`$THEPWDCMD`
12030            # Resolve file symlinks
12031            while test $COUNTER -lt 20; do
12032                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12033                if test "x$ISLINK" == x; then
12034                    # This is not a symbolic link! We are done!
12035                    break
12036                fi
12037                # Again resolve directory symlinks since the target of the just found
12038                # link could be in a different directory
12039                cd `$DIRNAME $ISLINK`
12040                sym_link_dir=`$THEPWDCMD`
12041                sym_link_file=`$BASENAME $ISLINK`
12042                let COUNTER=COUNTER+1
12043            done
12044            cd $STARTDIR
12045            BINARY=$sym_link_dir/$sym_link_file
12046        fi
12047    fi
12048
12049        BOOT_JDK=`dirname "$BINARY"`
12050        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12051        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12052            # Looks like we found ourselves an JDK
12053            BOOT_JDK_FOUND=maybe
12054            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12055$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12056        fi
12057    fi
12058
12059
12060    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12061    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12062      # Do we have a bin/java?
12063      if test ! -x "$BOOT_JDK/bin/java"; then
12064        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12066        BOOT_JDK_FOUND=no
12067      else
12068        # Do we have a bin/javac?
12069        if test ! -x "$BOOT_JDK/bin/javac"; then
12070          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12072          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12073$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12074          BOOT_JDK_FOUND=no
12075        else
12076          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12077          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12078            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12080            BOOT_JDK_FOUND=no
12081          else
12082            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12083            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12084
12085            # Extra M4 quote needed to protect [] in grep expression.
12086            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12087            if test "x$FOUND_VERSION_78" = x; then
12088              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12090              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12091$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12092              BOOT_JDK_FOUND=no
12093            else
12094              # We're done! :-)
12095              BOOT_JDK_FOUND=yes
12096
12097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12098
12099  # Input might be given as Windows format, start by converting to
12100  # unix format.
12101  path="$BOOT_JDK"
12102  new_path=`$CYGPATH -u "$path"`
12103
12104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12107  # "foo.exe" is OK but "foo" is an error.
12108  #
12109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12110  # It is also a way to make sure we got the proper file name for the real test later on.
12111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12112  if test "x$test_shortpath" = x; then
12113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12115    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12116  fi
12117
12118  # Call helper function which possibly converts this using DOS-style short mode.
12119  # If so, the updated path is stored in $new_path.
12120
12121  input_path="$new_path"
12122  # Check if we need to convert this using DOS-style short mode. If the path
12123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12124  # take no chances and rewrite it.
12125  # Note: m4 eats our [], so we need to use [ and ] instead.
12126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12127  if test "x$has_forbidden_chars" != x; then
12128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12132      # Going to short mode and back again did indeed matter. Since short mode is
12133      # case insensitive, let's make it lowercase to improve readability.
12134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12135      # Now convert it back to Unix-stile (cygpath)
12136      input_path=`$CYGPATH -u "$shortmode_path"`
12137      new_path="$input_path"
12138    fi
12139  fi
12140
12141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12142  if test "x$test_cygdrive_prefix" = x; then
12143    # As a simple fix, exclude /usr/bin since it's not a real path.
12144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12146      # a path prefixed by /cygdrive for fixpath to work.
12147      new_path="$CYGWIN_ROOT_PATH$input_path"
12148    fi
12149  fi
12150
12151
12152  if test "x$path" != "x$new_path"; then
12153    BOOT_JDK="$new_path"
12154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12155$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12156  fi
12157
12158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12159
12160  path="$BOOT_JDK"
12161  has_colon=`$ECHO $path | $GREP ^.:`
12162  new_path="$path"
12163  if test "x$has_colon" = x; then
12164    # Not in mixed or Windows style, start by that.
12165    new_path=`cmd //c echo $path`
12166  fi
12167
12168
12169  input_path="$new_path"
12170  # Check if we need to convert this using DOS-style short mode. If the path
12171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12172  # take no chances and rewrite it.
12173  # Note: m4 eats our [], so we need to use [ and ] instead.
12174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12175  if test "x$has_forbidden_chars" != x; then
12176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12178  fi
12179
12180
12181  windows_path="$new_path"
12182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12183    unix_path=`$CYGPATH -u "$windows_path"`
12184    new_path="$unix_path"
12185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12187    new_path="$unix_path"
12188  fi
12189
12190  if test "x$path" != "x$new_path"; then
12191    BOOT_JDK="$new_path"
12192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12194  fi
12195
12196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12198
12199  else
12200    # We're on a posix platform. Hooray! :)
12201    path="$BOOT_JDK"
12202
12203    if test ! -f "$path" && test ! -d "$path"; then
12204      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12205    fi
12206
12207    has_space=`$ECHO "$path" | $GREP " "`
12208    if test "x$has_space" != x; then
12209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12212    fi
12213  fi
12214
12215              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12216$as_echo_n "checking for Boot JDK... " >&6; }
12217              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12218$as_echo "$BOOT_JDK" >&6; }
12219              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12220$as_echo_n "checking Boot JDK version... " >&6; }
12221              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12222              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12223$as_echo "$BOOT_JDK_VERSION" >&6; }
12224            fi # end check jdk version
12225          fi # end check rt.jar
12226        fi # end check javac
12227      fi # end check java
12228    fi # end check boot jdk found
12229  fi
12230
12231
12232# Test: Is there a JDK installed in default, well-known locations?
12233
12234  if test "x$BOOT_JDK_FOUND" = xno; then
12235    # Now execute the test
12236
12237  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12238
12239  if test "x$BOOT_JDK_FOUND" = xno; then
12240    # Now execute the test
12241
12242  if test "x$ProgramW6432" != x; then
12243    VIRTUAL_DIR="$ProgramW6432/Java"
12244
12245  windows_path="$VIRTUAL_DIR"
12246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12247    unix_path=`$CYGPATH -u "$windows_path"`
12248    VIRTUAL_DIR="$unix_path"
12249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12251    VIRTUAL_DIR="$unix_path"
12252  fi
12253
12254
12255  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12256  BOOT_JDK_SUFFIX=""
12257  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12258  if test "x$ALL_JDKS_FOUND" != x; then
12259    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12260
12261  if test "x$BOOT_JDK_FOUND" = xno; then
12262    # Now execute the test
12263
12264        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12265        if test -d "$BOOT_JDK"; then
12266          BOOT_JDK_FOUND=maybe
12267          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12268$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12269        fi
12270
12271
12272    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12273    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12274      # Do we have a bin/java?
12275      if test ! -x "$BOOT_JDK/bin/java"; then
12276        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12278        BOOT_JDK_FOUND=no
12279      else
12280        # Do we have a bin/javac?
12281        if test ! -x "$BOOT_JDK/bin/javac"; then
12282          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12284          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12285$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12286          BOOT_JDK_FOUND=no
12287        else
12288          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12289          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12290            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12292            BOOT_JDK_FOUND=no
12293          else
12294            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12296
12297            # Extra M4 quote needed to protect [] in grep expression.
12298            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12299            if test "x$FOUND_VERSION_78" = x; then
12300              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12302              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12303$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12304              BOOT_JDK_FOUND=no
12305            else
12306              # We're done! :-)
12307              BOOT_JDK_FOUND=yes
12308
12309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12310
12311  # Input might be given as Windows format, start by converting to
12312  # unix format.
12313  path="$BOOT_JDK"
12314  new_path=`$CYGPATH -u "$path"`
12315
12316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12319  # "foo.exe" is OK but "foo" is an error.
12320  #
12321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12322  # It is also a way to make sure we got the proper file name for the real test later on.
12323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12324  if test "x$test_shortpath" = x; then
12325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12327    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12328  fi
12329
12330  # Call helper function which possibly converts this using DOS-style short mode.
12331  # If so, the updated path is stored in $new_path.
12332
12333  input_path="$new_path"
12334  # Check if we need to convert this using DOS-style short mode. If the path
12335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12336  # take no chances and rewrite it.
12337  # Note: m4 eats our [], so we need to use [ and ] instead.
12338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12339  if test "x$has_forbidden_chars" != x; then
12340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12344      # Going to short mode and back again did indeed matter. Since short mode is
12345      # case insensitive, let's make it lowercase to improve readability.
12346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12347      # Now convert it back to Unix-stile (cygpath)
12348      input_path=`$CYGPATH -u "$shortmode_path"`
12349      new_path="$input_path"
12350    fi
12351  fi
12352
12353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12354  if test "x$test_cygdrive_prefix" = x; then
12355    # As a simple fix, exclude /usr/bin since it's not a real path.
12356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12358      # a path prefixed by /cygdrive for fixpath to work.
12359      new_path="$CYGWIN_ROOT_PATH$input_path"
12360    fi
12361  fi
12362
12363
12364  if test "x$path" != "x$new_path"; then
12365    BOOT_JDK="$new_path"
12366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12367$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12368  fi
12369
12370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12371
12372  path="$BOOT_JDK"
12373  has_colon=`$ECHO $path | $GREP ^.:`
12374  new_path="$path"
12375  if test "x$has_colon" = x; then
12376    # Not in mixed or Windows style, start by that.
12377    new_path=`cmd //c echo $path`
12378  fi
12379
12380
12381  input_path="$new_path"
12382  # Check if we need to convert this using DOS-style short mode. If the path
12383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12384  # take no chances and rewrite it.
12385  # Note: m4 eats our [], so we need to use [ and ] instead.
12386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12387  if test "x$has_forbidden_chars" != x; then
12388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12390  fi
12391
12392
12393  windows_path="$new_path"
12394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12395    unix_path=`$CYGPATH -u "$windows_path"`
12396    new_path="$unix_path"
12397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12399    new_path="$unix_path"
12400  fi
12401
12402  if test "x$path" != "x$new_path"; then
12403    BOOT_JDK="$new_path"
12404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12406  fi
12407
12408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12410
12411  else
12412    # We're on a posix platform. Hooray! :)
12413    path="$BOOT_JDK"
12414
12415    if test ! -f "$path" && test ! -d "$path"; then
12416      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12417    fi
12418
12419    has_space=`$ECHO "$path" | $GREP " "`
12420    if test "x$has_space" != x; then
12421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12423      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12424    fi
12425  fi
12426
12427              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12428$as_echo_n "checking for Boot JDK... " >&6; }
12429              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12430$as_echo "$BOOT_JDK" >&6; }
12431              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12432$as_echo_n "checking Boot JDK version... " >&6; }
12433              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12434              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12435$as_echo "$BOOT_JDK_VERSION" >&6; }
12436            fi # end check jdk version
12437          fi # end check rt.jar
12438        fi # end check javac
12439      fi # end check java
12440    fi # end check boot jdk found
12441  fi
12442
12443    done
12444  fi
12445
12446  fi
12447
12448
12449    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12450    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12451      # Do we have a bin/java?
12452      if test ! -x "$BOOT_JDK/bin/java"; then
12453        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12455        BOOT_JDK_FOUND=no
12456      else
12457        # Do we have a bin/javac?
12458        if test ! -x "$BOOT_JDK/bin/javac"; then
12459          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12461          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12462$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12463          BOOT_JDK_FOUND=no
12464        else
12465          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12466          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12467            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12469            BOOT_JDK_FOUND=no
12470          else
12471            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12472            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12473
12474            # Extra M4 quote needed to protect [] in grep expression.
12475            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12476            if test "x$FOUND_VERSION_78" = x; then
12477              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12479              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12480$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12481              BOOT_JDK_FOUND=no
12482            else
12483              # We're done! :-)
12484              BOOT_JDK_FOUND=yes
12485
12486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12487
12488  # Input might be given as Windows format, start by converting to
12489  # unix format.
12490  path="$BOOT_JDK"
12491  new_path=`$CYGPATH -u "$path"`
12492
12493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12496  # "foo.exe" is OK but "foo" is an error.
12497  #
12498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12499  # It is also a way to make sure we got the proper file name for the real test later on.
12500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12501  if test "x$test_shortpath" = x; then
12502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12504    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12505  fi
12506
12507  # Call helper function which possibly converts this using DOS-style short mode.
12508  # If so, the updated path is stored in $new_path.
12509
12510  input_path="$new_path"
12511  # Check if we need to convert this using DOS-style short mode. If the path
12512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12513  # take no chances and rewrite it.
12514  # Note: m4 eats our [], so we need to use [ and ] instead.
12515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12516  if test "x$has_forbidden_chars" != x; then
12517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12521      # Going to short mode and back again did indeed matter. Since short mode is
12522      # case insensitive, let's make it lowercase to improve readability.
12523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12524      # Now convert it back to Unix-stile (cygpath)
12525      input_path=`$CYGPATH -u "$shortmode_path"`
12526      new_path="$input_path"
12527    fi
12528  fi
12529
12530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12531  if test "x$test_cygdrive_prefix" = x; then
12532    # As a simple fix, exclude /usr/bin since it's not a real path.
12533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12535      # a path prefixed by /cygdrive for fixpath to work.
12536      new_path="$CYGWIN_ROOT_PATH$input_path"
12537    fi
12538  fi
12539
12540
12541  if test "x$path" != "x$new_path"; then
12542    BOOT_JDK="$new_path"
12543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12544$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12545  fi
12546
12547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12548
12549  path="$BOOT_JDK"
12550  has_colon=`$ECHO $path | $GREP ^.:`
12551  new_path="$path"
12552  if test "x$has_colon" = x; then
12553    # Not in mixed or Windows style, start by that.
12554    new_path=`cmd //c echo $path`
12555  fi
12556
12557
12558  input_path="$new_path"
12559  # Check if we need to convert this using DOS-style short mode. If the path
12560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12561  # take no chances and rewrite it.
12562  # Note: m4 eats our [], so we need to use [ and ] instead.
12563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12564  if test "x$has_forbidden_chars" != x; then
12565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12567  fi
12568
12569
12570  windows_path="$new_path"
12571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12572    unix_path=`$CYGPATH -u "$windows_path"`
12573    new_path="$unix_path"
12574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12576    new_path="$unix_path"
12577  fi
12578
12579  if test "x$path" != "x$new_path"; then
12580    BOOT_JDK="$new_path"
12581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12583  fi
12584
12585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12587
12588  else
12589    # We're on a posix platform. Hooray! :)
12590    path="$BOOT_JDK"
12591
12592    if test ! -f "$path" && test ! -d "$path"; then
12593      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12594    fi
12595
12596    has_space=`$ECHO "$path" | $GREP " "`
12597    if test "x$has_space" != x; then
12598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12599$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12600      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12601    fi
12602  fi
12603
12604              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12605$as_echo_n "checking for Boot JDK... " >&6; }
12606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12607$as_echo "$BOOT_JDK" >&6; }
12608              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12609$as_echo_n "checking Boot JDK version... " >&6; }
12610              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12611              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12612$as_echo "$BOOT_JDK_VERSION" >&6; }
12613            fi # end check jdk version
12614          fi # end check rt.jar
12615        fi # end check javac
12616      fi # end check java
12617    fi # end check boot jdk found
12618  fi
12619
12620
12621  if test "x$BOOT_JDK_FOUND" = xno; then
12622    # Now execute the test
12623
12624  if test "x$PROGRAMW6432" != x; then
12625    VIRTUAL_DIR="$PROGRAMW6432/Java"
12626
12627  windows_path="$VIRTUAL_DIR"
12628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12629    unix_path=`$CYGPATH -u "$windows_path"`
12630    VIRTUAL_DIR="$unix_path"
12631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12633    VIRTUAL_DIR="$unix_path"
12634  fi
12635
12636
12637  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12638  BOOT_JDK_SUFFIX=""
12639  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12640  if test "x$ALL_JDKS_FOUND" != x; then
12641    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12642
12643  if test "x$BOOT_JDK_FOUND" = xno; then
12644    # Now execute the test
12645
12646        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12647        if test -d "$BOOT_JDK"; then
12648          BOOT_JDK_FOUND=maybe
12649          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12650$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12651        fi
12652
12653
12654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12656      # Do we have a bin/java?
12657      if test ! -x "$BOOT_JDK/bin/java"; then
12658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12660        BOOT_JDK_FOUND=no
12661      else
12662        # Do we have a bin/javac?
12663        if test ! -x "$BOOT_JDK/bin/javac"; then
12664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12668          BOOT_JDK_FOUND=no
12669        else
12670          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12671          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12672            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12674            BOOT_JDK_FOUND=no
12675          else
12676            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12677            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12678
12679            # Extra M4 quote needed to protect [] in grep expression.
12680            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12681            if test "x$FOUND_VERSION_78" = x; then
12682              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12684              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12685$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12686              BOOT_JDK_FOUND=no
12687            else
12688              # We're done! :-)
12689              BOOT_JDK_FOUND=yes
12690
12691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12692
12693  # Input might be given as Windows format, start by converting to
12694  # unix format.
12695  path="$BOOT_JDK"
12696  new_path=`$CYGPATH -u "$path"`
12697
12698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12701  # "foo.exe" is OK but "foo" is an error.
12702  #
12703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12704  # It is also a way to make sure we got the proper file name for the real test later on.
12705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12706  if test "x$test_shortpath" = x; then
12707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12709    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12710  fi
12711
12712  # Call helper function which possibly converts this using DOS-style short mode.
12713  # If so, the updated path is stored in $new_path.
12714
12715  input_path="$new_path"
12716  # Check if we need to convert this using DOS-style short mode. If the path
12717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12718  # take no chances and rewrite it.
12719  # Note: m4 eats our [], so we need to use [ and ] instead.
12720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12721  if test "x$has_forbidden_chars" != x; then
12722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12726      # Going to short mode and back again did indeed matter. Since short mode is
12727      # case insensitive, let's make it lowercase to improve readability.
12728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12729      # Now convert it back to Unix-stile (cygpath)
12730      input_path=`$CYGPATH -u "$shortmode_path"`
12731      new_path="$input_path"
12732    fi
12733  fi
12734
12735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12736  if test "x$test_cygdrive_prefix" = x; then
12737    # As a simple fix, exclude /usr/bin since it's not a real path.
12738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12740      # a path prefixed by /cygdrive for fixpath to work.
12741      new_path="$CYGWIN_ROOT_PATH$input_path"
12742    fi
12743  fi
12744
12745
12746  if test "x$path" != "x$new_path"; then
12747    BOOT_JDK="$new_path"
12748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12750  fi
12751
12752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12753
12754  path="$BOOT_JDK"
12755  has_colon=`$ECHO $path | $GREP ^.:`
12756  new_path="$path"
12757  if test "x$has_colon" = x; then
12758    # Not in mixed or Windows style, start by that.
12759    new_path=`cmd //c echo $path`
12760  fi
12761
12762
12763  input_path="$new_path"
12764  # Check if we need to convert this using DOS-style short mode. If the path
12765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12766  # take no chances and rewrite it.
12767  # Note: m4 eats our [], so we need to use [ and ] instead.
12768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12769  if test "x$has_forbidden_chars" != x; then
12770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12772  fi
12773
12774
12775  windows_path="$new_path"
12776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12777    unix_path=`$CYGPATH -u "$windows_path"`
12778    new_path="$unix_path"
12779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12781    new_path="$unix_path"
12782  fi
12783
12784  if test "x$path" != "x$new_path"; then
12785    BOOT_JDK="$new_path"
12786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12788  fi
12789
12790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12792
12793  else
12794    # We're on a posix platform. Hooray! :)
12795    path="$BOOT_JDK"
12796
12797    if test ! -f "$path" && test ! -d "$path"; then
12798      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12799    fi
12800
12801    has_space=`$ECHO "$path" | $GREP " "`
12802    if test "x$has_space" != x; then
12803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12804$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12805      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12806    fi
12807  fi
12808
12809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12810$as_echo_n "checking for Boot JDK... " >&6; }
12811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12812$as_echo "$BOOT_JDK" >&6; }
12813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12814$as_echo_n "checking Boot JDK version... " >&6; }
12815              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12817$as_echo "$BOOT_JDK_VERSION" >&6; }
12818            fi # end check jdk version
12819          fi # end check rt.jar
12820        fi # end check javac
12821      fi # end check java
12822    fi # end check boot jdk found
12823  fi
12824
12825    done
12826  fi
12827
12828  fi
12829
12830
12831    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12832    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12833      # Do we have a bin/java?
12834      if test ! -x "$BOOT_JDK/bin/java"; then
12835        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12837        BOOT_JDK_FOUND=no
12838      else
12839        # Do we have a bin/javac?
12840        if test ! -x "$BOOT_JDK/bin/javac"; then
12841          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12843          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12844$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12845          BOOT_JDK_FOUND=no
12846        else
12847          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12848          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12851            BOOT_JDK_FOUND=no
12852          else
12853            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12854            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12855
12856            # Extra M4 quote needed to protect [] in grep expression.
12857            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12858            if test "x$FOUND_VERSION_78" = x; then
12859              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12861              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12862$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12863              BOOT_JDK_FOUND=no
12864            else
12865              # We're done! :-)
12866              BOOT_JDK_FOUND=yes
12867
12868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12869
12870  # Input might be given as Windows format, start by converting to
12871  # unix format.
12872  path="$BOOT_JDK"
12873  new_path=`$CYGPATH -u "$path"`
12874
12875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12878  # "foo.exe" is OK but "foo" is an error.
12879  #
12880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12881  # It is also a way to make sure we got the proper file name for the real test later on.
12882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12883  if test "x$test_shortpath" = x; then
12884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12887  fi
12888
12889  # Call helper function which possibly converts this using DOS-style short mode.
12890  # If so, the updated path is stored in $new_path.
12891
12892  input_path="$new_path"
12893  # Check if we need to convert this using DOS-style short mode. If the path
12894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12895  # take no chances and rewrite it.
12896  # Note: m4 eats our [], so we need to use [ and ] instead.
12897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12898  if test "x$has_forbidden_chars" != x; then
12899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12903      # Going to short mode and back again did indeed matter. Since short mode is
12904      # case insensitive, let's make it lowercase to improve readability.
12905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12906      # Now convert it back to Unix-stile (cygpath)
12907      input_path=`$CYGPATH -u "$shortmode_path"`
12908      new_path="$input_path"
12909    fi
12910  fi
12911
12912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12913  if test "x$test_cygdrive_prefix" = x; then
12914    # As a simple fix, exclude /usr/bin since it's not a real path.
12915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12917      # a path prefixed by /cygdrive for fixpath to work.
12918      new_path="$CYGWIN_ROOT_PATH$input_path"
12919    fi
12920  fi
12921
12922
12923  if test "x$path" != "x$new_path"; then
12924    BOOT_JDK="$new_path"
12925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12927  fi
12928
12929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12930
12931  path="$BOOT_JDK"
12932  has_colon=`$ECHO $path | $GREP ^.:`
12933  new_path="$path"
12934  if test "x$has_colon" = x; then
12935    # Not in mixed or Windows style, start by that.
12936    new_path=`cmd //c echo $path`
12937  fi
12938
12939
12940  input_path="$new_path"
12941  # Check if we need to convert this using DOS-style short mode. If the path
12942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12943  # take no chances and rewrite it.
12944  # Note: m4 eats our [], so we need to use [ and ] instead.
12945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12946  if test "x$has_forbidden_chars" != x; then
12947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12949  fi
12950
12951
12952  windows_path="$new_path"
12953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12954    unix_path=`$CYGPATH -u "$windows_path"`
12955    new_path="$unix_path"
12956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12958    new_path="$unix_path"
12959  fi
12960
12961  if test "x$path" != "x$new_path"; then
12962    BOOT_JDK="$new_path"
12963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12965  fi
12966
12967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12969
12970  else
12971    # We're on a posix platform. Hooray! :)
12972    path="$BOOT_JDK"
12973
12974    if test ! -f "$path" && test ! -d "$path"; then
12975      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12976    fi
12977
12978    has_space=`$ECHO "$path" | $GREP " "`
12979    if test "x$has_space" != x; then
12980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12982      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12983    fi
12984  fi
12985
12986              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12987$as_echo_n "checking for Boot JDK... " >&6; }
12988              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12989$as_echo "$BOOT_JDK" >&6; }
12990              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12991$as_echo_n "checking Boot JDK version... " >&6; }
12992              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12993              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12994$as_echo "$BOOT_JDK_VERSION" >&6; }
12995            fi # end check jdk version
12996          fi # end check rt.jar
12997        fi # end check javac
12998      fi # end check java
12999    fi # end check boot jdk found
13000  fi
13001
13002
13003  if test "x$BOOT_JDK_FOUND" = xno; then
13004    # Now execute the test
13005
13006  if test "x$PROGRAMFILES" != x; then
13007    VIRTUAL_DIR="$PROGRAMFILES/Java"
13008
13009  windows_path="$VIRTUAL_DIR"
13010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13011    unix_path=`$CYGPATH -u "$windows_path"`
13012    VIRTUAL_DIR="$unix_path"
13013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13015    VIRTUAL_DIR="$unix_path"
13016  fi
13017
13018
13019  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13020  BOOT_JDK_SUFFIX=""
13021  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13022  if test "x$ALL_JDKS_FOUND" != x; then
13023    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13024
13025  if test "x$BOOT_JDK_FOUND" = xno; then
13026    # Now execute the test
13027
13028        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13029        if test -d "$BOOT_JDK"; then
13030          BOOT_JDK_FOUND=maybe
13031          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13032$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13033        fi
13034
13035
13036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13038      # Do we have a bin/java?
13039      if test ! -x "$BOOT_JDK/bin/java"; then
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13042        BOOT_JDK_FOUND=no
13043      else
13044        # Do we have a bin/javac?
13045        if test ! -x "$BOOT_JDK/bin/javac"; then
13046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13050          BOOT_JDK_FOUND=no
13051        else
13052          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13053          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13056            BOOT_JDK_FOUND=no
13057          else
13058            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13060
13061            # Extra M4 quote needed to protect [] in grep expression.
13062            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13063            if test "x$FOUND_VERSION_78" = x; then
13064              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13066              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13067$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13068              BOOT_JDK_FOUND=no
13069            else
13070              # We're done! :-)
13071              BOOT_JDK_FOUND=yes
13072
13073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13074
13075  # Input might be given as Windows format, start by converting to
13076  # unix format.
13077  path="$BOOT_JDK"
13078  new_path=`$CYGPATH -u "$path"`
13079
13080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13083  # "foo.exe" is OK but "foo" is an error.
13084  #
13085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13086  # It is also a way to make sure we got the proper file name for the real test later on.
13087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13088  if test "x$test_shortpath" = x; then
13089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13092  fi
13093
13094  # Call helper function which possibly converts this using DOS-style short mode.
13095  # If so, the updated path is stored in $new_path.
13096
13097  input_path="$new_path"
13098  # Check if we need to convert this using DOS-style short mode. If the path
13099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13100  # take no chances and rewrite it.
13101  # Note: m4 eats our [], so we need to use [ and ] instead.
13102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13103  if test "x$has_forbidden_chars" != x; then
13104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13108      # Going to short mode and back again did indeed matter. Since short mode is
13109      # case insensitive, let's make it lowercase to improve readability.
13110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13111      # Now convert it back to Unix-stile (cygpath)
13112      input_path=`$CYGPATH -u "$shortmode_path"`
13113      new_path="$input_path"
13114    fi
13115  fi
13116
13117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13118  if test "x$test_cygdrive_prefix" = x; then
13119    # As a simple fix, exclude /usr/bin since it's not a real path.
13120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13122      # a path prefixed by /cygdrive for fixpath to work.
13123      new_path="$CYGWIN_ROOT_PATH$input_path"
13124    fi
13125  fi
13126
13127
13128  if test "x$path" != "x$new_path"; then
13129    BOOT_JDK="$new_path"
13130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13132  fi
13133
13134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13135
13136  path="$BOOT_JDK"
13137  has_colon=`$ECHO $path | $GREP ^.:`
13138  new_path="$path"
13139  if test "x$has_colon" = x; then
13140    # Not in mixed or Windows style, start by that.
13141    new_path=`cmd //c echo $path`
13142  fi
13143
13144
13145  input_path="$new_path"
13146  # Check if we need to convert this using DOS-style short mode. If the path
13147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13148  # take no chances and rewrite it.
13149  # Note: m4 eats our [], so we need to use [ and ] instead.
13150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13151  if test "x$has_forbidden_chars" != x; then
13152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13154  fi
13155
13156
13157  windows_path="$new_path"
13158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13159    unix_path=`$CYGPATH -u "$windows_path"`
13160    new_path="$unix_path"
13161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13163    new_path="$unix_path"
13164  fi
13165
13166  if test "x$path" != "x$new_path"; then
13167    BOOT_JDK="$new_path"
13168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13170  fi
13171
13172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13174
13175  else
13176    # We're on a posix platform. Hooray! :)
13177    path="$BOOT_JDK"
13178
13179    if test ! -f "$path" && test ! -d "$path"; then
13180      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13181    fi
13182
13183    has_space=`$ECHO "$path" | $GREP " "`
13184    if test "x$has_space" != x; then
13185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13186$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13187      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13188    fi
13189  fi
13190
13191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13192$as_echo_n "checking for Boot JDK... " >&6; }
13193              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13194$as_echo "$BOOT_JDK" >&6; }
13195              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13196$as_echo_n "checking Boot JDK version... " >&6; }
13197              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13199$as_echo "$BOOT_JDK_VERSION" >&6; }
13200            fi # end check jdk version
13201          fi # end check rt.jar
13202        fi # end check javac
13203      fi # end check java
13204    fi # end check boot jdk found
13205  fi
13206
13207    done
13208  fi
13209
13210  fi
13211
13212
13213    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13214    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13215      # Do we have a bin/java?
13216      if test ! -x "$BOOT_JDK/bin/java"; then
13217        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13219        BOOT_JDK_FOUND=no
13220      else
13221        # Do we have a bin/javac?
13222        if test ! -x "$BOOT_JDK/bin/javac"; then
13223          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13225          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13226$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13227          BOOT_JDK_FOUND=no
13228        else
13229          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13230          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13231            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13233            BOOT_JDK_FOUND=no
13234          else
13235            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13237
13238            # Extra M4 quote needed to protect [] in grep expression.
13239            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13240            if test "x$FOUND_VERSION_78" = x; then
13241              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13243              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13244$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13245              BOOT_JDK_FOUND=no
13246            else
13247              # We're done! :-)
13248              BOOT_JDK_FOUND=yes
13249
13250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13251
13252  # Input might be given as Windows format, start by converting to
13253  # unix format.
13254  path="$BOOT_JDK"
13255  new_path=`$CYGPATH -u "$path"`
13256
13257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13260  # "foo.exe" is OK but "foo" is an error.
13261  #
13262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13263  # It is also a way to make sure we got the proper file name for the real test later on.
13264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13265  if test "x$test_shortpath" = x; then
13266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13268    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13269  fi
13270
13271  # Call helper function which possibly converts this using DOS-style short mode.
13272  # If so, the updated path is stored in $new_path.
13273
13274  input_path="$new_path"
13275  # Check if we need to convert this using DOS-style short mode. If the path
13276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13277  # take no chances and rewrite it.
13278  # Note: m4 eats our [], so we need to use [ and ] instead.
13279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13280  if test "x$has_forbidden_chars" != x; then
13281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13285      # Going to short mode and back again did indeed matter. Since short mode is
13286      # case insensitive, let's make it lowercase to improve readability.
13287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13288      # Now convert it back to Unix-stile (cygpath)
13289      input_path=`$CYGPATH -u "$shortmode_path"`
13290      new_path="$input_path"
13291    fi
13292  fi
13293
13294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13295  if test "x$test_cygdrive_prefix" = x; then
13296    # As a simple fix, exclude /usr/bin since it's not a real path.
13297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13299      # a path prefixed by /cygdrive for fixpath to work.
13300      new_path="$CYGWIN_ROOT_PATH$input_path"
13301    fi
13302  fi
13303
13304
13305  if test "x$path" != "x$new_path"; then
13306    BOOT_JDK="$new_path"
13307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13309  fi
13310
13311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13312
13313  path="$BOOT_JDK"
13314  has_colon=`$ECHO $path | $GREP ^.:`
13315  new_path="$path"
13316  if test "x$has_colon" = x; then
13317    # Not in mixed or Windows style, start by that.
13318    new_path=`cmd //c echo $path`
13319  fi
13320
13321
13322  input_path="$new_path"
13323  # Check if we need to convert this using DOS-style short mode. If the path
13324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13325  # take no chances and rewrite it.
13326  # Note: m4 eats our [], so we need to use [ and ] instead.
13327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13328  if test "x$has_forbidden_chars" != x; then
13329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13331  fi
13332
13333
13334  windows_path="$new_path"
13335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13336    unix_path=`$CYGPATH -u "$windows_path"`
13337    new_path="$unix_path"
13338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13340    new_path="$unix_path"
13341  fi
13342
13343  if test "x$path" != "x$new_path"; then
13344    BOOT_JDK="$new_path"
13345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13347  fi
13348
13349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13351
13352  else
13353    # We're on a posix platform. Hooray! :)
13354    path="$BOOT_JDK"
13355
13356    if test ! -f "$path" && test ! -d "$path"; then
13357      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13358    fi
13359
13360    has_space=`$ECHO "$path" | $GREP " "`
13361    if test "x$has_space" != x; then
13362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13364      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13365    fi
13366  fi
13367
13368              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13369$as_echo_n "checking for Boot JDK... " >&6; }
13370              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13371$as_echo "$BOOT_JDK" >&6; }
13372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13373$as_echo_n "checking Boot JDK version... " >&6; }
13374              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13376$as_echo "$BOOT_JDK_VERSION" >&6; }
13377            fi # end check jdk version
13378          fi # end check rt.jar
13379        fi # end check javac
13380      fi # end check java
13381    fi # end check boot jdk found
13382  fi
13383
13384
13385  if test "x$BOOT_JDK_FOUND" = xno; then
13386    # Now execute the test
13387
13388  if test "x$ProgramFiles" != x; then
13389    VIRTUAL_DIR="$ProgramFiles/Java"
13390
13391  windows_path="$VIRTUAL_DIR"
13392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13393    unix_path=`$CYGPATH -u "$windows_path"`
13394    VIRTUAL_DIR="$unix_path"
13395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13397    VIRTUAL_DIR="$unix_path"
13398  fi
13399
13400
13401  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13402  BOOT_JDK_SUFFIX=""
13403  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13404  if test "x$ALL_JDKS_FOUND" != x; then
13405    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13406
13407  if test "x$BOOT_JDK_FOUND" = xno; then
13408    # Now execute the test
13409
13410        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13411        if test -d "$BOOT_JDK"; then
13412          BOOT_JDK_FOUND=maybe
13413          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13414$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13415        fi
13416
13417
13418    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13419    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13420      # Do we have a bin/java?
13421      if test ! -x "$BOOT_JDK/bin/java"; then
13422        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13424        BOOT_JDK_FOUND=no
13425      else
13426        # Do we have a bin/javac?
13427        if test ! -x "$BOOT_JDK/bin/javac"; then
13428          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13430          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13431$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13432          BOOT_JDK_FOUND=no
13433        else
13434          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13435          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13436            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13438            BOOT_JDK_FOUND=no
13439          else
13440            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13441            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13442
13443            # Extra M4 quote needed to protect [] in grep expression.
13444            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13445            if test "x$FOUND_VERSION_78" = x; then
13446              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13448              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13449$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13450              BOOT_JDK_FOUND=no
13451            else
13452              # We're done! :-)
13453              BOOT_JDK_FOUND=yes
13454
13455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13456
13457  # Input might be given as Windows format, start by converting to
13458  # unix format.
13459  path="$BOOT_JDK"
13460  new_path=`$CYGPATH -u "$path"`
13461
13462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13465  # "foo.exe" is OK but "foo" is an error.
13466  #
13467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13468  # It is also a way to make sure we got the proper file name for the real test later on.
13469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13470  if test "x$test_shortpath" = x; then
13471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13473    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13474  fi
13475
13476  # Call helper function which possibly converts this using DOS-style short mode.
13477  # If so, the updated path is stored in $new_path.
13478
13479  input_path="$new_path"
13480  # Check if we need to convert this using DOS-style short mode. If the path
13481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13482  # take no chances and rewrite it.
13483  # Note: m4 eats our [], so we need to use [ and ] instead.
13484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13485  if test "x$has_forbidden_chars" != x; then
13486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13490      # Going to short mode and back again did indeed matter. Since short mode is
13491      # case insensitive, let's make it lowercase to improve readability.
13492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13493      # Now convert it back to Unix-stile (cygpath)
13494      input_path=`$CYGPATH -u "$shortmode_path"`
13495      new_path="$input_path"
13496    fi
13497  fi
13498
13499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13500  if test "x$test_cygdrive_prefix" = x; then
13501    # As a simple fix, exclude /usr/bin since it's not a real path.
13502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13504      # a path prefixed by /cygdrive for fixpath to work.
13505      new_path="$CYGWIN_ROOT_PATH$input_path"
13506    fi
13507  fi
13508
13509
13510  if test "x$path" != "x$new_path"; then
13511    BOOT_JDK="$new_path"
13512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13514  fi
13515
13516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13517
13518  path="$BOOT_JDK"
13519  has_colon=`$ECHO $path | $GREP ^.:`
13520  new_path="$path"
13521  if test "x$has_colon" = x; then
13522    # Not in mixed or Windows style, start by that.
13523    new_path=`cmd //c echo $path`
13524  fi
13525
13526
13527  input_path="$new_path"
13528  # Check if we need to convert this using DOS-style short mode. If the path
13529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13530  # take no chances and rewrite it.
13531  # Note: m4 eats our [], so we need to use [ and ] instead.
13532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13533  if test "x$has_forbidden_chars" != x; then
13534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13536  fi
13537
13538
13539  windows_path="$new_path"
13540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13541    unix_path=`$CYGPATH -u "$windows_path"`
13542    new_path="$unix_path"
13543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13545    new_path="$unix_path"
13546  fi
13547
13548  if test "x$path" != "x$new_path"; then
13549    BOOT_JDK="$new_path"
13550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13551$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13552  fi
13553
13554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13556
13557  else
13558    # We're on a posix platform. Hooray! :)
13559    path="$BOOT_JDK"
13560
13561    if test ! -f "$path" && test ! -d "$path"; then
13562      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13563    fi
13564
13565    has_space=`$ECHO "$path" | $GREP " "`
13566    if test "x$has_space" != x; then
13567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13569      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13570    fi
13571  fi
13572
13573              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13574$as_echo_n "checking for Boot JDK... " >&6; }
13575              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13576$as_echo "$BOOT_JDK" >&6; }
13577              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13578$as_echo_n "checking Boot JDK version... " >&6; }
13579              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13580              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13581$as_echo "$BOOT_JDK_VERSION" >&6; }
13582            fi # end check jdk version
13583          fi # end check rt.jar
13584        fi # end check javac
13585      fi # end check java
13586    fi # end check boot jdk found
13587  fi
13588
13589    done
13590  fi
13591
13592  fi
13593
13594
13595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13597      # Do we have a bin/java?
13598      if test ! -x "$BOOT_JDK/bin/java"; then
13599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13601        BOOT_JDK_FOUND=no
13602      else
13603        # Do we have a bin/javac?
13604        if test ! -x "$BOOT_JDK/bin/javac"; then
13605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13609          BOOT_JDK_FOUND=no
13610        else
13611          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13612          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13615            BOOT_JDK_FOUND=no
13616          else
13617            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13618            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13619
13620            # Extra M4 quote needed to protect [] in grep expression.
13621            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13622            if test "x$FOUND_VERSION_78" = x; then
13623              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13625              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13626$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13627              BOOT_JDK_FOUND=no
13628            else
13629              # We're done! :-)
13630              BOOT_JDK_FOUND=yes
13631
13632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13633
13634  # Input might be given as Windows format, start by converting to
13635  # unix format.
13636  path="$BOOT_JDK"
13637  new_path=`$CYGPATH -u "$path"`
13638
13639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13642  # "foo.exe" is OK but "foo" is an error.
13643  #
13644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13645  # It is also a way to make sure we got the proper file name for the real test later on.
13646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13647  if test "x$test_shortpath" = x; then
13648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13650    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13651  fi
13652
13653  # Call helper function which possibly converts this using DOS-style short mode.
13654  # If so, the updated path is stored in $new_path.
13655
13656  input_path="$new_path"
13657  # Check if we need to convert this using DOS-style short mode. If the path
13658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13659  # take no chances and rewrite it.
13660  # Note: m4 eats our [], so we need to use [ and ] instead.
13661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13662  if test "x$has_forbidden_chars" != x; then
13663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13667      # Going to short mode and back again did indeed matter. Since short mode is
13668      # case insensitive, let's make it lowercase to improve readability.
13669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13670      # Now convert it back to Unix-stile (cygpath)
13671      input_path=`$CYGPATH -u "$shortmode_path"`
13672      new_path="$input_path"
13673    fi
13674  fi
13675
13676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13677  if test "x$test_cygdrive_prefix" = x; then
13678    # As a simple fix, exclude /usr/bin since it's not a real path.
13679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13681      # a path prefixed by /cygdrive for fixpath to work.
13682      new_path="$CYGWIN_ROOT_PATH$input_path"
13683    fi
13684  fi
13685
13686
13687  if test "x$path" != "x$new_path"; then
13688    BOOT_JDK="$new_path"
13689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13691  fi
13692
13693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13694
13695  path="$BOOT_JDK"
13696  has_colon=`$ECHO $path | $GREP ^.:`
13697  new_path="$path"
13698  if test "x$has_colon" = x; then
13699    # Not in mixed or Windows style, start by that.
13700    new_path=`cmd //c echo $path`
13701  fi
13702
13703
13704  input_path="$new_path"
13705  # Check if we need to convert this using DOS-style short mode. If the path
13706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13707  # take no chances and rewrite it.
13708  # Note: m4 eats our [], so we need to use [ and ] instead.
13709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13710  if test "x$has_forbidden_chars" != x; then
13711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13713  fi
13714
13715
13716  windows_path="$new_path"
13717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13718    unix_path=`$CYGPATH -u "$windows_path"`
13719    new_path="$unix_path"
13720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13722    new_path="$unix_path"
13723  fi
13724
13725  if test "x$path" != "x$new_path"; then
13726    BOOT_JDK="$new_path"
13727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13729  fi
13730
13731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13733
13734  else
13735    # We're on a posix platform. Hooray! :)
13736    path="$BOOT_JDK"
13737
13738    if test ! -f "$path" && test ! -d "$path"; then
13739      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13740    fi
13741
13742    has_space=`$ECHO "$path" | $GREP " "`
13743    if test "x$has_space" != x; then
13744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13746      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13747    fi
13748  fi
13749
13750              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13751$as_echo_n "checking for Boot JDK... " >&6; }
13752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13753$as_echo "$BOOT_JDK" >&6; }
13754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13755$as_echo_n "checking Boot JDK version... " >&6; }
13756              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13758$as_echo "$BOOT_JDK_VERSION" >&6; }
13759            fi # end check jdk version
13760          fi # end check rt.jar
13761        fi # end check javac
13762      fi # end check java
13763    fi # end check boot jdk found
13764  fi
13765
13766
13767  if test "x$BOOT_JDK_FOUND" = xno; then
13768    # Now execute the test
13769
13770  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13771  BOOT_JDK_SUFFIX=""
13772  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13773  if test "x$ALL_JDKS_FOUND" != x; then
13774    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13775
13776  if test "x$BOOT_JDK_FOUND" = xno; then
13777    # Now execute the test
13778
13779        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13780        if test -d "$BOOT_JDK"; then
13781          BOOT_JDK_FOUND=maybe
13782          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13783$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13784        fi
13785
13786
13787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13789      # Do we have a bin/java?
13790      if test ! -x "$BOOT_JDK/bin/java"; then
13791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13793        BOOT_JDK_FOUND=no
13794      else
13795        # Do we have a bin/javac?
13796        if test ! -x "$BOOT_JDK/bin/javac"; then
13797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13801          BOOT_JDK_FOUND=no
13802        else
13803          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13804          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13807            BOOT_JDK_FOUND=no
13808          else
13809            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13810            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13811
13812            # Extra M4 quote needed to protect [] in grep expression.
13813            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13814            if test "x$FOUND_VERSION_78" = x; then
13815              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13817              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13818$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13819              BOOT_JDK_FOUND=no
13820            else
13821              # We're done! :-)
13822              BOOT_JDK_FOUND=yes
13823
13824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13825
13826  # Input might be given as Windows format, start by converting to
13827  # unix format.
13828  path="$BOOT_JDK"
13829  new_path=`$CYGPATH -u "$path"`
13830
13831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13834  # "foo.exe" is OK but "foo" is an error.
13835  #
13836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13837  # It is also a way to make sure we got the proper file name for the real test later on.
13838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13839  if test "x$test_shortpath" = x; then
13840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13843  fi
13844
13845  # Call helper function which possibly converts this using DOS-style short mode.
13846  # If so, the updated path is stored in $new_path.
13847
13848  input_path="$new_path"
13849  # Check if we need to convert this using DOS-style short mode. If the path
13850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13851  # take no chances and rewrite it.
13852  # Note: m4 eats our [], so we need to use [ and ] instead.
13853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13854  if test "x$has_forbidden_chars" != x; then
13855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13859      # Going to short mode and back again did indeed matter. Since short mode is
13860      # case insensitive, let's make it lowercase to improve readability.
13861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13862      # Now convert it back to Unix-stile (cygpath)
13863      input_path=`$CYGPATH -u "$shortmode_path"`
13864      new_path="$input_path"
13865    fi
13866  fi
13867
13868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13869  if test "x$test_cygdrive_prefix" = x; then
13870    # As a simple fix, exclude /usr/bin since it's not a real path.
13871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13873      # a path prefixed by /cygdrive for fixpath to work.
13874      new_path="$CYGWIN_ROOT_PATH$input_path"
13875    fi
13876  fi
13877
13878
13879  if test "x$path" != "x$new_path"; then
13880    BOOT_JDK="$new_path"
13881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13883  fi
13884
13885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13886
13887  path="$BOOT_JDK"
13888  has_colon=`$ECHO $path | $GREP ^.:`
13889  new_path="$path"
13890  if test "x$has_colon" = x; then
13891    # Not in mixed or Windows style, start by that.
13892    new_path=`cmd //c echo $path`
13893  fi
13894
13895
13896  input_path="$new_path"
13897  # Check if we need to convert this using DOS-style short mode. If the path
13898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13899  # take no chances and rewrite it.
13900  # Note: m4 eats our [], so we need to use [ and ] instead.
13901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13902  if test "x$has_forbidden_chars" != x; then
13903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13905  fi
13906
13907
13908  windows_path="$new_path"
13909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910    unix_path=`$CYGPATH -u "$windows_path"`
13911    new_path="$unix_path"
13912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13914    new_path="$unix_path"
13915  fi
13916
13917  if test "x$path" != "x$new_path"; then
13918    BOOT_JDK="$new_path"
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13921  fi
13922
13923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13925
13926  else
13927    # We're on a posix platform. Hooray! :)
13928    path="$BOOT_JDK"
13929
13930    if test ! -f "$path" && test ! -d "$path"; then
13931      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13932    fi
13933
13934    has_space=`$ECHO "$path" | $GREP " "`
13935    if test "x$has_space" != x; then
13936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13938      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13939    fi
13940  fi
13941
13942              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13943$as_echo_n "checking for Boot JDK... " >&6; }
13944              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13945$as_echo "$BOOT_JDK" >&6; }
13946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13947$as_echo_n "checking Boot JDK version... " >&6; }
13948              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13949              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13950$as_echo "$BOOT_JDK_VERSION" >&6; }
13951            fi # end check jdk version
13952          fi # end check rt.jar
13953        fi # end check javac
13954      fi # end check java
13955    fi # end check boot jdk found
13956  fi
13957
13958    done
13959  fi
13960
13961
13962    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13963    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13964      # Do we have a bin/java?
13965      if test ! -x "$BOOT_JDK/bin/java"; then
13966        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13968        BOOT_JDK_FOUND=no
13969      else
13970        # Do we have a bin/javac?
13971        if test ! -x "$BOOT_JDK/bin/javac"; then
13972          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13974          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13975$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13976          BOOT_JDK_FOUND=no
13977        else
13978          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13979          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13980            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13982            BOOT_JDK_FOUND=no
13983          else
13984            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13985            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13986
13987            # Extra M4 quote needed to protect [] in grep expression.
13988            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13989            if test "x$FOUND_VERSION_78" = x; then
13990              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13992              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13993$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13994              BOOT_JDK_FOUND=no
13995            else
13996              # We're done! :-)
13997              BOOT_JDK_FOUND=yes
13998
13999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14000
14001  # Input might be given as Windows format, start by converting to
14002  # unix format.
14003  path="$BOOT_JDK"
14004  new_path=`$CYGPATH -u "$path"`
14005
14006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14009  # "foo.exe" is OK but "foo" is an error.
14010  #
14011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14012  # It is also a way to make sure we got the proper file name for the real test later on.
14013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14014  if test "x$test_shortpath" = x; then
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14018  fi
14019
14020  # Call helper function which possibly converts this using DOS-style short mode.
14021  # If so, the updated path is stored in $new_path.
14022
14023  input_path="$new_path"
14024  # Check if we need to convert this using DOS-style short mode. If the path
14025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14026  # take no chances and rewrite it.
14027  # Note: m4 eats our [], so we need to use [ and ] instead.
14028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14029  if test "x$has_forbidden_chars" != x; then
14030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14034      # Going to short mode and back again did indeed matter. Since short mode is
14035      # case insensitive, let's make it lowercase to improve readability.
14036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14037      # Now convert it back to Unix-stile (cygpath)
14038      input_path=`$CYGPATH -u "$shortmode_path"`
14039      new_path="$input_path"
14040    fi
14041  fi
14042
14043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14044  if test "x$test_cygdrive_prefix" = x; then
14045    # As a simple fix, exclude /usr/bin since it's not a real path.
14046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14048      # a path prefixed by /cygdrive for fixpath to work.
14049      new_path="$CYGWIN_ROOT_PATH$input_path"
14050    fi
14051  fi
14052
14053
14054  if test "x$path" != "x$new_path"; then
14055    BOOT_JDK="$new_path"
14056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14058  fi
14059
14060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14061
14062  path="$BOOT_JDK"
14063  has_colon=`$ECHO $path | $GREP ^.:`
14064  new_path="$path"
14065  if test "x$has_colon" = x; then
14066    # Not in mixed or Windows style, start by that.
14067    new_path=`cmd //c echo $path`
14068  fi
14069
14070
14071  input_path="$new_path"
14072  # Check if we need to convert this using DOS-style short mode. If the path
14073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14074  # take no chances and rewrite it.
14075  # Note: m4 eats our [], so we need to use [ and ] instead.
14076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14077  if test "x$has_forbidden_chars" != x; then
14078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14080  fi
14081
14082
14083  windows_path="$new_path"
14084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14085    unix_path=`$CYGPATH -u "$windows_path"`
14086    new_path="$unix_path"
14087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14089    new_path="$unix_path"
14090  fi
14091
14092  if test "x$path" != "x$new_path"; then
14093    BOOT_JDK="$new_path"
14094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14096  fi
14097
14098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14100
14101  else
14102    # We're on a posix platform. Hooray! :)
14103    path="$BOOT_JDK"
14104
14105    if test ! -f "$path" && test ! -d "$path"; then
14106      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14107    fi
14108
14109    has_space=`$ECHO "$path" | $GREP " "`
14110    if test "x$has_space" != x; then
14111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14113      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14114    fi
14115  fi
14116
14117              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14118$as_echo_n "checking for Boot JDK... " >&6; }
14119              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14120$as_echo "$BOOT_JDK" >&6; }
14121              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14122$as_echo_n "checking Boot JDK version... " >&6; }
14123              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14124              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14125$as_echo "$BOOT_JDK_VERSION" >&6; }
14126            fi # end check jdk version
14127          fi # end check rt.jar
14128        fi # end check javac
14129      fi # end check java
14130    fi # end check boot jdk found
14131  fi
14132
14133  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14134
14135  if test "x$BOOT_JDK_FOUND" = xno; then
14136    # Now execute the test
14137
14138  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14139  BOOT_JDK_SUFFIX="/Contents/Home"
14140  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14141  if test "x$ALL_JDKS_FOUND" != x; then
14142    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14143
14144  if test "x$BOOT_JDK_FOUND" = xno; then
14145    # Now execute the test
14146
14147        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14148        if test -d "$BOOT_JDK"; then
14149          BOOT_JDK_FOUND=maybe
14150          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14151$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14152        fi
14153
14154
14155    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14156    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14157      # Do we have a bin/java?
14158      if test ! -x "$BOOT_JDK/bin/java"; then
14159        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14161        BOOT_JDK_FOUND=no
14162      else
14163        # Do we have a bin/javac?
14164        if test ! -x "$BOOT_JDK/bin/javac"; then
14165          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14167          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14168$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14169          BOOT_JDK_FOUND=no
14170        else
14171          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14172          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14173            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14175            BOOT_JDK_FOUND=no
14176          else
14177            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14178            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14179
14180            # Extra M4 quote needed to protect [] in grep expression.
14181            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14182            if test "x$FOUND_VERSION_78" = x; then
14183              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14185              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14186$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14187              BOOT_JDK_FOUND=no
14188            else
14189              # We're done! :-)
14190              BOOT_JDK_FOUND=yes
14191
14192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14193
14194  # Input might be given as Windows format, start by converting to
14195  # unix format.
14196  path="$BOOT_JDK"
14197  new_path=`$CYGPATH -u "$path"`
14198
14199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14202  # "foo.exe" is OK but "foo" is an error.
14203  #
14204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14205  # It is also a way to make sure we got the proper file name for the real test later on.
14206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14207  if test "x$test_shortpath" = x; then
14208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14210    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14211  fi
14212
14213  # Call helper function which possibly converts this using DOS-style short mode.
14214  # If so, the updated path is stored in $new_path.
14215
14216  input_path="$new_path"
14217  # Check if we need to convert this using DOS-style short mode. If the path
14218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14219  # take no chances and rewrite it.
14220  # Note: m4 eats our [], so we need to use [ and ] instead.
14221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14222  if test "x$has_forbidden_chars" != x; then
14223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14227      # Going to short mode and back again did indeed matter. Since short mode is
14228      # case insensitive, let's make it lowercase to improve readability.
14229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230      # Now convert it back to Unix-stile (cygpath)
14231      input_path=`$CYGPATH -u "$shortmode_path"`
14232      new_path="$input_path"
14233    fi
14234  fi
14235
14236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14237  if test "x$test_cygdrive_prefix" = x; then
14238    # As a simple fix, exclude /usr/bin since it's not a real path.
14239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14241      # a path prefixed by /cygdrive for fixpath to work.
14242      new_path="$CYGWIN_ROOT_PATH$input_path"
14243    fi
14244  fi
14245
14246
14247  if test "x$path" != "x$new_path"; then
14248    BOOT_JDK="$new_path"
14249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14251  fi
14252
14253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14254
14255  path="$BOOT_JDK"
14256  has_colon=`$ECHO $path | $GREP ^.:`
14257  new_path="$path"
14258  if test "x$has_colon" = x; then
14259    # Not in mixed or Windows style, start by that.
14260    new_path=`cmd //c echo $path`
14261  fi
14262
14263
14264  input_path="$new_path"
14265  # Check if we need to convert this using DOS-style short mode. If the path
14266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14267  # take no chances and rewrite it.
14268  # Note: m4 eats our [], so we need to use [ and ] instead.
14269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14270  if test "x$has_forbidden_chars" != x; then
14271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14273  fi
14274
14275
14276  windows_path="$new_path"
14277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14278    unix_path=`$CYGPATH -u "$windows_path"`
14279    new_path="$unix_path"
14280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14282    new_path="$unix_path"
14283  fi
14284
14285  if test "x$path" != "x$new_path"; then
14286    BOOT_JDK="$new_path"
14287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14289  fi
14290
14291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14293
14294  else
14295    # We're on a posix platform. Hooray! :)
14296    path="$BOOT_JDK"
14297
14298    if test ! -f "$path" && test ! -d "$path"; then
14299      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14300    fi
14301
14302    has_space=`$ECHO "$path" | $GREP " "`
14303    if test "x$has_space" != x; then
14304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14307    fi
14308  fi
14309
14310              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14311$as_echo_n "checking for Boot JDK... " >&6; }
14312              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14313$as_echo "$BOOT_JDK" >&6; }
14314              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14315$as_echo_n "checking Boot JDK version... " >&6; }
14316              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14317              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14318$as_echo "$BOOT_JDK_VERSION" >&6; }
14319            fi # end check jdk version
14320          fi # end check rt.jar
14321        fi # end check javac
14322      fi # end check java
14323    fi # end check boot jdk found
14324  fi
14325
14326    done
14327  fi
14328
14329
14330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14332      # Do we have a bin/java?
14333      if test ! -x "$BOOT_JDK/bin/java"; then
14334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14336        BOOT_JDK_FOUND=no
14337      else
14338        # Do we have a bin/javac?
14339        if test ! -x "$BOOT_JDK/bin/javac"; then
14340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14344          BOOT_JDK_FOUND=no
14345        else
14346          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14347          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14350            BOOT_JDK_FOUND=no
14351          else
14352            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14354
14355            # Extra M4 quote needed to protect [] in grep expression.
14356            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14357            if test "x$FOUND_VERSION_78" = x; then
14358              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14360              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14361$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14362              BOOT_JDK_FOUND=no
14363            else
14364              # We're done! :-)
14365              BOOT_JDK_FOUND=yes
14366
14367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14368
14369  # Input might be given as Windows format, start by converting to
14370  # unix format.
14371  path="$BOOT_JDK"
14372  new_path=`$CYGPATH -u "$path"`
14373
14374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14377  # "foo.exe" is OK but "foo" is an error.
14378  #
14379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14380  # It is also a way to make sure we got the proper file name for the real test later on.
14381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14382  if test "x$test_shortpath" = x; then
14383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14386  fi
14387
14388  # Call helper function which possibly converts this using DOS-style short mode.
14389  # If so, the updated path is stored in $new_path.
14390
14391  input_path="$new_path"
14392  # Check if we need to convert this using DOS-style short mode. If the path
14393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14394  # take no chances and rewrite it.
14395  # Note: m4 eats our [], so we need to use [ and ] instead.
14396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14397  if test "x$has_forbidden_chars" != x; then
14398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14402      # Going to short mode and back again did indeed matter. Since short mode is
14403      # case insensitive, let's make it lowercase to improve readability.
14404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14405      # Now convert it back to Unix-stile (cygpath)
14406      input_path=`$CYGPATH -u "$shortmode_path"`
14407      new_path="$input_path"
14408    fi
14409  fi
14410
14411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14412  if test "x$test_cygdrive_prefix" = x; then
14413    # As a simple fix, exclude /usr/bin since it's not a real path.
14414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14416      # a path prefixed by /cygdrive for fixpath to work.
14417      new_path="$CYGWIN_ROOT_PATH$input_path"
14418    fi
14419  fi
14420
14421
14422  if test "x$path" != "x$new_path"; then
14423    BOOT_JDK="$new_path"
14424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14426  fi
14427
14428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14429
14430  path="$BOOT_JDK"
14431  has_colon=`$ECHO $path | $GREP ^.:`
14432  new_path="$path"
14433  if test "x$has_colon" = x; then
14434    # Not in mixed or Windows style, start by that.
14435    new_path=`cmd //c echo $path`
14436  fi
14437
14438
14439  input_path="$new_path"
14440  # Check if we need to convert this using DOS-style short mode. If the path
14441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14442  # take no chances and rewrite it.
14443  # Note: m4 eats our [], so we need to use [ and ] instead.
14444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14445  if test "x$has_forbidden_chars" != x; then
14446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14448  fi
14449
14450
14451  windows_path="$new_path"
14452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14453    unix_path=`$CYGPATH -u "$windows_path"`
14454    new_path="$unix_path"
14455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14457    new_path="$unix_path"
14458  fi
14459
14460  if test "x$path" != "x$new_path"; then
14461    BOOT_JDK="$new_path"
14462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14464  fi
14465
14466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14468
14469  else
14470    # We're on a posix platform. Hooray! :)
14471    path="$BOOT_JDK"
14472
14473    if test ! -f "$path" && test ! -d "$path"; then
14474      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14475    fi
14476
14477    has_space=`$ECHO "$path" | $GREP " "`
14478    if test "x$has_space" != x; then
14479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14481      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14482    fi
14483  fi
14484
14485              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14486$as_echo_n "checking for Boot JDK... " >&6; }
14487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14488$as_echo "$BOOT_JDK" >&6; }
14489              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14490$as_echo_n "checking Boot JDK version... " >&6; }
14491              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14493$as_echo "$BOOT_JDK_VERSION" >&6; }
14494            fi # end check jdk version
14495          fi # end check rt.jar
14496        fi # end check javac
14497      fi # end check java
14498    fi # end check boot jdk found
14499  fi
14500
14501
14502  if test "x$BOOT_JDK_FOUND" = xno; then
14503    # Now execute the test
14504
14505  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14506  BOOT_JDK_SUFFIX="/Contents/Home"
14507  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14508  if test "x$ALL_JDKS_FOUND" != x; then
14509    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14510
14511  if test "x$BOOT_JDK_FOUND" = xno; then
14512    # Now execute the test
14513
14514        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14515        if test -d "$BOOT_JDK"; then
14516          BOOT_JDK_FOUND=maybe
14517          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14518$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14519        fi
14520
14521
14522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14524      # Do we have a bin/java?
14525      if test ! -x "$BOOT_JDK/bin/java"; then
14526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14528        BOOT_JDK_FOUND=no
14529      else
14530        # Do we have a bin/javac?
14531        if test ! -x "$BOOT_JDK/bin/javac"; then
14532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14536          BOOT_JDK_FOUND=no
14537        else
14538          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14539          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14542            BOOT_JDK_FOUND=no
14543          else
14544            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14546
14547            # Extra M4 quote needed to protect [] in grep expression.
14548            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14549            if test "x$FOUND_VERSION_78" = x; then
14550              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14552              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14553$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14554              BOOT_JDK_FOUND=no
14555            else
14556              # We're done! :-)
14557              BOOT_JDK_FOUND=yes
14558
14559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14560
14561  # Input might be given as Windows format, start by converting to
14562  # unix format.
14563  path="$BOOT_JDK"
14564  new_path=`$CYGPATH -u "$path"`
14565
14566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14569  # "foo.exe" is OK but "foo" is an error.
14570  #
14571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14572  # It is also a way to make sure we got the proper file name for the real test later on.
14573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14574  if test "x$test_shortpath" = x; then
14575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14578  fi
14579
14580  # Call helper function which possibly converts this using DOS-style short mode.
14581  # If so, the updated path is stored in $new_path.
14582
14583  input_path="$new_path"
14584  # Check if we need to convert this using DOS-style short mode. If the path
14585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14586  # take no chances and rewrite it.
14587  # Note: m4 eats our [], so we need to use [ and ] instead.
14588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14589  if test "x$has_forbidden_chars" != x; then
14590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14594      # Going to short mode and back again did indeed matter. Since short mode is
14595      # case insensitive, let's make it lowercase to improve readability.
14596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14597      # Now convert it back to Unix-stile (cygpath)
14598      input_path=`$CYGPATH -u "$shortmode_path"`
14599      new_path="$input_path"
14600    fi
14601  fi
14602
14603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14604  if test "x$test_cygdrive_prefix" = x; then
14605    # As a simple fix, exclude /usr/bin since it's not a real path.
14606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14608      # a path prefixed by /cygdrive for fixpath to work.
14609      new_path="$CYGWIN_ROOT_PATH$input_path"
14610    fi
14611  fi
14612
14613
14614  if test "x$path" != "x$new_path"; then
14615    BOOT_JDK="$new_path"
14616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14618  fi
14619
14620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14621
14622  path="$BOOT_JDK"
14623  has_colon=`$ECHO $path | $GREP ^.:`
14624  new_path="$path"
14625  if test "x$has_colon" = x; then
14626    # Not in mixed or Windows style, start by that.
14627    new_path=`cmd //c echo $path`
14628  fi
14629
14630
14631  input_path="$new_path"
14632  # Check if we need to convert this using DOS-style short mode. If the path
14633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14634  # take no chances and rewrite it.
14635  # Note: m4 eats our [], so we need to use [ and ] instead.
14636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14637  if test "x$has_forbidden_chars" != x; then
14638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14640  fi
14641
14642
14643  windows_path="$new_path"
14644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14645    unix_path=`$CYGPATH -u "$windows_path"`
14646    new_path="$unix_path"
14647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14649    new_path="$unix_path"
14650  fi
14651
14652  if test "x$path" != "x$new_path"; then
14653    BOOT_JDK="$new_path"
14654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14656  fi
14657
14658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14660
14661  else
14662    # We're on a posix platform. Hooray! :)
14663    path="$BOOT_JDK"
14664
14665    if test ! -f "$path" && test ! -d "$path"; then
14666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14667    fi
14668
14669    has_space=`$ECHO "$path" | $GREP " "`
14670    if test "x$has_space" != x; then
14671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14673      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14674    fi
14675  fi
14676
14677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14678$as_echo_n "checking for Boot JDK... " >&6; }
14679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14680$as_echo "$BOOT_JDK" >&6; }
14681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14682$as_echo_n "checking Boot JDK version... " >&6; }
14683              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14685$as_echo "$BOOT_JDK_VERSION" >&6; }
14686            fi # end check jdk version
14687          fi # end check rt.jar
14688        fi # end check javac
14689      fi # end check java
14690    fi # end check boot jdk found
14691  fi
14692
14693    done
14694  fi
14695
14696
14697    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14698    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14699      # Do we have a bin/java?
14700      if test ! -x "$BOOT_JDK/bin/java"; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14703        BOOT_JDK_FOUND=no
14704      else
14705        # Do we have a bin/javac?
14706        if test ! -x "$BOOT_JDK/bin/javac"; then
14707          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14709          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14710$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14711          BOOT_JDK_FOUND=no
14712        else
14713          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14714          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14715            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14717            BOOT_JDK_FOUND=no
14718          else
14719            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14720            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14721
14722            # Extra M4 quote needed to protect [] in grep expression.
14723            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14724            if test "x$FOUND_VERSION_78" = x; then
14725              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14727              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14728$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14729              BOOT_JDK_FOUND=no
14730            else
14731              # We're done! :-)
14732              BOOT_JDK_FOUND=yes
14733
14734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14735
14736  # Input might be given as Windows format, start by converting to
14737  # unix format.
14738  path="$BOOT_JDK"
14739  new_path=`$CYGPATH -u "$path"`
14740
14741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14744  # "foo.exe" is OK but "foo" is an error.
14745  #
14746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14747  # It is also a way to make sure we got the proper file name for the real test later on.
14748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14749  if test "x$test_shortpath" = x; then
14750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14752    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14753  fi
14754
14755  # Call helper function which possibly converts this using DOS-style short mode.
14756  # If so, the updated path is stored in $new_path.
14757
14758  input_path="$new_path"
14759  # Check if we need to convert this using DOS-style short mode. If the path
14760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14761  # take no chances and rewrite it.
14762  # Note: m4 eats our [], so we need to use [ and ] instead.
14763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14764  if test "x$has_forbidden_chars" != x; then
14765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14769      # Going to short mode and back again did indeed matter. Since short mode is
14770      # case insensitive, let's make it lowercase to improve readability.
14771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14772      # Now convert it back to Unix-stile (cygpath)
14773      input_path=`$CYGPATH -u "$shortmode_path"`
14774      new_path="$input_path"
14775    fi
14776  fi
14777
14778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14779  if test "x$test_cygdrive_prefix" = x; then
14780    # As a simple fix, exclude /usr/bin since it's not a real path.
14781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14783      # a path prefixed by /cygdrive for fixpath to work.
14784      new_path="$CYGWIN_ROOT_PATH$input_path"
14785    fi
14786  fi
14787
14788
14789  if test "x$path" != "x$new_path"; then
14790    BOOT_JDK="$new_path"
14791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14793  fi
14794
14795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14796
14797  path="$BOOT_JDK"
14798  has_colon=`$ECHO $path | $GREP ^.:`
14799  new_path="$path"
14800  if test "x$has_colon" = x; then
14801    # Not in mixed or Windows style, start by that.
14802    new_path=`cmd //c echo $path`
14803  fi
14804
14805
14806  input_path="$new_path"
14807  # Check if we need to convert this using DOS-style short mode. If the path
14808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14809  # take no chances and rewrite it.
14810  # Note: m4 eats our [], so we need to use [ and ] instead.
14811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14812  if test "x$has_forbidden_chars" != x; then
14813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14815  fi
14816
14817
14818  windows_path="$new_path"
14819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14820    unix_path=`$CYGPATH -u "$windows_path"`
14821    new_path="$unix_path"
14822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14824    new_path="$unix_path"
14825  fi
14826
14827  if test "x$path" != "x$new_path"; then
14828    BOOT_JDK="$new_path"
14829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14831  fi
14832
14833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14835
14836  else
14837    # We're on a posix platform. Hooray! :)
14838    path="$BOOT_JDK"
14839
14840    if test ! -f "$path" && test ! -d "$path"; then
14841      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14842    fi
14843
14844    has_space=`$ECHO "$path" | $GREP " "`
14845    if test "x$has_space" != x; then
14846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14848      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14849    fi
14850  fi
14851
14852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14853$as_echo_n "checking for Boot JDK... " >&6; }
14854              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14855$as_echo "$BOOT_JDK" >&6; }
14856              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14857$as_echo_n "checking Boot JDK version... " >&6; }
14858              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14859              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14860$as_echo "$BOOT_JDK_VERSION" >&6; }
14861            fi # end check jdk version
14862          fi # end check rt.jar
14863        fi # end check javac
14864      fi # end check java
14865    fi # end check boot jdk found
14866  fi
14867
14868  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14869
14870  if test "x$BOOT_JDK_FOUND" = xno; then
14871    # Now execute the test
14872
14873  BOOT_JDK_PREFIX="/usr/lib/jvm"
14874  BOOT_JDK_SUFFIX=""
14875  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14876  if test "x$ALL_JDKS_FOUND" != x; then
14877    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14878
14879  if test "x$BOOT_JDK_FOUND" = xno; then
14880    # Now execute the test
14881
14882        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14883        if test -d "$BOOT_JDK"; then
14884          BOOT_JDK_FOUND=maybe
14885          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14886$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14887        fi
14888
14889
14890    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14891    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14892      # Do we have a bin/java?
14893      if test ! -x "$BOOT_JDK/bin/java"; then
14894        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14896        BOOT_JDK_FOUND=no
14897      else
14898        # Do we have a bin/javac?
14899        if test ! -x "$BOOT_JDK/bin/javac"; then
14900          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14902          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14903$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14904          BOOT_JDK_FOUND=no
14905        else
14906          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14907          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14910            BOOT_JDK_FOUND=no
14911          else
14912            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14913            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14914
14915            # Extra M4 quote needed to protect [] in grep expression.
14916            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14917            if test "x$FOUND_VERSION_78" = x; then
14918              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14920              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14921$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14922              BOOT_JDK_FOUND=no
14923            else
14924              # We're done! :-)
14925              BOOT_JDK_FOUND=yes
14926
14927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14928
14929  # Input might be given as Windows format, start by converting to
14930  # unix format.
14931  path="$BOOT_JDK"
14932  new_path=`$CYGPATH -u "$path"`
14933
14934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14937  # "foo.exe" is OK but "foo" is an error.
14938  #
14939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14940  # It is also a way to make sure we got the proper file name for the real test later on.
14941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14942  if test "x$test_shortpath" = x; then
14943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14946  fi
14947
14948  # Call helper function which possibly converts this using DOS-style short mode.
14949  # If so, the updated path is stored in $new_path.
14950
14951  input_path="$new_path"
14952  # Check if we need to convert this using DOS-style short mode. If the path
14953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14954  # take no chances and rewrite it.
14955  # Note: m4 eats our [], so we need to use [ and ] instead.
14956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14957  if test "x$has_forbidden_chars" != x; then
14958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14962      # Going to short mode and back again did indeed matter. Since short mode is
14963      # case insensitive, let's make it lowercase to improve readability.
14964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14965      # Now convert it back to Unix-stile (cygpath)
14966      input_path=`$CYGPATH -u "$shortmode_path"`
14967      new_path="$input_path"
14968    fi
14969  fi
14970
14971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14972  if test "x$test_cygdrive_prefix" = x; then
14973    # As a simple fix, exclude /usr/bin since it's not a real path.
14974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14976      # a path prefixed by /cygdrive for fixpath to work.
14977      new_path="$CYGWIN_ROOT_PATH$input_path"
14978    fi
14979  fi
14980
14981
14982  if test "x$path" != "x$new_path"; then
14983    BOOT_JDK="$new_path"
14984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14986  fi
14987
14988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14989
14990  path="$BOOT_JDK"
14991  has_colon=`$ECHO $path | $GREP ^.:`
14992  new_path="$path"
14993  if test "x$has_colon" = x; then
14994    # Not in mixed or Windows style, start by that.
14995    new_path=`cmd //c echo $path`
14996  fi
14997
14998
14999  input_path="$new_path"
15000  # Check if we need to convert this using DOS-style short mode. If the path
15001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15002  # take no chances and rewrite it.
15003  # Note: m4 eats our [], so we need to use [ and ] instead.
15004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15005  if test "x$has_forbidden_chars" != x; then
15006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15008  fi
15009
15010
15011  windows_path="$new_path"
15012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15013    unix_path=`$CYGPATH -u "$windows_path"`
15014    new_path="$unix_path"
15015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15017    new_path="$unix_path"
15018  fi
15019
15020  if test "x$path" != "x$new_path"; then
15021    BOOT_JDK="$new_path"
15022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15024  fi
15025
15026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15028
15029  else
15030    # We're on a posix platform. Hooray! :)
15031    path="$BOOT_JDK"
15032
15033    if test ! -f "$path" && test ! -d "$path"; then
15034      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15035    fi
15036
15037    has_space=`$ECHO "$path" | $GREP " "`
15038    if test "x$has_space" != x; then
15039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15041      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15042    fi
15043  fi
15044
15045              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15046$as_echo_n "checking for Boot JDK... " >&6; }
15047              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15048$as_echo "$BOOT_JDK" >&6; }
15049              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15050$as_echo_n "checking Boot JDK version... " >&6; }
15051              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15052              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15053$as_echo "$BOOT_JDK_VERSION" >&6; }
15054            fi # end check jdk version
15055          fi # end check rt.jar
15056        fi # end check javac
15057      fi # end check java
15058    fi # end check boot jdk found
15059  fi
15060
15061    done
15062  fi
15063
15064
15065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15067      # Do we have a bin/java?
15068      if test ! -x "$BOOT_JDK/bin/java"; then
15069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15071        BOOT_JDK_FOUND=no
15072      else
15073        # Do we have a bin/javac?
15074        if test ! -x "$BOOT_JDK/bin/javac"; then
15075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15079          BOOT_JDK_FOUND=no
15080        else
15081          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15082          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15085            BOOT_JDK_FOUND=no
15086          else
15087            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15088            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15089
15090            # Extra M4 quote needed to protect [] in grep expression.
15091            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15092            if test "x$FOUND_VERSION_78" = x; then
15093              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15095              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15096$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15097              BOOT_JDK_FOUND=no
15098            else
15099              # We're done! :-)
15100              BOOT_JDK_FOUND=yes
15101
15102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15103
15104  # Input might be given as Windows format, start by converting to
15105  # unix format.
15106  path="$BOOT_JDK"
15107  new_path=`$CYGPATH -u "$path"`
15108
15109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15112  # "foo.exe" is OK but "foo" is an error.
15113  #
15114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15115  # It is also a way to make sure we got the proper file name for the real test later on.
15116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15117  if test "x$test_shortpath" = x; then
15118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15121  fi
15122
15123  # Call helper function which possibly converts this using DOS-style short mode.
15124  # If so, the updated path is stored in $new_path.
15125
15126  input_path="$new_path"
15127  # Check if we need to convert this using DOS-style short mode. If the path
15128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15129  # take no chances and rewrite it.
15130  # Note: m4 eats our [], so we need to use [ and ] instead.
15131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15132  if test "x$has_forbidden_chars" != x; then
15133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15137      # Going to short mode and back again did indeed matter. Since short mode is
15138      # case insensitive, let's make it lowercase to improve readability.
15139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15140      # Now convert it back to Unix-stile (cygpath)
15141      input_path=`$CYGPATH -u "$shortmode_path"`
15142      new_path="$input_path"
15143    fi
15144  fi
15145
15146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15147  if test "x$test_cygdrive_prefix" = x; then
15148    # As a simple fix, exclude /usr/bin since it's not a real path.
15149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15151      # a path prefixed by /cygdrive for fixpath to work.
15152      new_path="$CYGWIN_ROOT_PATH$input_path"
15153    fi
15154  fi
15155
15156
15157  if test "x$path" != "x$new_path"; then
15158    BOOT_JDK="$new_path"
15159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15161  fi
15162
15163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15164
15165  path="$BOOT_JDK"
15166  has_colon=`$ECHO $path | $GREP ^.:`
15167  new_path="$path"
15168  if test "x$has_colon" = x; then
15169    # Not in mixed or Windows style, start by that.
15170    new_path=`cmd //c echo $path`
15171  fi
15172
15173
15174  input_path="$new_path"
15175  # Check if we need to convert this using DOS-style short mode. If the path
15176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15177  # take no chances and rewrite it.
15178  # Note: m4 eats our [], so we need to use [ and ] instead.
15179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15180  if test "x$has_forbidden_chars" != x; then
15181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15183  fi
15184
15185
15186  windows_path="$new_path"
15187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15188    unix_path=`$CYGPATH -u "$windows_path"`
15189    new_path="$unix_path"
15190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15192    new_path="$unix_path"
15193  fi
15194
15195  if test "x$path" != "x$new_path"; then
15196    BOOT_JDK="$new_path"
15197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15199  fi
15200
15201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15203
15204  else
15205    # We're on a posix platform. Hooray! :)
15206    path="$BOOT_JDK"
15207
15208    if test ! -f "$path" && test ! -d "$path"; then
15209      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15210    fi
15211
15212    has_space=`$ECHO "$path" | $GREP " "`
15213    if test "x$has_space" != x; then
15214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15216      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15217    fi
15218  fi
15219
15220              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15221$as_echo_n "checking for Boot JDK... " >&6; }
15222              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15223$as_echo "$BOOT_JDK" >&6; }
15224              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15225$as_echo_n "checking Boot JDK version... " >&6; }
15226              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15227              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15228$as_echo "$BOOT_JDK_VERSION" >&6; }
15229            fi # end check jdk version
15230          fi # end check rt.jar
15231        fi # end check javac
15232      fi # end check java
15233    fi # end check boot jdk found
15234  fi
15235
15236  fi
15237
15238
15239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15241      # Do we have a bin/java?
15242      if test ! -x "$BOOT_JDK/bin/java"; then
15243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15245        BOOT_JDK_FOUND=no
15246      else
15247        # Do we have a bin/javac?
15248        if test ! -x "$BOOT_JDK/bin/javac"; then
15249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15253          BOOT_JDK_FOUND=no
15254        else
15255          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15256          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15257            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15259            BOOT_JDK_FOUND=no
15260          else
15261            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15263
15264            # Extra M4 quote needed to protect [] in grep expression.
15265            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15266            if test "x$FOUND_VERSION_78" = x; then
15267              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15269              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15270$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15271              BOOT_JDK_FOUND=no
15272            else
15273              # We're done! :-)
15274              BOOT_JDK_FOUND=yes
15275
15276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15277
15278  # Input might be given as Windows format, start by converting to
15279  # unix format.
15280  path="$BOOT_JDK"
15281  new_path=`$CYGPATH -u "$path"`
15282
15283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15286  # "foo.exe" is OK but "foo" is an error.
15287  #
15288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15289  # It is also a way to make sure we got the proper file name for the real test later on.
15290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15291  if test "x$test_shortpath" = x; then
15292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15295  fi
15296
15297  # Call helper function which possibly converts this using DOS-style short mode.
15298  # If so, the updated path is stored in $new_path.
15299
15300  input_path="$new_path"
15301  # Check if we need to convert this using DOS-style short mode. If the path
15302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15303  # take no chances and rewrite it.
15304  # Note: m4 eats our [], so we need to use [ and ] instead.
15305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15306  if test "x$has_forbidden_chars" != x; then
15307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15311      # Going to short mode and back again did indeed matter. Since short mode is
15312      # case insensitive, let's make it lowercase to improve readability.
15313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15314      # Now convert it back to Unix-stile (cygpath)
15315      input_path=`$CYGPATH -u "$shortmode_path"`
15316      new_path="$input_path"
15317    fi
15318  fi
15319
15320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15321  if test "x$test_cygdrive_prefix" = x; then
15322    # As a simple fix, exclude /usr/bin since it's not a real path.
15323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15325      # a path prefixed by /cygdrive for fixpath to work.
15326      new_path="$CYGWIN_ROOT_PATH$input_path"
15327    fi
15328  fi
15329
15330
15331  if test "x$path" != "x$new_path"; then
15332    BOOT_JDK="$new_path"
15333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15335  fi
15336
15337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15338
15339  path="$BOOT_JDK"
15340  has_colon=`$ECHO $path | $GREP ^.:`
15341  new_path="$path"
15342  if test "x$has_colon" = x; then
15343    # Not in mixed or Windows style, start by that.
15344    new_path=`cmd //c echo $path`
15345  fi
15346
15347
15348  input_path="$new_path"
15349  # Check if we need to convert this using DOS-style short mode. If the path
15350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15351  # take no chances and rewrite it.
15352  # Note: m4 eats our [], so we need to use [ and ] instead.
15353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15354  if test "x$has_forbidden_chars" != x; then
15355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15357  fi
15358
15359
15360  windows_path="$new_path"
15361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15362    unix_path=`$CYGPATH -u "$windows_path"`
15363    new_path="$unix_path"
15364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15366    new_path="$unix_path"
15367  fi
15368
15369  if test "x$path" != "x$new_path"; then
15370    BOOT_JDK="$new_path"
15371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15373  fi
15374
15375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15377
15378  else
15379    # We're on a posix platform. Hooray! :)
15380    path="$BOOT_JDK"
15381
15382    if test ! -f "$path" && test ! -d "$path"; then
15383      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15384    fi
15385
15386    has_space=`$ECHO "$path" | $GREP " "`
15387    if test "x$has_space" != x; then
15388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15390      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15391    fi
15392  fi
15393
15394              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15395$as_echo_n "checking for Boot JDK... " >&6; }
15396              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15397$as_echo "$BOOT_JDK" >&6; }
15398              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15399$as_echo_n "checking Boot JDK version... " >&6; }
15400              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15402$as_echo "$BOOT_JDK_VERSION" >&6; }
15403            fi # end check jdk version
15404          fi # end check rt.jar
15405        fi # end check javac
15406      fi # end check java
15407    fi # end check boot jdk found
15408  fi
15409
15410
15411# If we haven't found anything yet, we've truly lost. Give up.
15412if test "x$BOOT_JDK_FOUND" = xno; then
15413
15414    # Print a helpful message on how to acquire the necessary build dependency.
15415    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15416    MISSING_DEPENDENCY=openjdk
15417    PKGHANDLER_COMMAND=
15418
15419    case $PKGHANDLER in
15420	apt-get)
15421                apt_help     $MISSING_DEPENDENCY ;;
15422    yum)
15423                yum_help     $MISSING_DEPENDENCY ;;
15424	port)
15425                port_help    $MISSING_DEPENDENCY ;;
15426	pkgutil)
15427                pkgutil_help $MISSING_DEPENDENCY ;;
15428	pkgadd)
15429                pkgadd_help  $MISSING_DEPENDENCY ;;
15430    * )
15431      break ;;
15432    esac
15433
15434    if test "x$PKGHANDLER_COMMAND" != x; then
15435        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15436    fi
15437
15438  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15439$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15440  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15441$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15442  as_fn_error $? "Cannot continue" "$LINENO" 5
15443fi
15444
15445# Setup proper paths for what we found
15446BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15447if test ! -f "$BOOT_RTJAR"; then
15448    # On MacOSX it is called classes.jar
15449    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15450    if test -f "$BOOT_RTJAR"; then
15451      # Remove the ..
15452      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15453    fi
15454fi
15455BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15456BOOT_JDK="$BOOT_JDK"
15457
15458
15459
15460
15461# Setup tools from the Boot JDK.
15462
15463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15464$as_echo_n "checking for java in Boot JDK... " >&6; }
15465  JAVA=$BOOT_JDK/bin/java
15466  if test ! -x $JAVA; 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 java 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 javac in Boot JDK" >&5
15478$as_echo_n "checking for javac in Boot JDK... " >&6; }
15479  JAVAC=$BOOT_JDK/bin/javac
15480  if test ! -x $JAVAC; 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 javac 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 javah in Boot JDK" >&5
15492$as_echo_n "checking for javah in Boot JDK... " >&6; }
15493  JAVAH=$BOOT_JDK/bin/javah
15494  if test ! -x $JAVAH; 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 javah 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 javap in Boot JDK" >&5
15506$as_echo_n "checking for javap in Boot JDK... " >&6; }
15507  JAVAP=$BOOT_JDK/bin/javap
15508  if test ! -x $JAVAP; 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 javap 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 jar in Boot JDK" >&5
15520$as_echo_n "checking for jar in Boot JDK... " >&6; }
15521  JAR=$BOOT_JDK/bin/jar
15522  if test ! -x $JAR; 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 jar 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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15534$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15535  RMIC=$BOOT_JDK/bin/rmic
15536  if test ! -x $RMIC; then
15537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15538$as_echo "not found" >&6; }
15539      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15540$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15541      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15542  fi
15543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15544$as_echo "ok" >&6; }
15545
15546
15547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15548$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15549  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15550  if test ! -x $NATIVE2ASCII; then
15551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15552$as_echo "not found" >&6; }
15553      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15554$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15555      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15556  fi
15557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15558$as_echo "ok" >&6; }
15559
15560
15561# Finally, set some other options...
15562
15563# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15564BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15565
15566
15567
15568
15569##############################################################################
15570#
15571# Specify options for anything that is run with the Boot JDK.
15572#
15573
15574# Check whether --with-boot-jdk-jvmargs was given.
15575if test "${with_boot_jdk_jvmargs+set}" = set; then :
15576  withval=$with_boot_jdk_jvmargs;
15577fi
15578
15579
15580if test "x$with_boot_jdk_jvmargs" = x; then
15581    # Not all JVM:s accept the same arguments on the command line.
15582    # OpenJDK specific increase in thread stack for JDK build,
15583    # well more specifically, when running javac.
15584    if test "x$BUILD_NUM_BITS" = x32; then
15585       STACK_SIZE=768
15586    else
15587       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15588       # since 64-bit pointers are pushed on the stach. Apparently, we need
15589       # to increase the stack space when javacing the JDK....
15590       STACK_SIZE=1536
15591    fi
15592
15593    # Minimum amount of heap memory.
15594
15595    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15596    # If so, then append -Xms64M to boot_jdk_jvmargs
15597    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15598    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15599    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15600        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15601    fi
15602
15603    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15604        # Why does macosx need more heap? Its the huge JDK batch.
15605
15606    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15607    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15608    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15609    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15610    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15611        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15612    fi
15613
15614    else
15615
15616    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15617    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15618    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15619    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15620    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15621        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15622    fi
15623
15624    fi
15625    # When is adding -client something that speeds up the JVM?
15626    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15627
15628    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15629    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15630    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15631    FOUND_VERSION=`$JAVA -XX:PermSize=32m -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:PermSize=32m"
15634    fi
15635
15636
15637    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15638    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15639    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15640    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15641    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15642        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15643    fi
15644
15645
15646    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15647    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15648    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15649    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15650    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15651        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15652    fi
15653
15654    # Disable special log output when a debug build is used as Boot JDK...
15655
15656    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15657    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15658    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15659    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15660    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15661        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15662    fi
15663
15664fi
15665
15666BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15667
15668
15669
15670###############################################################################
15671#
15672# Configure the sources to use. We can add or override individual directories.
15673#
15674###############################################################################
15675
15676
15677
15678# Where are the sources. Any of these can be overridden
15679# using --with-override-corba and the likes.
15680LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15681CORBA_TOPDIR="$SRC_ROOT/corba"
15682JAXP_TOPDIR="$SRC_ROOT/jaxp"
15683JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15684HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15685NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15686JDK_TOPDIR="$SRC_ROOT/jdk"
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697###############################################################################
15698#
15699# Pickup additional source for a component from outside of the source root
15700# or override source for a component.
15701#
15702
15703# Check whether --with-add-source-root was given.
15704if test "${with_add_source_root+set}" = set; then :
15705  withval=$with_add_source_root;
15706fi
15707
15708
15709
15710# Check whether --with-override-source-root was given.
15711if test "${with_override_source_root+set}" = set; then :
15712  withval=$with_override_source_root;
15713fi
15714
15715
15716
15717# Check whether --with-adds-and-overrides was given.
15718if test "${with_adds_and_overrides+set}" = set; then :
15719  withval=$with_adds_and_overrides;
15720fi
15721
15722
15723if test "x$with_adds_and_overrides" != x; then
15724    with_add_source_root="$with_adds_and_overrides/adds"
15725    with_override_source_root="$with_adds_and_overrides/overrides"
15726fi
15727
15728if test "x$with_add_source_root" != x; then
15729    if ! test -d $with_add_source_root; then
15730       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15731    fi
15732    CURDIR="$PWD"
15733    cd "$with_add_source_root"
15734    ADD_SRC_ROOT="`pwd`"
15735    cd "$CURDIR"
15736    # Verify that the addon source root does not have any root makefiles.
15737    # If it does, then it is usually an error, prevent this.
15738    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15739       test -f $with_add_source_root/langtools/make/Makefile; then
15740        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
15741    fi
15742    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15743       test -f $with_add_source_root/corba/make/Makefile; then
15744        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
15745    fi
15746    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15747       test -f $with_add_source_root/jaxp/make/Makefile; then
15748        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
15749    fi
15750    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15751       test -f $with_add_source_root/jaxws/make/Makefile; then
15752        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
15753    fi
15754    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15755       test -f $with_add_source_root/hotspot/make/Makefile; then
15756        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
15757    fi
15758    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15759       test -f $with_add_source_root/jdk/make/Makefile; then
15760        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
15761    fi
15762fi
15763
15764
15765if test "x$with_override_source_root" != x; then
15766    if ! test -d $with_override_source_root; then
15767       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15768    fi
15769    CURDIR="$PWD"
15770    cd "$with_override_source_root"
15771    OVERRIDE_SRC_ROOT="`pwd`"
15772    cd "$CURDIR"
15773    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15774       test -f $with_override_source_root/langtools/make/Makefile; then
15775        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
15776    fi
15777    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15778       test -f $with_override_source_root/corba/make/Makefile; then
15779        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
15780    fi
15781    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15782       test -f $with_override_source_root/jaxp/make/Makefile; then
15783        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
15784    fi
15785    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15786       test -f $with_override_source_root/jaxws/make/Makefile; then
15787        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
15788    fi
15789    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15790       test -f $with_override_source_root/hotspot/make/Makefile; then
15791        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
15792    fi
15793    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15794       test -f $with_override_source_root/jdk/make/Makefile; then
15795        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
15796    fi
15797fi
15798
15799
15800###############################################################################
15801#
15802# Override a repo completely, this is used for example when you have 3 small
15803# development sandboxes of the langtools sources and want to avoid having 3 full
15804# OpenJDK sources checked out on disk.
15805#
15806# Assuming that the 3 langtools sandboxes are located here:
15807# /home/fredrik/sandbox1/langtools
15808# /home/fredrik/sandbox2/langtools
15809# /home/fredrik/sandbox3/langtools
15810#
15811# From the source root you create build subdirs manually:
15812#     mkdir -p build1 build2 build3
15813# in each build directory run:
15814#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15815#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15816#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15817#
15818
15819
15820# Check whether --with-override-langtools was given.
15821if test "${with_override_langtools+set}" = set; then :
15822  withval=$with_override_langtools;
15823fi
15824
15825
15826
15827# Check whether --with-override-corba was given.
15828if test "${with_override_corba+set}" = set; then :
15829  withval=$with_override_corba;
15830fi
15831
15832
15833
15834# Check whether --with-override-jaxp was given.
15835if test "${with_override_jaxp+set}" = set; then :
15836  withval=$with_override_jaxp;
15837fi
15838
15839
15840
15841# Check whether --with-override-jaxws was given.
15842if test "${with_override_jaxws+set}" = set; then :
15843  withval=$with_override_jaxws;
15844fi
15845
15846
15847
15848# Check whether --with-override-hotspot was given.
15849if test "${with_override_hotspot+set}" = set; then :
15850  withval=$with_override_hotspot;
15851fi
15852
15853
15854
15855# Check whether --with-override-jdk was given.
15856if test "${with_override_jdk+set}" = set; then :
15857  withval=$with_override_jdk;
15858fi
15859
15860
15861if test "x$with_override_langtools" != x; then
15862    CURDIR="$PWD"
15863    cd "$with_override_langtools"
15864    LANGTOOLS_TOPDIR="`pwd`"
15865    cd "$CURDIR"
15866    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15867        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15868    fi
15869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15870$as_echo_n "checking if langtools should be overridden... " >&6; }
15871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15872$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15873fi
15874if test "x$with_override_corba" != x; then
15875    CURDIR="$PWD"
15876    cd "$with_override_corba"
15877    CORBA_TOPDIR="`pwd`"
15878    cd "$CURDIR"
15879    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15880        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15881    fi
15882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15883$as_echo_n "checking if corba should be overridden... " >&6; }
15884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15885$as_echo "yes with $CORBA_TOPDIR" >&6; }
15886fi
15887if test "x$with_override_jaxp" != x; then
15888    CURDIR="$PWD"
15889    cd "$with_override_jaxp"
15890    JAXP_TOPDIR="`pwd`"
15891    cd "$CURDIR"
15892    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15893        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15894    fi
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15896$as_echo_n "checking if jaxp should be overridden... " >&6; }
15897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15898$as_echo "yes with $JAXP_TOPDIR" >&6; }
15899fi
15900if test "x$with_override_jaxws" != x; then
15901    CURDIR="$PWD"
15902    cd "$with_override_jaxws"
15903    JAXWS_TOPDIR="`pwd`"
15904    cd "$CURDIR"
15905    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15906        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15907    fi
15908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15909$as_echo_n "checking if jaxws should be overridden... " >&6; }
15910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15911$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15912fi
15913if test "x$with_override_hotspot" != x; then
15914    CURDIR="$PWD"
15915    cd "$with_override_hotspot"
15916    HOTSPOT_TOPDIR="`pwd`"
15917    cd "$CURDIR"
15918    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15919       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15920        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15921    fi
15922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15923$as_echo_n "checking if hotspot should be overridden... " >&6; }
15924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15925$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15926fi
15927if test "x$with_override_nashorn" != x; then
15928    CURDIR="$PWD"
15929    cd "$with_override_nashorn"
15930    NASHORN_TOPDIR="`pwd`"
15931    cd "$CURDIR"
15932    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15933        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15934    fi
15935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15936$as_echo_n "checking if nashorn should be overridden... " >&6; }
15937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15938$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15939fi
15940if test "x$with_override_jdk" != x; then
15941    CURDIR="$PWD"
15942    cd "$with_override_jdk"
15943    JDK_TOPDIR="`pwd`"
15944    cd "$CURDIR"
15945    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15946        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15947    fi
15948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15949$as_echo_n "checking if JDK should be overridden... " >&6; }
15950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15951$as_echo "yes with $JDK_TOPDIR" >&6; }
15952fi
15953
15954
15955
15956BUILD_OUTPUT="$OUTPUT_ROOT"
15957
15958
15959HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15960BUILD_HOTSPOT=true
15961
15962
15963
15964# Check whether --with-import-hotspot was given.
15965if test "${with_import_hotspot+set}" = set; then :
15966  withval=$with_import_hotspot;
15967fi
15968
15969if test "x$with_import_hotspot" != x; then
15970    CURDIR="$PWD"
15971    cd "$with_import_hotspot"
15972    HOTSPOT_DIST="`pwd`"
15973    cd "$CURDIR"
15974    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15975        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15976    fi
15977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15978$as_echo_n "checking if hotspot should be imported... " >&6; }
15979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15980$as_echo "yes from $HOTSPOT_DIST" >&6; }
15981    BUILD_HOTSPOT=false
15982fi
15983
15984JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15985
15986
15987###############################################################################
15988#
15989# Setup the toolchain (compilers etc), i.e. the tools that need to be
15990# cross-compilation aware.
15991#
15992###############################################################################
15993
15994
15995###############################################################################
15996#
15997# Configure the development tool paths and potential sysroot.
15998#
15999ac_ext=cpp
16000ac_cpp='$CXXCPP $CPPFLAGS'
16001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16004
16005
16006# The option used to specify the target .o,.a or .so file.
16007# When compiling, how to specify the to be created object file.
16008CC_OUT_OPTION='-o$(SPACE)'
16009# When linking, how to specify the to be created executable.
16010EXE_OUT_OPTION='-o$(SPACE)'
16011# When linking, how to specify the to be created dynamically linkable library.
16012LD_OUT_OPTION='-o$(SPACE)'
16013# When archiving, how to specify the to be create static archive for object files.
16014AR_OUT_OPTION='rcs$(SPACE)'
16015
16016
16017
16018
16019
16020# Locate the actual tools
16021
16022if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16023
16024  # Store path to cygwin link.exe to help excluding it when searching for
16025  # VS linker. This must be done before changing the PATH when looking for VS.
16026  # Extract the first word of "link", so it can be a program name with args.
16027set dummy link; ac_word=$2
16028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16029$as_echo_n "checking for $ac_word... " >&6; }
16030if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16031  $as_echo_n "(cached) " >&6
16032else
16033  case $CYGWIN_LINK in
16034  [\\/]* | ?:[\\/]*)
16035  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16036  ;;
16037  *)
16038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16039for as_dir in $PATH
16040do
16041  IFS=$as_save_IFS
16042  test -z "$as_dir" && as_dir=.
16043    for ac_exec_ext in '' $ac_executable_extensions; do
16044  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16045    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16047    break 2
16048  fi
16049done
16050  done
16051IFS=$as_save_IFS
16052
16053  ;;
16054esac
16055fi
16056CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16057if test -n "$CYGWIN_LINK"; then
16058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16059$as_echo "$CYGWIN_LINK" >&6; }
16060else
16061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16062$as_echo "no" >&6; }
16063fi
16064
16065
16066  if test "x$CYGWIN_LINK" != x; then
16067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16068$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16069    "$CYGWIN_LINK" --version > /dev/null
16070    if test $? -eq 0 ; then
16071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16072$as_echo "yes" >&6; }
16073    else
16074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16075$as_echo "no" >&6; }
16076      # This might be the VS linker. Don't exclude it later on.
16077      CYGWIN_LINK=""
16078    fi
16079  fi
16080
16081  # First-hand choice is to locate and run the vsvars bat file.
16082
16083  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16084    VCVARSFILE="vc/bin/vcvars32.bat"
16085  else
16086    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16087  fi
16088
16089  VS_ENV_CMD=""
16090  VS_ENV_ARGS=""
16091  if test "x$with_toolsdir" != x; then
16092
16093  if test "x$VS_ENV_CMD" = x; then
16094    VS100BASE="$with_toolsdir/../.."
16095    METHOD="--with-tools-dir"
16096
16097  windows_path="$VS100BASE"
16098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16099    unix_path=`$CYGPATH -u "$windows_path"`
16100    VS100BASE="$unix_path"
16101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16103    VS100BASE="$unix_path"
16104  fi
16105
16106    if test -d "$VS100BASE"; then
16107      if test -f "$VS100BASE/$VCVARSFILE"; then
16108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16109$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16110        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16111      else
16112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16113$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16114        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16115$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16116      fi
16117    fi
16118  fi
16119
16120  fi
16121
16122  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16123    # Having specified an argument which is incorrect will produce an instant failure;
16124    # we should not go on looking
16125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16126$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16127    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16128$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16129    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16130  fi
16131
16132  if test "x$ProgramW6432" != x; then
16133
16134  if test "x$VS_ENV_CMD" = x; then
16135    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16136    METHOD="well-known name"
16137
16138  windows_path="$WIN_SDK_BASE"
16139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16140    unix_path=`$CYGPATH -u "$windows_path"`
16141    WIN_SDK_BASE="$unix_path"
16142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16144    WIN_SDK_BASE="$unix_path"
16145  fi
16146
16147    if test -d "$WIN_SDK_BASE"; then
16148      # There have been cases of partial or broken SDK installations. A missing
16149      # lib dir is not going to work.
16150      if test ! -d "$WIN_SDK_BASE/../lib"; then
16151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16152$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16153        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16154$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16155      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16158        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16159        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16160          VS_ENV_ARGS="/x86"
16161        else
16162          VS_ENV_ARGS="/x64"
16163        fi
16164      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16168$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16169      fi
16170    fi
16171  fi
16172
16173  fi
16174  if test "x$PROGRAMW6432" != x; then
16175
16176  if test "x$VS_ENV_CMD" = x; then
16177    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16178    METHOD="well-known name"
16179
16180  windows_path="$WIN_SDK_BASE"
16181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16182    unix_path=`$CYGPATH -u "$windows_path"`
16183    WIN_SDK_BASE="$unix_path"
16184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16186    WIN_SDK_BASE="$unix_path"
16187  fi
16188
16189    if test -d "$WIN_SDK_BASE"; then
16190      # There have been cases of partial or broken SDK installations. A missing
16191      # lib dir is not going to work.
16192      if test ! -d "$WIN_SDK_BASE/../lib"; then
16193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16195        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16196$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16197      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16200        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16201        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16202          VS_ENV_ARGS="/x86"
16203        else
16204          VS_ENV_ARGS="/x64"
16205        fi
16206      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16210$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16211      fi
16212    fi
16213  fi
16214
16215  fi
16216  if test "x$PROGRAMFILES" != x; then
16217
16218  if test "x$VS_ENV_CMD" = x; then
16219    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16220    METHOD="well-known name"
16221
16222  windows_path="$WIN_SDK_BASE"
16223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16224    unix_path=`$CYGPATH -u "$windows_path"`
16225    WIN_SDK_BASE="$unix_path"
16226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16228    WIN_SDK_BASE="$unix_path"
16229  fi
16230
16231    if test -d "$WIN_SDK_BASE"; then
16232      # There have been cases of partial or broken SDK installations. A missing
16233      # lib dir is not going to work.
16234      if test ! -d "$WIN_SDK_BASE/../lib"; then
16235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16237        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16238$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16239      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16240        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16241$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16242        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16243        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16244          VS_ENV_ARGS="/x86"
16245        else
16246          VS_ENV_ARGS="/x64"
16247        fi
16248      else
16249        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16250$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16251        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16252$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16253      fi
16254    fi
16255  fi
16256
16257  fi
16258
16259  if test "x$VS_ENV_CMD" = x; then
16260    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16261    METHOD="well-known name"
16262
16263  windows_path="$WIN_SDK_BASE"
16264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16265    unix_path=`$CYGPATH -u "$windows_path"`
16266    WIN_SDK_BASE="$unix_path"
16267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16269    WIN_SDK_BASE="$unix_path"
16270  fi
16271
16272    if test -d "$WIN_SDK_BASE"; then
16273      # There have been cases of partial or broken SDK installations. A missing
16274      # lib dir is not going to work.
16275      if test ! -d "$WIN_SDK_BASE/../lib"; then
16276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16279$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16280      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16283        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16284        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16285          VS_ENV_ARGS="/x86"
16286        else
16287          VS_ENV_ARGS="/x64"
16288        fi
16289      else
16290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16293$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16294      fi
16295    fi
16296  fi
16297
16298
16299  if test "x$VS_ENV_CMD" = x; then
16300    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16301    METHOD="well-known name"
16302
16303  windows_path="$WIN_SDK_BASE"
16304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16305    unix_path=`$CYGPATH -u "$windows_path"`
16306    WIN_SDK_BASE="$unix_path"
16307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16309    WIN_SDK_BASE="$unix_path"
16310  fi
16311
16312    if test -d "$WIN_SDK_BASE"; then
16313      # There have been cases of partial or broken SDK installations. A missing
16314      # lib dir is not going to work.
16315      if test ! -d "$WIN_SDK_BASE/../lib"; then
16316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16317$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16319$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16320      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16322$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16323        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16324        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16325          VS_ENV_ARGS="/x86"
16326        else
16327          VS_ENV_ARGS="/x64"
16328        fi
16329      else
16330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16331$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16333$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16334      fi
16335    fi
16336  fi
16337
16338
16339  if test "x$VS100COMNTOOLS" != x; then
16340
16341  if test "x$VS_ENV_CMD" = x; then
16342    VS100BASE="$VS100COMNTOOLS/../.."
16343    METHOD="VS100COMNTOOLS variable"
16344
16345  windows_path="$VS100BASE"
16346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347    unix_path=`$CYGPATH -u "$windows_path"`
16348    VS100BASE="$unix_path"
16349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16351    VS100BASE="$unix_path"
16352  fi
16353
16354    if test -d "$VS100BASE"; then
16355      if test -f "$VS100BASE/$VCVARSFILE"; then
16356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16357$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16358        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16359      else
16360        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16361$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16362        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16363$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16364      fi
16365    fi
16366  fi
16367
16368  fi
16369  if test "x$PROGRAMFILES" != x; then
16370
16371  if test "x$VS_ENV_CMD" = x; then
16372    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16373    METHOD="well-known name"
16374
16375  windows_path="$VS100BASE"
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    unix_path=`$CYGPATH -u "$windows_path"`
16378    VS100BASE="$unix_path"
16379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16381    VS100BASE="$unix_path"
16382  fi
16383
16384    if test -d "$VS100BASE"; then
16385      if test -f "$VS100BASE/$VCVARSFILE"; then
16386        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16387$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16388        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16389      else
16390        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16391$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16392        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16393$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16394      fi
16395    fi
16396  fi
16397
16398  fi
16399
16400  if test "x$VS_ENV_CMD" = x; then
16401    VS100BASE="C:/Program Files/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    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16430    METHOD="well-known name"
16431
16432  windows_path="$VS100BASE"
16433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434    unix_path=`$CYGPATH -u "$windows_path"`
16435    VS100BASE="$unix_path"
16436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16438    VS100BASE="$unix_path"
16439  fi
16440
16441    if test -d "$VS100BASE"; then
16442      if test -f "$VS100BASE/$VCVARSFILE"; then
16443        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16444$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16445        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16446      else
16447        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16448$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16449        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16450$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16451      fi
16452    fi
16453  fi
16454
16455
16456  if test "x$VS_ENV_CMD" != x; then
16457    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16458
16459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16460
16461  # First separate the path from the arguments. This will split at the first
16462  # space.
16463  complete="$VS_ENV_CMD"
16464  path="${complete%% *}"
16465  tmp="$complete EOL"
16466  arguments="${tmp#* }"
16467
16468  # Input might be given as Windows format, start by converting to
16469  # unix format.
16470  new_path=`$CYGPATH -u "$path"`
16471
16472  # Now try to locate executable using which
16473  new_path=`$WHICH "$new_path" 2> /dev/null`
16474  # bat and cmd files are not always considered executable in cygwin causing which
16475  # to not find them
16476  if test "x$new_path" = x \
16477           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16478           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16479    new_path=`$CYGPATH -u "$path"`
16480  fi
16481  if test "x$new_path" = x; then
16482    # Oops. Which didn't find the executable.
16483    # The splitting of arguments from the executable at a space might have been incorrect,
16484    # since paths with space are more likely in Windows. Give it another try with the whole
16485    # argument.
16486    path="$complete"
16487    arguments="EOL"
16488    new_path=`$CYGPATH -u "$path"`
16489    new_path=`$WHICH "$new_path" 2> /dev/null`
16490    # bat and cmd files are not always considered executable in cygwin causing which
16491    # to not find them
16492    if test "x$new_path" = x \
16493             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16494             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16495      new_path=`$CYGPATH -u "$path"`
16496    fi
16497    if test "x$new_path" = x; then
16498      # It's still not found. Now this is an unrecoverable error.
16499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16500$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16501      has_space=`$ECHO "$complete" | $GREP " "`
16502      if test "x$has_space" != x; then
16503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16505      fi
16506      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16507    fi
16508  fi
16509
16510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16513  # "foo.exe" is OK but "foo" is an error.
16514  #
16515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16516  # It is also a way to make sure we got the proper file name for the real test later on.
16517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16518  if test "x$test_shortpath" = x; then
16519    # Short path failed, file does not exist as specified.
16520    # Try adding .exe or .cmd
16521    if test -f "${new_path}.exe"; then
16522       input_to_shortpath="${new_path}.exe"
16523    elif test -f "${new_path}.cmd"; then
16524       input_to_shortpath="${new_path}.cmd"
16525    else
16526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16527$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16530      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16531    fi
16532  else
16533    input_to_shortpath="$new_path"
16534  fi
16535
16536  # Call helper function which possibly converts this using DOS-style short mode.
16537  # If so, the updated path is stored in $new_path.
16538  new_path="$input_to_shortpath"
16539
16540  input_path="$input_to_shortpath"
16541  # Check if we need to convert this using DOS-style short mode. If the path
16542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16543  # take no chances and rewrite it.
16544  # Note: m4 eats our [], so we need to use [ and ] instead.
16545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16546  if test "x$has_forbidden_chars" != x; then
16547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16551      # Going to short mode and back again did indeed matter. Since short mode is
16552      # case insensitive, let's make it lowercase to improve readability.
16553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16554      # Now convert it back to Unix-stile (cygpath)
16555      input_path=`$CYGPATH -u "$shortmode_path"`
16556      new_path="$input_path"
16557    fi
16558  fi
16559
16560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16561  if test "x$test_cygdrive_prefix" = x; then
16562    # As a simple fix, exclude /usr/bin since it's not a real path.
16563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16565      # a path prefixed by /cygdrive for fixpath to work.
16566      new_path="$CYGWIN_ROOT_PATH$input_path"
16567    fi
16568  fi
16569
16570  # remove trailing .exe if any
16571  new_path="${new_path/%.exe/}"
16572
16573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16574
16575  # First separate the path from the arguments. This will split at the first
16576  # space.
16577  complete="$VS_ENV_CMD"
16578  path="${complete%% *}"
16579  tmp="$complete EOL"
16580  arguments="${tmp#* }"
16581
16582  # Input might be given as Windows format, start by converting to
16583  # unix format.
16584  new_path="$path"
16585
16586  windows_path="$new_path"
16587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16588    unix_path=`$CYGPATH -u "$windows_path"`
16589    new_path="$unix_path"
16590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16592    new_path="$unix_path"
16593  fi
16594
16595
16596  # Now try to locate executable using which
16597  new_path=`$WHICH "$new_path" 2> /dev/null`
16598
16599  if test "x$new_path" = x; then
16600    # Oops. Which didn't find the executable.
16601    # The splitting of arguments from the executable at a space might have been incorrect,
16602    # since paths with space are more likely in Windows. Give it another try with the whole
16603    # argument.
16604    path="$complete"
16605    arguments="EOL"
16606    new_path="$path"
16607
16608  windows_path="$new_path"
16609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16610    unix_path=`$CYGPATH -u "$windows_path"`
16611    new_path="$unix_path"
16612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16614    new_path="$unix_path"
16615  fi
16616
16617
16618    new_path=`$WHICH "$new_path" 2> /dev/null`
16619
16620    if test "x$new_path" = x; then
16621      # It's still not found. Now this is an unrecoverable error.
16622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16623$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16624      has_space=`$ECHO "$complete" | $GREP " "`
16625      if test "x$has_space" != x; then
16626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16628      fi
16629      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16630    fi
16631  fi
16632
16633  # Now new_path has a complete unix path to the binary
16634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16635    # Keep paths in /bin as-is, but remove trailing .exe if any
16636    new_path="${new_path/%.exe/}"
16637    # Do not save /bin paths to all_fixpath_prefixes!
16638  else
16639    # Not in mixed or Windows style, start by that.
16640    new_path=`cmd //c echo $new_path`
16641
16642  input_path="$new_path"
16643  # Check if we need to convert this using DOS-style short mode. If the path
16644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16645  # take no chances and rewrite it.
16646  # Note: m4 eats our [], so we need to use [ and ] instead.
16647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16648  if test "x$has_forbidden_chars" != x; then
16649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16651  fi
16652
16653    # Output is in $new_path
16654
16655  windows_path="$new_path"
16656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16657    unix_path=`$CYGPATH -u "$windows_path"`
16658    new_path="$unix_path"
16659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16661    new_path="$unix_path"
16662  fi
16663
16664    # remove trailing .exe if any
16665    new_path="${new_path/%.exe/}"
16666
16667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16669  fi
16670
16671  else
16672    # We're on a posix platform. Hooray! :)
16673    # First separate the path from the arguments. This will split at the first
16674    # space.
16675    complete="$VS_ENV_CMD"
16676    path="${complete%% *}"
16677    tmp="$complete EOL"
16678    arguments="${tmp#* }"
16679
16680    # Cannot rely on the command "which" here since it doesn't always work.
16681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16682    if test -z "$is_absolute_path"; then
16683      # Path to executable is not absolute. Find it.
16684      IFS_save="$IFS"
16685      IFS=:
16686      for p in $PATH; do
16687        if test -f "$p/$path" && test -x "$p/$path"; then
16688          new_path="$p/$path"
16689          break
16690        fi
16691      done
16692      IFS="$IFS_save"
16693    else
16694      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16695$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16696      new_path="$path"
16697    fi
16698
16699    if test "x$new_path" = x; then
16700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16701$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16702        has_space=`$ECHO "$complete" | $GREP " "`
16703        if test "x$has_space" != x; then
16704          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16706        fi
16707        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16708      fi
16709  fi
16710
16711      # Now join together the path and the arguments once again
16712      if test "x$arguments" != xEOL; then
16713        new_complete="$new_path ${arguments% *}"
16714      else
16715        new_complete="$new_path"
16716      fi
16717
16718  if test "x$complete" != "x$new_complete"; then
16719      VS_ENV_CMD="$new_complete"
16720      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16721$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16722    fi
16723
16724
16725    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16726    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16727$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16728    cd $OUTPUT_ROOT
16729    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16730    # to autoconf standards.
16731
16732    #----
16733
16734    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16735    # but calculate the difference in Cygwin environment before/after running it and then
16736    # apply the diff.
16737
16738    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16739      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16740      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16741      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16742    else
16743      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16744      _dosbash=`cmd //c echo \`which bash\``
16745    fi
16746
16747    # generate the set of exported vars before/after the vs10 setup
16748    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16749    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16750    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16751    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16752
16753    # Now execute the newly created bat file.
16754    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16755    cmd /c localdevenvtmp.bat | cat
16756
16757    # apply the diff (less some non-vs10 vars named by "!")
16758    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16759    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16760    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16761
16762    # cleanup
16763    $RM localdevenvtmp*
16764    #----
16765    cd $CURDIR
16766    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16768$as_echo "no" >&6; }
16769      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16770$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16771      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16772$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16773      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16774$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16775      as_fn_error $? "Cannot continue" "$LINENO" 5
16776    fi
16777
16778    # Now set all paths and other env variables. This will allow the rest of
16779    # the configure script to find and run the compiler in the proper way.
16780    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16781$as_echo "$as_me: Setting extracted environment variables" >&6;}
16782    . $OUTPUT_ROOT/localdevenv.sh
16783  else
16784    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16785    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16786$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16787  fi
16788
16789  # At this point, we should have corrent variables in the environment, or we can't continue.
16790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16791$as_echo_n "checking for Visual Studio variables... " >&6; }
16792
16793  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16794    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16796$as_echo "present but broken" >&6; }
16797      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16798    else
16799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16800$as_echo "ok" >&6; }
16801      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16802      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16803      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16804      VS_PATH="$PATH"
16805
16806
16807
16808    fi
16809  else
16810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16811$as_echo "not found" >&6; }
16812
16813    if test "x$VS_ENV_CMD" = x; then
16814      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16815$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16816      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16817$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16818    else
16819      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16820$as_echo "$as_me: Running the extraction script failed." >&6;}
16821    fi
16822    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16823$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16824    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16825$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16826    as_fn_error $? "Cannot continue" "$LINENO" 5
16827  fi
16828
16829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16830$as_echo_n "checking for msvcr100.dll... " >&6; }
16831
16832# Check whether --with-msvcr-dll was given.
16833if test "${with_msvcr_dll+set}" = set; then :
16834  withval=$with_msvcr_dll;
16835fi
16836
16837  if test "x$with_msvcr_dll" != x; then
16838    MSVCR_DLL="$with_msvcr_dll"
16839  else
16840    if test "x$VCINSTALLDIR" != x; then
16841      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16842        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16843      else
16844        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16845        if test "x$MSVCR_DLL" = x; then
16846          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16847        fi
16848      fi
16849      if test "x$MSVCR_DLL" != x; then
16850        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16851$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16852      else
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16854$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16855      fi
16856    fi
16857    if test "x$MSVCR_DLL" = x; then
16858      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16860$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16861        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16862      fi
16863    fi
16864  fi
16865  if test "x$MSVCR_DLL" = x; then
16866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16867$as_echo "no" >&6; }
16868    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16869  fi
16870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16871$as_echo "$MSVCR_DLL" >&6; }
16872
16873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16874
16875  # Input might be given as Windows format, start by converting to
16876  # unix format.
16877  path="$MSVCR_DLL"
16878  new_path=`$CYGPATH -u "$path"`
16879
16880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16883  # "foo.exe" is OK but "foo" is an error.
16884  #
16885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16886  # It is also a way to make sure we got the proper file name for the real test later on.
16887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16888  if test "x$test_shortpath" = x; then
16889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16890$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16891    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16892  fi
16893
16894  # Call helper function which possibly converts this using DOS-style short mode.
16895  # If so, the updated path is stored in $new_path.
16896
16897  input_path="$new_path"
16898  # Check if we need to convert this using DOS-style short mode. If the path
16899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16900  # take no chances and rewrite it.
16901  # Note: m4 eats our [], so we need to use [ and ] instead.
16902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16903  if test "x$has_forbidden_chars" != x; then
16904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16908      # Going to short mode and back again did indeed matter. Since short mode is
16909      # case insensitive, let's make it lowercase to improve readability.
16910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16911      # Now convert it back to Unix-stile (cygpath)
16912      input_path=`$CYGPATH -u "$shortmode_path"`
16913      new_path="$input_path"
16914    fi
16915  fi
16916
16917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16918  if test "x$test_cygdrive_prefix" = x; then
16919    # As a simple fix, exclude /usr/bin since it's not a real path.
16920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16922      # a path prefixed by /cygdrive for fixpath to work.
16923      new_path="$CYGWIN_ROOT_PATH$input_path"
16924    fi
16925  fi
16926
16927
16928  if test "x$path" != "x$new_path"; then
16929    MSVCR_DLL="$new_path"
16930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16931$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16932  fi
16933
16934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16935
16936  path="$MSVCR_DLL"
16937  has_colon=`$ECHO $path | $GREP ^.:`
16938  new_path="$path"
16939  if test "x$has_colon" = x; then
16940    # Not in mixed or Windows style, start by that.
16941    new_path=`cmd //c echo $path`
16942  fi
16943
16944
16945  input_path="$new_path"
16946  # Check if we need to convert this using DOS-style short mode. If the path
16947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16948  # take no chances and rewrite it.
16949  # Note: m4 eats our [], so we need to use [ and ] instead.
16950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16951  if test "x$has_forbidden_chars" != x; then
16952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16954  fi
16955
16956
16957  windows_path="$new_path"
16958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16959    unix_path=`$CYGPATH -u "$windows_path"`
16960    new_path="$unix_path"
16961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16963    new_path="$unix_path"
16964  fi
16965
16966  if test "x$path" != "x$new_path"; then
16967    MSVCR_DLL="$new_path"
16968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16969$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16970  fi
16971
16972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16974
16975  else
16976    # We're on a posix platform. Hooray! :)
16977    path="$MSVCR_DLL"
16978
16979    if test ! -f "$path" && test ! -d "$path"; then
16980      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16981    fi
16982
16983    has_space=`$ECHO "$path" | $GREP " "`
16984    if test "x$has_space" != x; then
16985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16986$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16987      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16988    fi
16989  fi
16990
16991
16992
16993
16994# Check whether --with-dxsdk was given.
16995if test "${with_dxsdk+set}" = set; then :
16996  withval=$with_dxsdk;
16997fi
16998
16999
17000# Check whether --with-dxsdk-lib was given.
17001if test "${with_dxsdk_lib+set}" = set; then :
17002  withval=$with_dxsdk_lib;
17003fi
17004
17005
17006# Check whether --with-dxsdk-include was given.
17007if test "${with_dxsdk_include+set}" = set; then :
17008  withval=$with_dxsdk_include;
17009fi
17010
17011
17012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17013$as_echo_n "checking for DirectX SDK... " >&6; }
17014
17015  if test "x$with_dxsdk" != x; then
17016    dxsdk_path="$with_dxsdk"
17017  elif test "x$DXSDK_DIR" != x; then
17018    dxsdk_path="$DXSDK_DIR"
17019  elif test -d "C:/DXSDK"; then
17020    dxsdk_path="C:/DXSDK"
17021  else
17022    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17023  fi
17024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17025$as_echo "$dxsdk_path" >&6; }
17026
17027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17028
17029  # Input might be given as Windows format, start by converting to
17030  # unix format.
17031  path="$dxsdk_path"
17032  new_path=`$CYGPATH -u "$path"`
17033
17034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17037  # "foo.exe" is OK but "foo" is an error.
17038  #
17039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17040  # It is also a way to make sure we got the proper file name for the real test later on.
17041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17042  if test "x$test_shortpath" = x; then
17043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17044$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17045    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17046  fi
17047
17048  # Call helper function which possibly converts this using DOS-style short mode.
17049  # If so, the updated path is stored in $new_path.
17050
17051  input_path="$new_path"
17052  # Check if we need to convert this using DOS-style short mode. If the path
17053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17054  # take no chances and rewrite it.
17055  # Note: m4 eats our [], so we need to use [ and ] instead.
17056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17057  if test "x$has_forbidden_chars" != x; then
17058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17062      # Going to short mode and back again did indeed matter. Since short mode is
17063      # case insensitive, let's make it lowercase to improve readability.
17064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17065      # Now convert it back to Unix-stile (cygpath)
17066      input_path=`$CYGPATH -u "$shortmode_path"`
17067      new_path="$input_path"
17068    fi
17069  fi
17070
17071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17072  if test "x$test_cygdrive_prefix" = x; then
17073    # As a simple fix, exclude /usr/bin since it's not a real path.
17074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17076      # a path prefixed by /cygdrive for fixpath to work.
17077      new_path="$CYGWIN_ROOT_PATH$input_path"
17078    fi
17079  fi
17080
17081
17082  if test "x$path" != "x$new_path"; then
17083    dxsdk_path="$new_path"
17084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17085$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17086  fi
17087
17088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17089
17090  path="$dxsdk_path"
17091  has_colon=`$ECHO $path | $GREP ^.:`
17092  new_path="$path"
17093  if test "x$has_colon" = x; then
17094    # Not in mixed or Windows style, start by that.
17095    new_path=`cmd //c echo $path`
17096  fi
17097
17098
17099  input_path="$new_path"
17100  # Check if we need to convert this using DOS-style short mode. If the path
17101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17102  # take no chances and rewrite it.
17103  # Note: m4 eats our [], so we need to use [ and ] instead.
17104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17105  if test "x$has_forbidden_chars" != x; then
17106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17108  fi
17109
17110
17111  windows_path="$new_path"
17112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17113    unix_path=`$CYGPATH -u "$windows_path"`
17114    new_path="$unix_path"
17115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17117    new_path="$unix_path"
17118  fi
17119
17120  if test "x$path" != "x$new_path"; then
17121    dxsdk_path="$new_path"
17122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17123$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17124  fi
17125
17126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17128
17129  else
17130    # We're on a posix platform. Hooray! :)
17131    path="$dxsdk_path"
17132
17133    if test ! -f "$path" && test ! -d "$path"; then
17134      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17135    fi
17136
17137    has_space=`$ECHO "$path" | $GREP " "`
17138    if test "x$has_space" != x; then
17139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17140$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17141      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17142    fi
17143  fi
17144
17145
17146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17147$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17148  if test "x$with_dxsdk_lib" != x; then
17149    DXSDK_LIB_PATH="$with_dxsdk_lib"
17150  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17151    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17152  else
17153    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17154  fi
17155  # dsound.lib is linked to in jsoundds
17156  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17157    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17158  fi
17159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17160$as_echo "$DXSDK_LIB_PATH" >&6; }
17161
17162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17163
17164  # Input might be given as Windows format, start by converting to
17165  # unix format.
17166  path="$DXSDK_LIB_PATH"
17167  new_path=`$CYGPATH -u "$path"`
17168
17169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17172  # "foo.exe" is OK but "foo" is an error.
17173  #
17174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17175  # It is also a way to make sure we got the proper file name for the real test later on.
17176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17177  if test "x$test_shortpath" = x; then
17178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17179$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17180    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17181  fi
17182
17183  # Call helper function which possibly converts this using DOS-style short mode.
17184  # If so, the updated path is stored in $new_path.
17185
17186  input_path="$new_path"
17187  # Check if we need to convert this using DOS-style short mode. If the path
17188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17189  # take no chances and rewrite it.
17190  # Note: m4 eats our [], so we need to use [ and ] instead.
17191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17192  if test "x$has_forbidden_chars" != x; then
17193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17197      # Going to short mode and back again did indeed matter. Since short mode is
17198      # case insensitive, let's make it lowercase to improve readability.
17199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17200      # Now convert it back to Unix-stile (cygpath)
17201      input_path=`$CYGPATH -u "$shortmode_path"`
17202      new_path="$input_path"
17203    fi
17204  fi
17205
17206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17207  if test "x$test_cygdrive_prefix" = x; then
17208    # As a simple fix, exclude /usr/bin since it's not a real path.
17209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17211      # a path prefixed by /cygdrive for fixpath to work.
17212      new_path="$CYGWIN_ROOT_PATH$input_path"
17213    fi
17214  fi
17215
17216
17217  if test "x$path" != "x$new_path"; then
17218    DXSDK_LIB_PATH="$new_path"
17219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17220$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17221  fi
17222
17223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17224
17225  path="$DXSDK_LIB_PATH"
17226  has_colon=`$ECHO $path | $GREP ^.:`
17227  new_path="$path"
17228  if test "x$has_colon" = x; then
17229    # Not in mixed or Windows style, start by that.
17230    new_path=`cmd //c echo $path`
17231  fi
17232
17233
17234  input_path="$new_path"
17235  # Check if we need to convert this using DOS-style short mode. If the path
17236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17237  # take no chances and rewrite it.
17238  # Note: m4 eats our [], so we need to use [ and ] instead.
17239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17240  if test "x$has_forbidden_chars" != x; then
17241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17243  fi
17244
17245
17246  windows_path="$new_path"
17247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17248    unix_path=`$CYGPATH -u "$windows_path"`
17249    new_path="$unix_path"
17250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17252    new_path="$unix_path"
17253  fi
17254
17255  if test "x$path" != "x$new_path"; then
17256    DXSDK_LIB_PATH="$new_path"
17257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17258$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17259  fi
17260
17261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17263
17264  else
17265    # We're on a posix platform. Hooray! :)
17266    path="$DXSDK_LIB_PATH"
17267
17268    if test ! -f "$path" && test ! -d "$path"; then
17269      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17270    fi
17271
17272    has_space=`$ECHO "$path" | $GREP " "`
17273    if test "x$has_space" != x; then
17274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17275$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17276      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17277    fi
17278  fi
17279
17280
17281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17282$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17283  if test "x$with_dxsdk_include" != x; then
17284    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17285  else
17286    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17287  fi
17288  # dsound.h is included in jsoundds
17289  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17290    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17291  fi
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17293$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17294
17295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17296
17297  # Input might be given as Windows format, start by converting to
17298  # unix format.
17299  path="$DXSDK_INCLUDE_PATH"
17300  new_path=`$CYGPATH -u "$path"`
17301
17302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17305  # "foo.exe" is OK but "foo" is an error.
17306  #
17307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17308  # It is also a way to make sure we got the proper file name for the real test later on.
17309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17310  if test "x$test_shortpath" = x; then
17311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17312$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17313    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17314  fi
17315
17316  # Call helper function which possibly converts this using DOS-style short mode.
17317  # If so, the updated path is stored in $new_path.
17318
17319  input_path="$new_path"
17320  # Check if we need to convert this using DOS-style short mode. If the path
17321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17322  # take no chances and rewrite it.
17323  # Note: m4 eats our [], so we need to use [ and ] instead.
17324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17325  if test "x$has_forbidden_chars" != x; then
17326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17330      # Going to short mode and back again did indeed matter. Since short mode is
17331      # case insensitive, let's make it lowercase to improve readability.
17332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17333      # Now convert it back to Unix-stile (cygpath)
17334      input_path=`$CYGPATH -u "$shortmode_path"`
17335      new_path="$input_path"
17336    fi
17337  fi
17338
17339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17340  if test "x$test_cygdrive_prefix" = x; then
17341    # As a simple fix, exclude /usr/bin since it's not a real path.
17342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17344      # a path prefixed by /cygdrive for fixpath to work.
17345      new_path="$CYGWIN_ROOT_PATH$input_path"
17346    fi
17347  fi
17348
17349
17350  if test "x$path" != "x$new_path"; then
17351    DXSDK_INCLUDE_PATH="$new_path"
17352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17353$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17354  fi
17355
17356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17357
17358  path="$DXSDK_INCLUDE_PATH"
17359  has_colon=`$ECHO $path | $GREP ^.:`
17360  new_path="$path"
17361  if test "x$has_colon" = x; then
17362    # Not in mixed or Windows style, start by that.
17363    new_path=`cmd //c echo $path`
17364  fi
17365
17366
17367  input_path="$new_path"
17368  # Check if we need to convert this using DOS-style short mode. If the path
17369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17370  # take no chances and rewrite it.
17371  # Note: m4 eats our [], so we need to use [ and ] instead.
17372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17373  if test "x$has_forbidden_chars" != x; then
17374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17376  fi
17377
17378
17379  windows_path="$new_path"
17380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17381    unix_path=`$CYGPATH -u "$windows_path"`
17382    new_path="$unix_path"
17383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17385    new_path="$unix_path"
17386  fi
17387
17388  if test "x$path" != "x$new_path"; then
17389    DXSDK_INCLUDE_PATH="$new_path"
17390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17391$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17392  fi
17393
17394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17396
17397  else
17398    # We're on a posix platform. Hooray! :)
17399    path="$DXSDK_INCLUDE_PATH"
17400
17401    if test ! -f "$path" && test ! -d "$path"; then
17402      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17403    fi
17404
17405    has_space=`$ECHO "$path" | $GREP " "`
17406    if test "x$has_space" != x; then
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17408$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17410    fi
17411  fi
17412
17413
17414
17415
17416  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17417
17418fi
17419
17420
17421
17422# If --build AND --host is set, then the configure script will find any
17423# cross compilation tools in the PATH. Cross compilation tools
17424# follows the cross compilation standard where they are prefixed with ${host}.
17425# For example the binary i686-sun-solaris2.10-gcc
17426# will cross compile for i686-sun-solaris2.10
17427# If neither of build and host is not set, then build=host and the
17428# default compiler found in the path will be used.
17429# Setting only --host, does not seem to be really supported.
17430# Please set both --build and --host if you want to cross compile.
17431
17432if test "x$COMPILE_TYPE" = "xcross"; then
17433    # Now we to find a C/C++ compiler that can build executables for the build
17434    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17435    # once. Also, we need to do this before adding a tools dir to the path,
17436    # otherwise we might pick up cross-compilers which don't use standard naming.
17437    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17438    # to wait until they are properly discovered.
17439    for ac_prog in cl cc gcc
17440do
17441  # Extract the first word of "$ac_prog", so it can be a program name with args.
17442set dummy $ac_prog; ac_word=$2
17443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17444$as_echo_n "checking for $ac_word... " >&6; }
17445if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17446  $as_echo_n "(cached) " >&6
17447else
17448  case $BUILD_CC in
17449  [\\/]* | ?:[\\/]*)
17450  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17451  ;;
17452  *)
17453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17454for as_dir in $PATH
17455do
17456  IFS=$as_save_IFS
17457  test -z "$as_dir" && as_dir=.
17458    for ac_exec_ext in '' $ac_executable_extensions; do
17459  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17460    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17462    break 2
17463  fi
17464done
17465  done
17466IFS=$as_save_IFS
17467
17468  ;;
17469esac
17470fi
17471BUILD_CC=$ac_cv_path_BUILD_CC
17472if test -n "$BUILD_CC"; then
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17474$as_echo "$BUILD_CC" >&6; }
17475else
17476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17477$as_echo "no" >&6; }
17478fi
17479
17480
17481  test -n "$BUILD_CC" && break
17482done
17483
17484
17485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17486
17487  # First separate the path from the arguments. This will split at the first
17488  # space.
17489  complete="$BUILD_CC"
17490  path="${complete%% *}"
17491  tmp="$complete EOL"
17492  arguments="${tmp#* }"
17493
17494  # Input might be given as Windows format, start by converting to
17495  # unix format.
17496  new_path=`$CYGPATH -u "$path"`
17497
17498  # Now try to locate executable using which
17499  new_path=`$WHICH "$new_path" 2> /dev/null`
17500  # bat and cmd files are not always considered executable in cygwin causing which
17501  # to not find them
17502  if test "x$new_path" = x \
17503           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17504           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17505    new_path=`$CYGPATH -u "$path"`
17506  fi
17507  if test "x$new_path" = x; then
17508    # Oops. Which didn't find the executable.
17509    # The splitting of arguments from the executable at a space might have been incorrect,
17510    # since paths with space are more likely in Windows. Give it another try with the whole
17511    # argument.
17512    path="$complete"
17513    arguments="EOL"
17514    new_path=`$CYGPATH -u "$path"`
17515    new_path=`$WHICH "$new_path" 2> /dev/null`
17516    # bat and cmd files are not always considered executable in cygwin causing which
17517    # to not find them
17518    if test "x$new_path" = x \
17519             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17520             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17521      new_path=`$CYGPATH -u "$path"`
17522    fi
17523    if test "x$new_path" = x; then
17524      # It's still not found. Now this is an unrecoverable error.
17525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17526$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17527      has_space=`$ECHO "$complete" | $GREP " "`
17528      if test "x$has_space" != x; then
17529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17531      fi
17532      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17533    fi
17534  fi
17535
17536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17539  # "foo.exe" is OK but "foo" is an error.
17540  #
17541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17542  # It is also a way to make sure we got the proper file name for the real test later on.
17543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17544  if test "x$test_shortpath" = x; then
17545    # Short path failed, file does not exist as specified.
17546    # Try adding .exe or .cmd
17547    if test -f "${new_path}.exe"; then
17548       input_to_shortpath="${new_path}.exe"
17549    elif test -f "${new_path}.cmd"; then
17550       input_to_shortpath="${new_path}.cmd"
17551    else
17552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17553$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17556      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17557    fi
17558  else
17559    input_to_shortpath="$new_path"
17560  fi
17561
17562  # Call helper function which possibly converts this using DOS-style short mode.
17563  # If so, the updated path is stored in $new_path.
17564  new_path="$input_to_shortpath"
17565
17566  input_path="$input_to_shortpath"
17567  # Check if we need to convert this using DOS-style short mode. If the path
17568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17569  # take no chances and rewrite it.
17570  # Note: m4 eats our [], so we need to use [ and ] instead.
17571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17572  if test "x$has_forbidden_chars" != x; then
17573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17577      # Going to short mode and back again did indeed matter. Since short mode is
17578      # case insensitive, let's make it lowercase to improve readability.
17579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17580      # Now convert it back to Unix-stile (cygpath)
17581      input_path=`$CYGPATH -u "$shortmode_path"`
17582      new_path="$input_path"
17583    fi
17584  fi
17585
17586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17587  if test "x$test_cygdrive_prefix" = x; then
17588    # As a simple fix, exclude /usr/bin since it's not a real path.
17589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17591      # a path prefixed by /cygdrive for fixpath to work.
17592      new_path="$CYGWIN_ROOT_PATH$input_path"
17593    fi
17594  fi
17595
17596  # remove trailing .exe if any
17597  new_path="${new_path/%.exe/}"
17598
17599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17600
17601  # First separate the path from the arguments. This will split at the first
17602  # space.
17603  complete="$BUILD_CC"
17604  path="${complete%% *}"
17605  tmp="$complete EOL"
17606  arguments="${tmp#* }"
17607
17608  # Input might be given as Windows format, start by converting to
17609  # unix format.
17610  new_path="$path"
17611
17612  windows_path="$new_path"
17613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17614    unix_path=`$CYGPATH -u "$windows_path"`
17615    new_path="$unix_path"
17616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17618    new_path="$unix_path"
17619  fi
17620
17621
17622  # Now try to locate executable using which
17623  new_path=`$WHICH "$new_path" 2> /dev/null`
17624
17625  if test "x$new_path" = x; then
17626    # Oops. Which didn't find the executable.
17627    # The splitting of arguments from the executable at a space might have been incorrect,
17628    # since paths with space are more likely in Windows. Give it another try with the whole
17629    # argument.
17630    path="$complete"
17631    arguments="EOL"
17632    new_path="$path"
17633
17634  windows_path="$new_path"
17635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17636    unix_path=`$CYGPATH -u "$windows_path"`
17637    new_path="$unix_path"
17638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17640    new_path="$unix_path"
17641  fi
17642
17643
17644    new_path=`$WHICH "$new_path" 2> /dev/null`
17645
17646    if test "x$new_path" = x; then
17647      # It's still not found. Now this is an unrecoverable error.
17648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17649$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17650      has_space=`$ECHO "$complete" | $GREP " "`
17651      if test "x$has_space" != x; then
17652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17654      fi
17655      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17656    fi
17657  fi
17658
17659  # Now new_path has a complete unix path to the binary
17660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17661    # Keep paths in /bin as-is, but remove trailing .exe if any
17662    new_path="${new_path/%.exe/}"
17663    # Do not save /bin paths to all_fixpath_prefixes!
17664  else
17665    # Not in mixed or Windows style, start by that.
17666    new_path=`cmd //c echo $new_path`
17667
17668  input_path="$new_path"
17669  # Check if we need to convert this using DOS-style short mode. If the path
17670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17671  # take no chances and rewrite it.
17672  # Note: m4 eats our [], so we need to use [ and ] instead.
17673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17674  if test "x$has_forbidden_chars" != x; then
17675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17677  fi
17678
17679    # Output is in $new_path
17680
17681  windows_path="$new_path"
17682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17683    unix_path=`$CYGPATH -u "$windows_path"`
17684    new_path="$unix_path"
17685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17687    new_path="$unix_path"
17688  fi
17689
17690    # remove trailing .exe if any
17691    new_path="${new_path/%.exe/}"
17692
17693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17695  fi
17696
17697  else
17698    # We're on a posix platform. Hooray! :)
17699    # First separate the path from the arguments. This will split at the first
17700    # space.
17701    complete="$BUILD_CC"
17702    path="${complete%% *}"
17703    tmp="$complete EOL"
17704    arguments="${tmp#* }"
17705
17706    # Cannot rely on the command "which" here since it doesn't always work.
17707    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17708    if test -z "$is_absolute_path"; then
17709      # Path to executable is not absolute. Find it.
17710      IFS_save="$IFS"
17711      IFS=:
17712      for p in $PATH; do
17713        if test -f "$p/$path" && test -x "$p/$path"; then
17714          new_path="$p/$path"
17715          break
17716        fi
17717      done
17718      IFS="$IFS_save"
17719    else
17720      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17721$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17722      new_path="$path"
17723    fi
17724
17725    if test "x$new_path" = x; then
17726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17727$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17728        has_space=`$ECHO "$complete" | $GREP " "`
17729        if test "x$has_space" != x; then
17730          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17731$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17732        fi
17733        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17734      fi
17735  fi
17736
17737      # Now join together the path and the arguments once again
17738      if test "x$arguments" != xEOL; then
17739        new_complete="$new_path ${arguments% *}"
17740      else
17741        new_complete="$new_path"
17742      fi
17743
17744  if test "x$complete" != "x$new_complete"; then
17745      BUILD_CC="$new_complete"
17746      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17747$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17748    fi
17749
17750    for ac_prog in cl CC g++
17751do
17752  # Extract the first word of "$ac_prog", so it can be a program name with args.
17753set dummy $ac_prog; ac_word=$2
17754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17755$as_echo_n "checking for $ac_word... " >&6; }
17756if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17757  $as_echo_n "(cached) " >&6
17758else
17759  case $BUILD_CXX in
17760  [\\/]* | ?:[\\/]*)
17761  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17762  ;;
17763  *)
17764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17765for as_dir in $PATH
17766do
17767  IFS=$as_save_IFS
17768  test -z "$as_dir" && as_dir=.
17769    for ac_exec_ext in '' $ac_executable_extensions; do
17770  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17771    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17773    break 2
17774  fi
17775done
17776  done
17777IFS=$as_save_IFS
17778
17779  ;;
17780esac
17781fi
17782BUILD_CXX=$ac_cv_path_BUILD_CXX
17783if test -n "$BUILD_CXX"; then
17784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17785$as_echo "$BUILD_CXX" >&6; }
17786else
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17788$as_echo "no" >&6; }
17789fi
17790
17791
17792  test -n "$BUILD_CXX" && break
17793done
17794
17795
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797
17798  # First separate the path from the arguments. This will split at the first
17799  # space.
17800  complete="$BUILD_CXX"
17801  path="${complete%% *}"
17802  tmp="$complete EOL"
17803  arguments="${tmp#* }"
17804
17805  # Input might be given as Windows format, start by converting to
17806  # unix format.
17807  new_path=`$CYGPATH -u "$path"`
17808
17809  # Now try to locate executable using which
17810  new_path=`$WHICH "$new_path" 2> /dev/null`
17811  # bat and cmd files are not always considered executable in cygwin causing which
17812  # to not find them
17813  if test "x$new_path" = x \
17814           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17815           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17816    new_path=`$CYGPATH -u "$path"`
17817  fi
17818  if test "x$new_path" = x; then
17819    # Oops. Which didn't find the executable.
17820    # The splitting of arguments from the executable at a space might have been incorrect,
17821    # since paths with space are more likely in Windows. Give it another try with the whole
17822    # argument.
17823    path="$complete"
17824    arguments="EOL"
17825    new_path=`$CYGPATH -u "$path"`
17826    new_path=`$WHICH "$new_path" 2> /dev/null`
17827    # bat and cmd files are not always considered executable in cygwin causing which
17828    # to not find them
17829    if test "x$new_path" = x \
17830             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17831             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17832      new_path=`$CYGPATH -u "$path"`
17833    fi
17834    if test "x$new_path" = x; then
17835      # It's still not found. Now this is an unrecoverable error.
17836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17837$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17838      has_space=`$ECHO "$complete" | $GREP " "`
17839      if test "x$has_space" != x; then
17840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17842      fi
17843      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17844    fi
17845  fi
17846
17847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17850  # "foo.exe" is OK but "foo" is an error.
17851  #
17852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17853  # It is also a way to make sure we got the proper file name for the real test later on.
17854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17855  if test "x$test_shortpath" = x; then
17856    # Short path failed, file does not exist as specified.
17857    # Try adding .exe or .cmd
17858    if test -f "${new_path}.exe"; then
17859       input_to_shortpath="${new_path}.exe"
17860    elif test -f "${new_path}.cmd"; then
17861       input_to_shortpath="${new_path}.cmd"
17862    else
17863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17864$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17865      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17866$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17867      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17868    fi
17869  else
17870    input_to_shortpath="$new_path"
17871  fi
17872
17873  # Call helper function which possibly converts this using DOS-style short mode.
17874  # If so, the updated path is stored in $new_path.
17875  new_path="$input_to_shortpath"
17876
17877  input_path="$input_to_shortpath"
17878  # Check if we need to convert this using DOS-style short mode. If the path
17879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17880  # take no chances and rewrite it.
17881  # Note: m4 eats our [], so we need to use [ and ] instead.
17882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17883  if test "x$has_forbidden_chars" != x; then
17884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17888      # Going to short mode and back again did indeed matter. Since short mode is
17889      # case insensitive, let's make it lowercase to improve readability.
17890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17891      # Now convert it back to Unix-stile (cygpath)
17892      input_path=`$CYGPATH -u "$shortmode_path"`
17893      new_path="$input_path"
17894    fi
17895  fi
17896
17897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17898  if test "x$test_cygdrive_prefix" = x; then
17899    # As a simple fix, exclude /usr/bin since it's not a real path.
17900    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17902      # a path prefixed by /cygdrive for fixpath to work.
17903      new_path="$CYGWIN_ROOT_PATH$input_path"
17904    fi
17905  fi
17906
17907  # remove trailing .exe if any
17908  new_path="${new_path/%.exe/}"
17909
17910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17911
17912  # First separate the path from the arguments. This will split at the first
17913  # space.
17914  complete="$BUILD_CXX"
17915  path="${complete%% *}"
17916  tmp="$complete EOL"
17917  arguments="${tmp#* }"
17918
17919  # Input might be given as Windows format, start by converting to
17920  # unix format.
17921  new_path="$path"
17922
17923  windows_path="$new_path"
17924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17925    unix_path=`$CYGPATH -u "$windows_path"`
17926    new_path="$unix_path"
17927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17929    new_path="$unix_path"
17930  fi
17931
17932
17933  # Now try to locate executable using which
17934  new_path=`$WHICH "$new_path" 2> /dev/null`
17935
17936  if test "x$new_path" = x; then
17937    # Oops. Which didn't find the executable.
17938    # The splitting of arguments from the executable at a space might have been incorrect,
17939    # since paths with space are more likely in Windows. Give it another try with the whole
17940    # argument.
17941    path="$complete"
17942    arguments="EOL"
17943    new_path="$path"
17944
17945  windows_path="$new_path"
17946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17947    unix_path=`$CYGPATH -u "$windows_path"`
17948    new_path="$unix_path"
17949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17951    new_path="$unix_path"
17952  fi
17953
17954
17955    new_path=`$WHICH "$new_path" 2> /dev/null`
17956
17957    if test "x$new_path" = x; then
17958      # It's still not found. Now this is an unrecoverable error.
17959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17960$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17961      has_space=`$ECHO "$complete" | $GREP " "`
17962      if test "x$has_space" != x; then
17963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17965      fi
17966      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17967    fi
17968  fi
17969
17970  # Now new_path has a complete unix path to the binary
17971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17972    # Keep paths in /bin as-is, but remove trailing .exe if any
17973    new_path="${new_path/%.exe/}"
17974    # Do not save /bin paths to all_fixpath_prefixes!
17975  else
17976    # Not in mixed or Windows style, start by that.
17977    new_path=`cmd //c echo $new_path`
17978
17979  input_path="$new_path"
17980  # Check if we need to convert this using DOS-style short mode. If the path
17981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17982  # take no chances and rewrite it.
17983  # Note: m4 eats our [], so we need to use [ and ] instead.
17984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17985  if test "x$has_forbidden_chars" != x; then
17986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17988  fi
17989
17990    # Output is in $new_path
17991
17992  windows_path="$new_path"
17993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17994    unix_path=`$CYGPATH -u "$windows_path"`
17995    new_path="$unix_path"
17996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17998    new_path="$unix_path"
17999  fi
18000
18001    # remove trailing .exe if any
18002    new_path="${new_path/%.exe/}"
18003
18004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18006  fi
18007
18008  else
18009    # We're on a posix platform. Hooray! :)
18010    # First separate the path from the arguments. This will split at the first
18011    # space.
18012    complete="$BUILD_CXX"
18013    path="${complete%% *}"
18014    tmp="$complete EOL"
18015    arguments="${tmp#* }"
18016
18017    # Cannot rely on the command "which" here since it doesn't always work.
18018    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18019    if test -z "$is_absolute_path"; then
18020      # Path to executable is not absolute. Find it.
18021      IFS_save="$IFS"
18022      IFS=:
18023      for p in $PATH; do
18024        if test -f "$p/$path" && test -x "$p/$path"; then
18025          new_path="$p/$path"
18026          break
18027        fi
18028      done
18029      IFS="$IFS_save"
18030    else
18031      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18032$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18033      new_path="$path"
18034    fi
18035
18036    if test "x$new_path" = x; then
18037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18038$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18039        has_space=`$ECHO "$complete" | $GREP " "`
18040        if test "x$has_space" != x; then
18041          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18043        fi
18044        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18045      fi
18046  fi
18047
18048      # Now join together the path and the arguments once again
18049      if test "x$arguments" != xEOL; then
18050        new_complete="$new_path ${arguments% *}"
18051      else
18052        new_complete="$new_path"
18053      fi
18054
18055  if test "x$complete" != "x$new_complete"; then
18056      BUILD_CXX="$new_complete"
18057      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18058$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18059    fi
18060
18061    # Extract the first word of "ld", so it can be a program name with args.
18062set dummy ld; ac_word=$2
18063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18064$as_echo_n "checking for $ac_word... " >&6; }
18065if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18066  $as_echo_n "(cached) " >&6
18067else
18068  case $BUILD_LD in
18069  [\\/]* | ?:[\\/]*)
18070  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18071  ;;
18072  *)
18073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18074for as_dir in $PATH
18075do
18076  IFS=$as_save_IFS
18077  test -z "$as_dir" && as_dir=.
18078    for ac_exec_ext in '' $ac_executable_extensions; do
18079  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18080    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18082    break 2
18083  fi
18084done
18085  done
18086IFS=$as_save_IFS
18087
18088  ;;
18089esac
18090fi
18091BUILD_LD=$ac_cv_path_BUILD_LD
18092if test -n "$BUILD_LD"; then
18093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18094$as_echo "$BUILD_LD" >&6; }
18095else
18096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18097$as_echo "no" >&6; }
18098fi
18099
18100
18101
18102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18103
18104  # First separate the path from the arguments. This will split at the first
18105  # space.
18106  complete="$BUILD_LD"
18107  path="${complete%% *}"
18108  tmp="$complete EOL"
18109  arguments="${tmp#* }"
18110
18111  # Input might be given as Windows format, start by converting to
18112  # unix format.
18113  new_path=`$CYGPATH -u "$path"`
18114
18115  # Now try to locate executable using which
18116  new_path=`$WHICH "$new_path" 2> /dev/null`
18117  # bat and cmd files are not always considered executable in cygwin causing which
18118  # to not find them
18119  if test "x$new_path" = x \
18120           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18121           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18122    new_path=`$CYGPATH -u "$path"`
18123  fi
18124  if test "x$new_path" = x; then
18125    # Oops. Which didn't find the executable.
18126    # The splitting of arguments from the executable at a space might have been incorrect,
18127    # since paths with space are more likely in Windows. Give it another try with the whole
18128    # argument.
18129    path="$complete"
18130    arguments="EOL"
18131    new_path=`$CYGPATH -u "$path"`
18132    new_path=`$WHICH "$new_path" 2> /dev/null`
18133    # bat and cmd files are not always considered executable in cygwin causing which
18134    # to not find them
18135    if test "x$new_path" = x \
18136             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18137             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18138      new_path=`$CYGPATH -u "$path"`
18139    fi
18140    if test "x$new_path" = x; then
18141      # It's still not found. Now this is an unrecoverable error.
18142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18143$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18144      has_space=`$ECHO "$complete" | $GREP " "`
18145      if test "x$has_space" != x; then
18146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18148      fi
18149      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18150    fi
18151  fi
18152
18153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18156  # "foo.exe" is OK but "foo" is an error.
18157  #
18158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18159  # It is also a way to make sure we got the proper file name for the real test later on.
18160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18161  if test "x$test_shortpath" = x; then
18162    # Short path failed, file does not exist as specified.
18163    # Try adding .exe or .cmd
18164    if test -f "${new_path}.exe"; then
18165       input_to_shortpath="${new_path}.exe"
18166    elif test -f "${new_path}.cmd"; then
18167       input_to_shortpath="${new_path}.cmd"
18168    else
18169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18170$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18171      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18172$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18173      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18174    fi
18175  else
18176    input_to_shortpath="$new_path"
18177  fi
18178
18179  # Call helper function which possibly converts this using DOS-style short mode.
18180  # If so, the updated path is stored in $new_path.
18181  new_path="$input_to_shortpath"
18182
18183  input_path="$input_to_shortpath"
18184  # Check if we need to convert this using DOS-style short mode. If the path
18185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18186  # take no chances and rewrite it.
18187  # Note: m4 eats our [], so we need to use [ and ] instead.
18188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18189  if test "x$has_forbidden_chars" != x; then
18190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18194      # Going to short mode and back again did indeed matter. Since short mode is
18195      # case insensitive, let's make it lowercase to improve readability.
18196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18197      # Now convert it back to Unix-stile (cygpath)
18198      input_path=`$CYGPATH -u "$shortmode_path"`
18199      new_path="$input_path"
18200    fi
18201  fi
18202
18203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18204  if test "x$test_cygdrive_prefix" = x; then
18205    # As a simple fix, exclude /usr/bin since it's not a real path.
18206    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18208      # a path prefixed by /cygdrive for fixpath to work.
18209      new_path="$CYGWIN_ROOT_PATH$input_path"
18210    fi
18211  fi
18212
18213  # remove trailing .exe if any
18214  new_path="${new_path/%.exe/}"
18215
18216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18217
18218  # First separate the path from the arguments. This will split at the first
18219  # space.
18220  complete="$BUILD_LD"
18221  path="${complete%% *}"
18222  tmp="$complete EOL"
18223  arguments="${tmp#* }"
18224
18225  # Input might be given as Windows format, start by converting to
18226  # unix format.
18227  new_path="$path"
18228
18229  windows_path="$new_path"
18230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231    unix_path=`$CYGPATH -u "$windows_path"`
18232    new_path="$unix_path"
18233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18235    new_path="$unix_path"
18236  fi
18237
18238
18239  # Now try to locate executable using which
18240  new_path=`$WHICH "$new_path" 2> /dev/null`
18241
18242  if test "x$new_path" = x; then
18243    # Oops. Which didn't find the executable.
18244    # The splitting of arguments from the executable at a space might have been incorrect,
18245    # since paths with space are more likely in Windows. Give it another try with the whole
18246    # argument.
18247    path="$complete"
18248    arguments="EOL"
18249    new_path="$path"
18250
18251  windows_path="$new_path"
18252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18253    unix_path=`$CYGPATH -u "$windows_path"`
18254    new_path="$unix_path"
18255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18257    new_path="$unix_path"
18258  fi
18259
18260
18261    new_path=`$WHICH "$new_path" 2> /dev/null`
18262
18263    if test "x$new_path" = x; then
18264      # It's still not found. Now this is an unrecoverable error.
18265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18266$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18267      has_space=`$ECHO "$complete" | $GREP " "`
18268      if test "x$has_space" != x; then
18269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18271      fi
18272      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18273    fi
18274  fi
18275
18276  # Now new_path has a complete unix path to the binary
18277  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18278    # Keep paths in /bin as-is, but remove trailing .exe if any
18279    new_path="${new_path/%.exe/}"
18280    # Do not save /bin paths to all_fixpath_prefixes!
18281  else
18282    # Not in mixed or Windows style, start by that.
18283    new_path=`cmd //c echo $new_path`
18284
18285  input_path="$new_path"
18286  # Check if we need to convert this using DOS-style short mode. If the path
18287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18288  # take no chances and rewrite it.
18289  # Note: m4 eats our [], so we need to use [ and ] instead.
18290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18291  if test "x$has_forbidden_chars" != x; then
18292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18294  fi
18295
18296    # Output is in $new_path
18297
18298  windows_path="$new_path"
18299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18300    unix_path=`$CYGPATH -u "$windows_path"`
18301    new_path="$unix_path"
18302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18304    new_path="$unix_path"
18305  fi
18306
18307    # remove trailing .exe if any
18308    new_path="${new_path/%.exe/}"
18309
18310    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18311    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18312  fi
18313
18314  else
18315    # We're on a posix platform. Hooray! :)
18316    # First separate the path from the arguments. This will split at the first
18317    # space.
18318    complete="$BUILD_LD"
18319    path="${complete%% *}"
18320    tmp="$complete EOL"
18321    arguments="${tmp#* }"
18322
18323    # Cannot rely on the command "which" here since it doesn't always work.
18324    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18325    if test -z "$is_absolute_path"; then
18326      # Path to executable is not absolute. Find it.
18327      IFS_save="$IFS"
18328      IFS=:
18329      for p in $PATH; do
18330        if test -f "$p/$path" && test -x "$p/$path"; then
18331          new_path="$p/$path"
18332          break
18333        fi
18334      done
18335      IFS="$IFS_save"
18336    else
18337      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18338$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18339      new_path="$path"
18340    fi
18341
18342    if test "x$new_path" = x; then
18343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18344$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18345        has_space=`$ECHO "$complete" | $GREP " "`
18346        if test "x$has_space" != x; then
18347          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18348$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18349        fi
18350        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18351      fi
18352  fi
18353
18354      # Now join together the path and the arguments once again
18355      if test "x$arguments" != xEOL; then
18356        new_complete="$new_path ${arguments% *}"
18357      else
18358        new_complete="$new_path"
18359      fi
18360
18361  if test "x$complete" != "x$new_complete"; then
18362      BUILD_LD="$new_complete"
18363      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18364$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18365    fi
18366
18367fi
18368
18369
18370
18371
18372# If a devkit is found on the builddeps server, then prepend its path to the
18373# PATH variable. If there are cross compilers available in the devkit, these
18374# will be found by AC_PROG_CC et al.
18375DEVKIT=
18376
18377
18378    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18379        # Source the builddeps file again, to make sure it uses the latest variables!
18380        . $builddepsfile
18381        # Look for a target and build machine specific resource!
18382        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18383        if test "x$resource" = x; then
18384            # Ok, lets instead look for a target specific resource
18385            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18386        fi
18387        if test "x$resource" = x; then
18388            # Ok, lets instead look for a build specific resource
18389            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18390        fi
18391        if test "x$resource" = x; then
18392            # Ok, lets instead look for a generic resource
18393            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18394            resource=${builddep_devkit}
18395        fi
18396        if test "x$resource" != x; then
18397            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18398$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18399	    # If the resource in the builddeps.conf file is an existing directory,
18400	    # for example /java/linux/cups
18401	    if test -d ${resource}; then
18402	       depdir=${resource}
18403	    else
18404
18405# devkit is for example mymodule
18406# $resource is for example libs/general/libmymod_1_2_3.zip
18407# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18408# $with_builddeps_dir is for example /localhome/builddeps
18409# depdir is the name of the variable into which we store the depdir, eg MYMOD
18410# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18411# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18412    filename=`basename $resource`
18413    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18414    filebase=${filename%%.*}
18415    extension=${filename#*.}
18416    installdir=$with_builddeps_dir/$filebase
18417    if test ! -f $installdir/$filename.unpacked; then
18418        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18419$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18420        if test ! -d $installdir; then
18421            mkdir -p $installdir
18422        fi
18423        if test ! -d $installdir; then
18424            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18425        fi
18426        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18427        touch $tmpfile
18428        if test ! -f $tmpfile; then
18429            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18430        fi
18431
18432    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18433    # $tmpfile is the local file name for the downloaded file.
18434    VALID_TOOL=no
18435    if test "x$BDEPS_FTP" = xwget; then
18436       VALID_TOOL=yes
18437       wget -O $tmpfile $with_builddeps_server/$resource
18438    fi
18439    if test "x$BDEPS_FTP" = xlftp; then
18440       VALID_TOOL=yes
18441       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18442    fi
18443    if test "x$BDEPS_FTP" = xftp; then
18444        VALID_TOOL=yes
18445        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18446        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18447        FTPUSERPWD=${FTPSERVER%%@*}
18448        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18449            FTPUSER=${userpwd%%:*}
18450            FTPPWD=${userpwd#*@}
18451            FTPSERVER=${FTPSERVER#*@}
18452        else
18453            FTPUSER=ftp
18454            FTPPWD=ftp
18455        fi
18456        # the "pass" command does not work on some
18457        # ftp clients (read ftp.exe) but if it works,
18458        # passive mode is better!
18459        (\
18460            echo "user $FTPUSER $FTPPWD"        ;\
18461            echo "pass"                         ;\
18462            echo "bin"                          ;\
18463            echo "get $FTPPATH $tmpfile"              ;\
18464        ) | ftp -in $FTPSERVER
18465    fi
18466    if test "x$VALID_TOOL" != xyes; then
18467       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18468    fi
18469
18470        mv $tmpfile $installdir/$filename
18471        if test ! -s $installdir/$filename; then
18472            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18473        fi
18474        case "$extension" in
18475            zip)  echo "Unzipping $installdir/$filename..."
18476               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18477            ;;
18478            tar.gz) echo "Untaring $installdir/$filename..."
18479               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18480            ;;
18481            tgz) echo "Untaring $installdir/$filename..."
18482               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18483            ;;
18484            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18485            ;;
18486        esac
18487    fi
18488    if test -f $installdir/$filename.unpacked; then
18489        depdir=$installdir
18490    fi
18491
18492	    fi
18493            # Source the builddeps file again, because in the previous command, the depdir
18494            # was updated to point at the current build dependency install directory.
18495            . $builddepsfile
18496            # Now extract variables from the builddeps.conf files.
18497            theroot=${builddep_devkit_ROOT}
18498            thecflags=${builddep_devkit_CFLAGS}
18499            thelibs=${builddep_devkit_LIBS}
18500            if test "x$depdir" = x; then
18501                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18502            fi
18503            DEVKIT=$depdir
18504            if test "x$theroot" != x; then
18505               DEVKIT="$theroot"
18506            fi
18507            if test "x$thecflags" != x; then
18508               DEVKIT_CFLAGS="$thecflags"
18509            fi
18510            if test "x$thelibs" != x; then
18511               DEVKIT_LIBS="$thelibs"
18512            fi
18513            # Found devkit
18514                     PATH="$DEVKIT/bin:$PATH"
18515                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18516                     if test "x$x_includes" = "xNONE"; then
18517                         x_includes="$SYS_ROOT/usr/include/X11"
18518                     fi
18519                     if test "x$x_libraries" = "xNONE"; then
18520                         x_libraries="$SYS_ROOT/usr/lib"
18521                     fi
18522
18523
18524        fi
18525
18526    fi
18527
18528
18529if test "x$SYS_ROOT" != "x/" ; then
18530    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18531    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18532    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18533    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18534    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18535    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18536fi
18537
18538# Store the CFLAGS etal passed to the configure script.
18539ORG_CFLAGS="$CFLAGS"
18540ORG_CXXFLAGS="$CXXFLAGS"
18541ORG_OBJCFLAGS="$OBJCFLAGS"
18542
18543# autoconf magic only relies on PATH, so update it if tools dir is specified
18544OLD_PATH="$PATH"
18545if test "x$TOOLS_DIR" != x; then
18546  PATH=$TOOLS_DIR:$PATH
18547fi
18548
18549
18550### Locate C compiler (CC)
18551
18552# On windows, only cl.exe is supported.
18553# On Solaris, cc is preferred to gcc.
18554# Elsewhere, gcc is preferred to cc.
18555
18556if test "x$CC" != x; then
18557  COMPILER_CHECK_LIST="$CC"
18558elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18559  COMPILER_CHECK_LIST="cl"
18560elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18561  COMPILER_CHECK_LIST="cc gcc"
18562else
18563  COMPILER_CHECK_LIST="gcc cc"
18564fi
18565
18566
18567  COMPILER_NAME=C
18568
18569  CC=
18570  # If TOOLS_DIR is set, check for all compiler names in there first
18571  # before checking the rest of the PATH.
18572  if test -n "$TOOLS_DIR"; then
18573    PATH_save="$PATH"
18574    PATH="$TOOLS_DIR"
18575    for ac_prog in $COMPILER_CHECK_LIST
18576do
18577  # Extract the first word of "$ac_prog", so it can be a program name with args.
18578set dummy $ac_prog; ac_word=$2
18579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18580$as_echo_n "checking for $ac_word... " >&6; }
18581if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18582  $as_echo_n "(cached) " >&6
18583else
18584  case $TOOLS_DIR_CC in
18585  [\\/]* | ?:[\\/]*)
18586  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18587  ;;
18588  *)
18589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18590for as_dir in $PATH
18591do
18592  IFS=$as_save_IFS
18593  test -z "$as_dir" && as_dir=.
18594    for ac_exec_ext in '' $ac_executable_extensions; do
18595  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18596    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18598    break 2
18599  fi
18600done
18601  done
18602IFS=$as_save_IFS
18603
18604  ;;
18605esac
18606fi
18607TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18608if test -n "$TOOLS_DIR_CC"; then
18609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18610$as_echo "$TOOLS_DIR_CC" >&6; }
18611else
18612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18613$as_echo "no" >&6; }
18614fi
18615
18616
18617  test -n "$TOOLS_DIR_CC" && break
18618done
18619
18620    CC=$TOOLS_DIR_CC
18621    PATH="$PATH_save"
18622  fi
18623
18624  # AC_PATH_PROGS can't be run multiple times with the same variable,
18625  # so create a new name for this run.
18626  if test "x$CC" = x; then
18627    for ac_prog in $COMPILER_CHECK_LIST
18628do
18629  # Extract the first word of "$ac_prog", so it can be a program name with args.
18630set dummy $ac_prog; ac_word=$2
18631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18632$as_echo_n "checking for $ac_word... " >&6; }
18633if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18634  $as_echo_n "(cached) " >&6
18635else
18636  case $POTENTIAL_CC in
18637  [\\/]* | ?:[\\/]*)
18638  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18639  ;;
18640  *)
18641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18642for as_dir in $PATH
18643do
18644  IFS=$as_save_IFS
18645  test -z "$as_dir" && as_dir=.
18646    for ac_exec_ext in '' $ac_executable_extensions; do
18647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18648    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18650    break 2
18651  fi
18652done
18653  done
18654IFS=$as_save_IFS
18655
18656  ;;
18657esac
18658fi
18659POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18660if test -n "$POTENTIAL_CC"; then
18661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18662$as_echo "$POTENTIAL_CC" >&6; }
18663else
18664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18665$as_echo "no" >&6; }
18666fi
18667
18668
18669  test -n "$POTENTIAL_CC" && break
18670done
18671
18672    CC=$POTENTIAL_CC
18673  fi
18674
18675  if test "x$CC" = x; then
18676
18677    # Print a helpful message on how to acquire the necessary build dependency.
18678    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18679    MISSING_DEPENDENCY=devkit
18680    PKGHANDLER_COMMAND=
18681
18682    case $PKGHANDLER in
18683	apt-get)
18684                apt_help     $MISSING_DEPENDENCY ;;
18685    yum)
18686                yum_help     $MISSING_DEPENDENCY ;;
18687	port)
18688                port_help    $MISSING_DEPENDENCY ;;
18689	pkgutil)
18690                pkgutil_help $MISSING_DEPENDENCY ;;
18691	pkgadd)
18692                pkgadd_help  $MISSING_DEPENDENCY ;;
18693    * )
18694      break ;;
18695    esac
18696
18697    if test "x$PKGHANDLER_COMMAND" != x; then
18698        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18699    fi
18700
18701      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18702  fi
18703
18704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18705
18706  # First separate the path from the arguments. This will split at the first
18707  # space.
18708  complete="$CC"
18709  path="${complete%% *}"
18710  tmp="$complete EOL"
18711  arguments="${tmp#* }"
18712
18713  # Input might be given as Windows format, start by converting to
18714  # unix format.
18715  new_path=`$CYGPATH -u "$path"`
18716
18717  # Now try to locate executable using which
18718  new_path=`$WHICH "$new_path" 2> /dev/null`
18719  # bat and cmd files are not always considered executable in cygwin causing which
18720  # to not find them
18721  if test "x$new_path" = x \
18722           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18723           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18724    new_path=`$CYGPATH -u "$path"`
18725  fi
18726  if test "x$new_path" = x; then
18727    # Oops. Which didn't find the executable.
18728    # The splitting of arguments from the executable at a space might have been incorrect,
18729    # since paths with space are more likely in Windows. Give it another try with the whole
18730    # argument.
18731    path="$complete"
18732    arguments="EOL"
18733    new_path=`$CYGPATH -u "$path"`
18734    new_path=`$WHICH "$new_path" 2> /dev/null`
18735    # bat and cmd files are not always considered executable in cygwin causing which
18736    # to not find them
18737    if test "x$new_path" = x \
18738             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18739             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18740      new_path=`$CYGPATH -u "$path"`
18741    fi
18742    if test "x$new_path" = x; then
18743      # It's still not found. Now this is an unrecoverable error.
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18745$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18746      has_space=`$ECHO "$complete" | $GREP " "`
18747      if test "x$has_space" != x; then
18748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18750      fi
18751      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18752    fi
18753  fi
18754
18755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18758  # "foo.exe" is OK but "foo" is an error.
18759  #
18760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18761  # It is also a way to make sure we got the proper file name for the real test later on.
18762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18763  if test "x$test_shortpath" = x; then
18764    # Short path failed, file does not exist as specified.
18765    # Try adding .exe or .cmd
18766    if test -f "${new_path}.exe"; then
18767       input_to_shortpath="${new_path}.exe"
18768    elif test -f "${new_path}.cmd"; then
18769       input_to_shortpath="${new_path}.cmd"
18770    else
18771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18772$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18775      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18776    fi
18777  else
18778    input_to_shortpath="$new_path"
18779  fi
18780
18781  # Call helper function which possibly converts this using DOS-style short mode.
18782  # If so, the updated path is stored in $new_path.
18783  new_path="$input_to_shortpath"
18784
18785  input_path="$input_to_shortpath"
18786  # Check if we need to convert this using DOS-style short mode. If the path
18787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18788  # take no chances and rewrite it.
18789  # Note: m4 eats our [], so we need to use [ and ] instead.
18790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18791  if test "x$has_forbidden_chars" != x; then
18792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18796      # Going to short mode and back again did indeed matter. Since short mode is
18797      # case insensitive, let's make it lowercase to improve readability.
18798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18799      # Now convert it back to Unix-stile (cygpath)
18800      input_path=`$CYGPATH -u "$shortmode_path"`
18801      new_path="$input_path"
18802    fi
18803  fi
18804
18805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18806  if test "x$test_cygdrive_prefix" = x; then
18807    # As a simple fix, exclude /usr/bin since it's not a real path.
18808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18810      # a path prefixed by /cygdrive for fixpath to work.
18811      new_path="$CYGWIN_ROOT_PATH$input_path"
18812    fi
18813  fi
18814
18815  # remove trailing .exe if any
18816  new_path="${new_path/%.exe/}"
18817
18818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18819
18820  # First separate the path from the arguments. This will split at the first
18821  # space.
18822  complete="$CC"
18823  path="${complete%% *}"
18824  tmp="$complete EOL"
18825  arguments="${tmp#* }"
18826
18827  # Input might be given as Windows format, start by converting to
18828  # unix format.
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  # Now try to locate executable using which
18842  new_path=`$WHICH "$new_path" 2> /dev/null`
18843
18844  if test "x$new_path" = x; then
18845    # Oops. Which didn't find the executable.
18846    # The splitting of arguments from the executable at a space might have been incorrect,
18847    # since paths with space are more likely in Windows. Give it another try with the whole
18848    # argument.
18849    path="$complete"
18850    arguments="EOL"
18851    new_path="$path"
18852
18853  windows_path="$new_path"
18854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18855    unix_path=`$CYGPATH -u "$windows_path"`
18856    new_path="$unix_path"
18857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18859    new_path="$unix_path"
18860  fi
18861
18862
18863    new_path=`$WHICH "$new_path" 2> /dev/null`
18864
18865    if test "x$new_path" = x; then
18866      # It's still not found. Now this is an unrecoverable error.
18867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18868$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18869      has_space=`$ECHO "$complete" | $GREP " "`
18870      if test "x$has_space" != x; then
18871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18873      fi
18874      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18875    fi
18876  fi
18877
18878  # Now new_path has a complete unix path to the binary
18879  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18880    # Keep paths in /bin as-is, but remove trailing .exe if any
18881    new_path="${new_path/%.exe/}"
18882    # Do not save /bin paths to all_fixpath_prefixes!
18883  else
18884    # Not in mixed or Windows style, start by that.
18885    new_path=`cmd //c echo $new_path`
18886
18887  input_path="$new_path"
18888  # Check if we need to convert this using DOS-style short mode. If the path
18889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18890  # take no chances and rewrite it.
18891  # Note: m4 eats our [], so we need to use [ and ] instead.
18892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18893  if test "x$has_forbidden_chars" != x; then
18894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18896  fi
18897
18898    # Output is in $new_path
18899
18900  windows_path="$new_path"
18901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18902    unix_path=`$CYGPATH -u "$windows_path"`
18903    new_path="$unix_path"
18904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18906    new_path="$unix_path"
18907  fi
18908
18909    # remove trailing .exe if any
18910    new_path="${new_path/%.exe/}"
18911
18912    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18913    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18914  fi
18915
18916  else
18917    # We're on a posix platform. Hooray! :)
18918    # First separate the path from the arguments. This will split at the first
18919    # space.
18920    complete="$CC"
18921    path="${complete%% *}"
18922    tmp="$complete EOL"
18923    arguments="${tmp#* }"
18924
18925    # Cannot rely on the command "which" here since it doesn't always work.
18926    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18927    if test -z "$is_absolute_path"; then
18928      # Path to executable is not absolute. Find it.
18929      IFS_save="$IFS"
18930      IFS=:
18931      for p in $PATH; do
18932        if test -f "$p/$path" && test -x "$p/$path"; then
18933          new_path="$p/$path"
18934          break
18935        fi
18936      done
18937      IFS="$IFS_save"
18938    else
18939      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18940$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18941      new_path="$path"
18942    fi
18943
18944    if test "x$new_path" = x; then
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18946$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18947        has_space=`$ECHO "$complete" | $GREP " "`
18948        if test "x$has_space" != x; then
18949          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18950$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18951        fi
18952        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18953      fi
18954  fi
18955
18956      # Now join together the path and the arguments once again
18957      if test "x$arguments" != xEOL; then
18958        new_complete="$new_path ${arguments% *}"
18959      else
18960        new_complete="$new_path"
18961      fi
18962
18963  if test "x$complete" != "x$new_complete"; then
18964      CC="$new_complete"
18965      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18966$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18967    fi
18968
18969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18970$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18971  TEST_COMPILER="$CC"
18972
18973    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18974        # Follow a chain of symbolic links. Use readlink
18975        # where it exists, else fall back to horribly
18976        # complicated shell code.
18977        if test "x$READLINK_TESTED" != yes; then
18978            # On MacOSX there is a readlink tool with a different
18979            # purpose than the GNU readlink tool. Check the found readlink.
18980            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18981            if test "x$ISGNU" = x; then
18982                 # A readlink that we do not know how to use.
18983                 # Are there other non-GNU readlinks out there?
18984                 READLINK_TESTED=yes
18985                 READLINK=
18986            fi
18987        fi
18988
18989        if test "x$READLINK" != x; then
18990            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18991        else
18992            # Save the current directory for restoring afterwards
18993            STARTDIR=$PWD
18994            COUNTER=0
18995            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18996            sym_link_file=`$BASENAME $TEST_COMPILER`
18997            # Use the system pwd and not the shell builtin to resolve directory symlinks
18998            cd $sym_link_dir
18999            cd `$THEPWDCMD`
19000            sym_link_dir=`$THEPWDCMD`
19001            # Resolve file symlinks
19002            while test $COUNTER -lt 20; do
19003                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19004                if test "x$ISLINK" == x; then
19005                    # This is not a symbolic link! We are done!
19006                    break
19007                fi
19008                # Again resolve directory symlinks since the target of the just found
19009                # link could be in a different directory
19010                cd `$DIRNAME $ISLINK`
19011                sym_link_dir=`$THEPWDCMD`
19012                sym_link_file=`$BASENAME $ISLINK`
19013                let COUNTER=COUNTER+1
19014            done
19015            cd $STARTDIR
19016            TEST_COMPILER=$sym_link_dir/$sym_link_file
19017        fi
19018    fi
19019
19020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19021$as_echo "$TEST_COMPILER" >&6; }
19022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19023$as_echo_n "checking if CC is disguised ccache... " >&6; }
19024
19025  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19026  if test "x$COMPILER_BASENAME" = "xccache"; then
19027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19028$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19029    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19030    # We want to control ccache invocation ourselves, so ignore this cc and try
19031    # searching again.
19032
19033    # Remove the path to the fake ccache cc from the PATH
19034    RETRY_COMPILER_SAVED_PATH="$PATH"
19035    COMPILER_DIRNAME=`$DIRNAME $CC`
19036    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19037
19038    # Try again looking for our compiler
19039    if test -n "$ac_tool_prefix"; then
19040  for ac_prog in $COMPILER_CHECK_LIST
19041  do
19042    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19043set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19045$as_echo_n "checking for $ac_word... " >&6; }
19046if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19047  $as_echo_n "(cached) " >&6
19048else
19049  if test -n "$PROPER_COMPILER_CC"; then
19050  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19051else
19052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19053for as_dir in $PATH
19054do
19055  IFS=$as_save_IFS
19056  test -z "$as_dir" && as_dir=.
19057    for ac_exec_ext in '' $ac_executable_extensions; do
19058  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19059    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19061    break 2
19062  fi
19063done
19064  done
19065IFS=$as_save_IFS
19066
19067fi
19068fi
19069PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19070if test -n "$PROPER_COMPILER_CC"; then
19071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19072$as_echo "$PROPER_COMPILER_CC" >&6; }
19073else
19074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19075$as_echo "no" >&6; }
19076fi
19077
19078
19079    test -n "$PROPER_COMPILER_CC" && break
19080  done
19081fi
19082if test -z "$PROPER_COMPILER_CC"; then
19083  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19084  for ac_prog in $COMPILER_CHECK_LIST
19085do
19086  # Extract the first word of "$ac_prog", so it can be a program name with args.
19087set dummy $ac_prog; ac_word=$2
19088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089$as_echo_n "checking for $ac_word... " >&6; }
19090if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19091  $as_echo_n "(cached) " >&6
19092else
19093  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19094  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19095else
19096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19097for as_dir in $PATH
19098do
19099  IFS=$as_save_IFS
19100  test -z "$as_dir" && as_dir=.
19101    for ac_exec_ext in '' $ac_executable_extensions; do
19102  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19103    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19105    break 2
19106  fi
19107done
19108  done
19109IFS=$as_save_IFS
19110
19111fi
19112fi
19113ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19114if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19116$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19117else
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19119$as_echo "no" >&6; }
19120fi
19121
19122
19123  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19124done
19125
19126  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19127    PROPER_COMPILER_CC=""
19128  else
19129    case $cross_compiling:$ac_tool_warned in
19130yes:)
19131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19133ac_tool_warned=yes ;;
19134esac
19135    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19136  fi
19137fi
19138
19139
19140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19141
19142  # First separate the path from the arguments. This will split at the first
19143  # space.
19144  complete="$PROPER_COMPILER_CC"
19145  path="${complete%% *}"
19146  tmp="$complete EOL"
19147  arguments="${tmp#* }"
19148
19149  # Input might be given as Windows format, start by converting to
19150  # unix format.
19151  new_path=`$CYGPATH -u "$path"`
19152
19153  # Now try to locate executable using which
19154  new_path=`$WHICH "$new_path" 2> /dev/null`
19155  # bat and cmd files are not always considered executable in cygwin causing which
19156  # to not find them
19157  if test "x$new_path" = x \
19158           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19159           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19160    new_path=`$CYGPATH -u "$path"`
19161  fi
19162  if test "x$new_path" = x; then
19163    # Oops. Which didn't find the executable.
19164    # The splitting of arguments from the executable at a space might have been incorrect,
19165    # since paths with space are more likely in Windows. Give it another try with the whole
19166    # argument.
19167    path="$complete"
19168    arguments="EOL"
19169    new_path=`$CYGPATH -u "$path"`
19170    new_path=`$WHICH "$new_path" 2> /dev/null`
19171    # bat and cmd files are not always considered executable in cygwin causing which
19172    # to not find them
19173    if test "x$new_path" = x \
19174             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19175             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19176      new_path=`$CYGPATH -u "$path"`
19177    fi
19178    if test "x$new_path" = x; then
19179      # It's still not found. Now this is an unrecoverable error.
19180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19181$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19182      has_space=`$ECHO "$complete" | $GREP " "`
19183      if test "x$has_space" != x; then
19184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19186      fi
19187      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19188    fi
19189  fi
19190
19191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19194  # "foo.exe" is OK but "foo" is an error.
19195  #
19196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19197  # It is also a way to make sure we got the proper file name for the real test later on.
19198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19199  if test "x$test_shortpath" = x; then
19200    # Short path failed, file does not exist as specified.
19201    # Try adding .exe or .cmd
19202    if test -f "${new_path}.exe"; then
19203       input_to_shortpath="${new_path}.exe"
19204    elif test -f "${new_path}.cmd"; then
19205       input_to_shortpath="${new_path}.cmd"
19206    else
19207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19208$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19209      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19210$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19211      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19212    fi
19213  else
19214    input_to_shortpath="$new_path"
19215  fi
19216
19217  # Call helper function which possibly converts this using DOS-style short mode.
19218  # If so, the updated path is stored in $new_path.
19219  new_path="$input_to_shortpath"
19220
19221  input_path="$input_to_shortpath"
19222  # Check if we need to convert this using DOS-style short mode. If the path
19223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19224  # take no chances and rewrite it.
19225  # Note: m4 eats our [], so we need to use [ and ] instead.
19226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19227  if test "x$has_forbidden_chars" != x; then
19228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19232      # Going to short mode and back again did indeed matter. Since short mode is
19233      # case insensitive, let's make it lowercase to improve readability.
19234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19235      # Now convert it back to Unix-stile (cygpath)
19236      input_path=`$CYGPATH -u "$shortmode_path"`
19237      new_path="$input_path"
19238    fi
19239  fi
19240
19241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19242  if test "x$test_cygdrive_prefix" = x; then
19243    # As a simple fix, exclude /usr/bin since it's not a real path.
19244    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19246      # a path prefixed by /cygdrive for fixpath to work.
19247      new_path="$CYGWIN_ROOT_PATH$input_path"
19248    fi
19249  fi
19250
19251  # remove trailing .exe if any
19252  new_path="${new_path/%.exe/}"
19253
19254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19255
19256  # First separate the path from the arguments. This will split at the first
19257  # space.
19258  complete="$PROPER_COMPILER_CC"
19259  path="${complete%% *}"
19260  tmp="$complete EOL"
19261  arguments="${tmp#* }"
19262
19263  # Input might be given as Windows format, start by converting to
19264  # unix format.
19265  new_path="$path"
19266
19267  windows_path="$new_path"
19268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19269    unix_path=`$CYGPATH -u "$windows_path"`
19270    new_path="$unix_path"
19271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19273    new_path="$unix_path"
19274  fi
19275
19276
19277  # Now try to locate executable using which
19278  new_path=`$WHICH "$new_path" 2> /dev/null`
19279
19280  if test "x$new_path" = x; then
19281    # Oops. Which didn't find the executable.
19282    # The splitting of arguments from the executable at a space might have been incorrect,
19283    # since paths with space are more likely in Windows. Give it another try with the whole
19284    # argument.
19285    path="$complete"
19286    arguments="EOL"
19287    new_path="$path"
19288
19289  windows_path="$new_path"
19290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19291    unix_path=`$CYGPATH -u "$windows_path"`
19292    new_path="$unix_path"
19293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19295    new_path="$unix_path"
19296  fi
19297
19298
19299    new_path=`$WHICH "$new_path" 2> /dev/null`
19300
19301    if test "x$new_path" = x; then
19302      # It's still not found. Now this is an unrecoverable error.
19303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19304$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19305      has_space=`$ECHO "$complete" | $GREP " "`
19306      if test "x$has_space" != x; then
19307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19309      fi
19310      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19311    fi
19312  fi
19313
19314  # Now new_path has a complete unix path to the binary
19315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19316    # Keep paths in /bin as-is, but remove trailing .exe if any
19317    new_path="${new_path/%.exe/}"
19318    # Do not save /bin paths to all_fixpath_prefixes!
19319  else
19320    # Not in mixed or Windows style, start by that.
19321    new_path=`cmd //c echo $new_path`
19322
19323  input_path="$new_path"
19324  # Check if we need to convert this using DOS-style short mode. If the path
19325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19326  # take no chances and rewrite it.
19327  # Note: m4 eats our [], so we need to use [ and ] instead.
19328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19329  if test "x$has_forbidden_chars" != x; then
19330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19332  fi
19333
19334    # Output is in $new_path
19335
19336  windows_path="$new_path"
19337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19338    unix_path=`$CYGPATH -u "$windows_path"`
19339    new_path="$unix_path"
19340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19342    new_path="$unix_path"
19343  fi
19344
19345    # remove trailing .exe if any
19346    new_path="${new_path/%.exe/}"
19347
19348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19350  fi
19351
19352  else
19353    # We're on a posix platform. Hooray! :)
19354    # First separate the path from the arguments. This will split at the first
19355    # space.
19356    complete="$PROPER_COMPILER_CC"
19357    path="${complete%% *}"
19358    tmp="$complete EOL"
19359    arguments="${tmp#* }"
19360
19361    # Cannot rely on the command "which" here since it doesn't always work.
19362    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19363    if test -z "$is_absolute_path"; then
19364      # Path to executable is not absolute. Find it.
19365      IFS_save="$IFS"
19366      IFS=:
19367      for p in $PATH; do
19368        if test -f "$p/$path" && test -x "$p/$path"; then
19369          new_path="$p/$path"
19370          break
19371        fi
19372      done
19373      IFS="$IFS_save"
19374    else
19375      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19376$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19377      new_path="$path"
19378    fi
19379
19380    if test "x$new_path" = x; then
19381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19382$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19383        has_space=`$ECHO "$complete" | $GREP " "`
19384        if test "x$has_space" != x; then
19385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19387        fi
19388        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19389      fi
19390  fi
19391
19392      # Now join together the path and the arguments once again
19393      if test "x$arguments" != xEOL; then
19394        new_complete="$new_path ${arguments% *}"
19395      else
19396        new_complete="$new_path"
19397      fi
19398
19399  if test "x$complete" != "x$new_complete"; then
19400      PROPER_COMPILER_CC="$new_complete"
19401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19402$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19403    fi
19404
19405    PATH="$RETRY_COMPILER_SAVED_PATH"
19406
19407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19408$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19409
19410    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19411        # Follow a chain of symbolic links. Use readlink
19412        # where it exists, else fall back to horribly
19413        # complicated shell code.
19414        if test "x$READLINK_TESTED" != yes; then
19415            # On MacOSX there is a readlink tool with a different
19416            # purpose than the GNU readlink tool. Check the found readlink.
19417            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19418            if test "x$ISGNU" = x; then
19419                 # A readlink that we do not know how to use.
19420                 # Are there other non-GNU readlinks out there?
19421                 READLINK_TESTED=yes
19422                 READLINK=
19423            fi
19424        fi
19425
19426        if test "x$READLINK" != x; then
19427            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19428        else
19429            # Save the current directory for restoring afterwards
19430            STARTDIR=$PWD
19431            COUNTER=0
19432            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19433            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19434            # Use the system pwd and not the shell builtin to resolve directory symlinks
19435            cd $sym_link_dir
19436            cd `$THEPWDCMD`
19437            sym_link_dir=`$THEPWDCMD`
19438            # Resolve file symlinks
19439            while test $COUNTER -lt 20; do
19440                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19441                if test "x$ISLINK" == x; then
19442                    # This is not a symbolic link! We are done!
19443                    break
19444                fi
19445                # Again resolve directory symlinks since the target of the just found
19446                # link could be in a different directory
19447                cd `$DIRNAME $ISLINK`
19448                sym_link_dir=`$THEPWDCMD`
19449                sym_link_file=`$BASENAME $ISLINK`
19450                let COUNTER=COUNTER+1
19451            done
19452            cd $STARTDIR
19453            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19454        fi
19455    fi
19456
19457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19458$as_echo "$PROPER_COMPILER_CC" >&6; }
19459    CC="$PROPER_COMPILER_CC"
19460  else
19461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19462$as_echo "no, keeping CC" >&6; }
19463    CC="$TEST_COMPILER"
19464  fi
19465
19466  COMPILER=$CC
19467  COMPILER_NAME=$COMPILER_NAME
19468
19469  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19470    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19471    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19472    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19473    if test $? -ne 0; then
19474      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19475
19476      { $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
19477$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19478      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19479$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19480      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19481    else
19482      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19483      COMPILER_VENDOR="Sun Studio"
19484    fi
19485  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19486    # First line typically looks something like:
19487    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19488    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19489    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19490    COMPILER_VENDOR="Microsoft CL.EXE"
19491    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19492    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19493      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19494        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19495      fi
19496    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19497      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19498        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19499      fi
19500    fi
19501  else
19502    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19503    # Check that this is likely to be GCC.
19504    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19505    if test $? -ne 0; then
19506      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19507$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19508      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19509$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19510      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19511    fi
19512
19513    # First line typically looks something like:
19514    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19515    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19516    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19517  fi
19518  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19519  CC_VERSION="$COMPILER_VERSION"
19520  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19521  CC_VENDOR="$COMPILER_VENDOR"
19522
19523  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19524$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19525
19526
19527# Now that we have resolved CC ourself, let autoconf have its go at it
19528ac_ext=c
19529ac_cpp='$CPP $CPPFLAGS'
19530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19532ac_compiler_gnu=$ac_cv_c_compiler_gnu
19533if test -n "$ac_tool_prefix"; then
19534  for ac_prog in $CC
19535  do
19536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19539$as_echo_n "checking for $ac_word... " >&6; }
19540if test "${ac_cv_prog_CC+set}" = set; then :
19541  $as_echo_n "(cached) " >&6
19542else
19543  if test -n "$CC"; then
19544  ac_cv_prog_CC="$CC" # Let the user override the test.
19545else
19546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19547for as_dir in $PATH
19548do
19549  IFS=$as_save_IFS
19550  test -z "$as_dir" && as_dir=.
19551    for ac_exec_ext in '' $ac_executable_extensions; do
19552  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19553    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19555    break 2
19556  fi
19557done
19558  done
19559IFS=$as_save_IFS
19560
19561fi
19562fi
19563CC=$ac_cv_prog_CC
19564if test -n "$CC"; then
19565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19566$as_echo "$CC" >&6; }
19567else
19568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19569$as_echo "no" >&6; }
19570fi
19571
19572
19573    test -n "$CC" && break
19574  done
19575fi
19576if test -z "$CC"; then
19577  ac_ct_CC=$CC
19578  for ac_prog in $CC
19579do
19580  # Extract the first word of "$ac_prog", so it can be a program name with args.
19581set dummy $ac_prog; ac_word=$2
19582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19583$as_echo_n "checking for $ac_word... " >&6; }
19584if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19585  $as_echo_n "(cached) " >&6
19586else
19587  if test -n "$ac_ct_CC"; then
19588  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19589else
19590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19591for as_dir in $PATH
19592do
19593  IFS=$as_save_IFS
19594  test -z "$as_dir" && as_dir=.
19595    for ac_exec_ext in '' $ac_executable_extensions; do
19596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19597    ac_cv_prog_ac_ct_CC="$ac_prog"
19598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19599    break 2
19600  fi
19601done
19602  done
19603IFS=$as_save_IFS
19604
19605fi
19606fi
19607ac_ct_CC=$ac_cv_prog_ac_ct_CC
19608if test -n "$ac_ct_CC"; then
19609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19610$as_echo "$ac_ct_CC" >&6; }
19611else
19612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19613$as_echo "no" >&6; }
19614fi
19615
19616
19617  test -n "$ac_ct_CC" && break
19618done
19619
19620  if test "x$ac_ct_CC" = x; then
19621    CC=""
19622  else
19623    case $cross_compiling:$ac_tool_warned in
19624yes:)
19625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19627ac_tool_warned=yes ;;
19628esac
19629    CC=$ac_ct_CC
19630  fi
19631fi
19632
19633
19634test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19636as_fn_error $? "no acceptable C compiler found in \$PATH
19637See \`config.log' for more details" "$LINENO" 5; }
19638
19639# Provide some information about the compiler.
19640$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19641set X $ac_compile
19642ac_compiler=$2
19643for ac_option in --version -v -V -qversion; do
19644  { { ac_try="$ac_compiler $ac_option >&5"
19645case "(($ac_try" in
19646  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19647  *) ac_try_echo=$ac_try;;
19648esac
19649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19650$as_echo "$ac_try_echo"; } >&5
19651  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19652  ac_status=$?
19653  if test -s conftest.err; then
19654    sed '10a\
19655... rest of stderr output deleted ...
19656         10q' conftest.err >conftest.er1
19657    cat conftest.er1 >&5
19658  fi
19659  rm -f conftest.er1 conftest.err
19660  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19661  test $ac_status = 0; }
19662done
19663
19664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19665/* end confdefs.h.  */
19666
19667int
19668main ()
19669{
19670
19671  ;
19672  return 0;
19673}
19674_ACEOF
19675ac_clean_files_save=$ac_clean_files
19676ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19677# Try to create an executable without -o first, disregard a.out.
19678# It will help us diagnose broken compilers, and finding out an intuition
19679# of exeext.
19680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19681$as_echo_n "checking whether the C compiler works... " >&6; }
19682ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19683
19684# The possible output files:
19685ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19686
19687ac_rmfiles=
19688for ac_file in $ac_files
19689do
19690  case $ac_file in
19691    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19692    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19693  esac
19694done
19695rm -f $ac_rmfiles
19696
19697if { { ac_try="$ac_link_default"
19698case "(($ac_try" in
19699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19700  *) ac_try_echo=$ac_try;;
19701esac
19702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19703$as_echo "$ac_try_echo"; } >&5
19704  (eval "$ac_link_default") 2>&5
19705  ac_status=$?
19706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19707  test $ac_status = 0; }; then :
19708  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19709# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19710# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19711# so that the user can short-circuit this test for compilers unknown to
19712# Autoconf.
19713for ac_file in $ac_files ''
19714do
19715  test -f "$ac_file" || continue
19716  case $ac_file in
19717    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19718	;;
19719    [ab].out )
19720	# We found the default executable, but exeext='' is most
19721	# certainly right.
19722	break;;
19723    *.* )
19724	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19725	then :; else
19726	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19727	fi
19728	# We set ac_cv_exeext here because the later test for it is not
19729	# safe: cross compilers may not add the suffix if given an `-o'
19730	# argument, so we may need to know it at that point already.
19731	# Even if this section looks crufty: it has the advantage of
19732	# actually working.
19733	break;;
19734    * )
19735	break;;
19736  esac
19737done
19738test "$ac_cv_exeext" = no && ac_cv_exeext=
19739
19740else
19741  ac_file=''
19742fi
19743if test -z "$ac_file"; then :
19744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19745$as_echo "no" >&6; }
19746$as_echo "$as_me: failed program was:" >&5
19747sed 's/^/| /' conftest.$ac_ext >&5
19748
19749{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19751as_fn_error 77 "C compiler cannot create executables
19752See \`config.log' for more details" "$LINENO" 5; }
19753else
19754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19755$as_echo "yes" >&6; }
19756fi
19757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19758$as_echo_n "checking for C compiler default output file name... " >&6; }
19759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19760$as_echo "$ac_file" >&6; }
19761ac_exeext=$ac_cv_exeext
19762
19763rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19764ac_clean_files=$ac_clean_files_save
19765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19766$as_echo_n "checking for suffix of executables... " >&6; }
19767if { { ac_try="$ac_link"
19768case "(($ac_try" in
19769  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19770  *) ac_try_echo=$ac_try;;
19771esac
19772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19773$as_echo "$ac_try_echo"; } >&5
19774  (eval "$ac_link") 2>&5
19775  ac_status=$?
19776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19777  test $ac_status = 0; }; then :
19778  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19779# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19780# work properly (i.e., refer to `conftest.exe'), while it won't with
19781# `rm'.
19782for ac_file in conftest.exe conftest conftest.*; do
19783  test -f "$ac_file" || continue
19784  case $ac_file in
19785    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19786    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19787	  break;;
19788    * ) break;;
19789  esac
19790done
19791else
19792  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19794as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19795See \`config.log' for more details" "$LINENO" 5; }
19796fi
19797rm -f conftest conftest$ac_cv_exeext
19798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19799$as_echo "$ac_cv_exeext" >&6; }
19800
19801rm -f conftest.$ac_ext
19802EXEEXT=$ac_cv_exeext
19803ac_exeext=$EXEEXT
19804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19805/* end confdefs.h.  */
19806#include <stdio.h>
19807int
19808main ()
19809{
19810FILE *f = fopen ("conftest.out", "w");
19811 return ferror (f) || fclose (f) != 0;
19812
19813  ;
19814  return 0;
19815}
19816_ACEOF
19817ac_clean_files="$ac_clean_files conftest.out"
19818# Check that the compiler produces executables we can run.  If not, either
19819# the compiler is broken, or we cross compile.
19820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19821$as_echo_n "checking whether we are cross compiling... " >&6; }
19822if test "$cross_compiling" != yes; then
19823  { { ac_try="$ac_link"
19824case "(($ac_try" in
19825  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19826  *) ac_try_echo=$ac_try;;
19827esac
19828eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19829$as_echo "$ac_try_echo"; } >&5
19830  (eval "$ac_link") 2>&5
19831  ac_status=$?
19832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19833  test $ac_status = 0; }
19834  if { ac_try='./conftest$ac_cv_exeext'
19835  { { case "(($ac_try" in
19836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19837  *) ac_try_echo=$ac_try;;
19838esac
19839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19840$as_echo "$ac_try_echo"; } >&5
19841  (eval "$ac_try") 2>&5
19842  ac_status=$?
19843  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19844  test $ac_status = 0; }; }; then
19845    cross_compiling=no
19846  else
19847    if test "$cross_compiling" = maybe; then
19848	cross_compiling=yes
19849    else
19850	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19852as_fn_error $? "cannot run C compiled programs.
19853If you meant to cross compile, use \`--host'.
19854See \`config.log' for more details" "$LINENO" 5; }
19855    fi
19856  fi
19857fi
19858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19859$as_echo "$cross_compiling" >&6; }
19860
19861rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19862ac_clean_files=$ac_clean_files_save
19863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19864$as_echo_n "checking for suffix of object files... " >&6; }
19865if test "${ac_cv_objext+set}" = set; then :
19866  $as_echo_n "(cached) " >&6
19867else
19868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19869/* end confdefs.h.  */
19870
19871int
19872main ()
19873{
19874
19875  ;
19876  return 0;
19877}
19878_ACEOF
19879rm -f conftest.o conftest.obj
19880if { { ac_try="$ac_compile"
19881case "(($ac_try" in
19882  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19883  *) ac_try_echo=$ac_try;;
19884esac
19885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19886$as_echo "$ac_try_echo"; } >&5
19887  (eval "$ac_compile") 2>&5
19888  ac_status=$?
19889  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19890  test $ac_status = 0; }; then :
19891  for ac_file in conftest.o conftest.obj conftest.*; do
19892  test -f "$ac_file" || continue;
19893  case $ac_file in
19894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19895    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19896       break;;
19897  esac
19898done
19899else
19900  $as_echo "$as_me: failed program was:" >&5
19901sed 's/^/| /' conftest.$ac_ext >&5
19902
19903{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19905as_fn_error $? "cannot compute suffix of object files: cannot compile
19906See \`config.log' for more details" "$LINENO" 5; }
19907fi
19908rm -f conftest.$ac_cv_objext conftest.$ac_ext
19909fi
19910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19911$as_echo "$ac_cv_objext" >&6; }
19912OBJEXT=$ac_cv_objext
19913ac_objext=$OBJEXT
19914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19915$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19916if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19917  $as_echo_n "(cached) " >&6
19918else
19919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19920/* end confdefs.h.  */
19921
19922int
19923main ()
19924{
19925#ifndef __GNUC__
19926       choke me
19927#endif
19928
19929  ;
19930  return 0;
19931}
19932_ACEOF
19933if ac_fn_c_try_compile "$LINENO"; then :
19934  ac_compiler_gnu=yes
19935else
19936  ac_compiler_gnu=no
19937fi
19938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19939ac_cv_c_compiler_gnu=$ac_compiler_gnu
19940
19941fi
19942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19943$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19944if test $ac_compiler_gnu = yes; then
19945  GCC=yes
19946else
19947  GCC=
19948fi
19949ac_test_CFLAGS=${CFLAGS+set}
19950ac_save_CFLAGS=$CFLAGS
19951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19952$as_echo_n "checking whether $CC accepts -g... " >&6; }
19953if test "${ac_cv_prog_cc_g+set}" = set; then :
19954  $as_echo_n "(cached) " >&6
19955else
19956  ac_save_c_werror_flag=$ac_c_werror_flag
19957   ac_c_werror_flag=yes
19958   ac_cv_prog_cc_g=no
19959   CFLAGS="-g"
19960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19961/* end confdefs.h.  */
19962
19963int
19964main ()
19965{
19966
19967  ;
19968  return 0;
19969}
19970_ACEOF
19971if ac_fn_c_try_compile "$LINENO"; then :
19972  ac_cv_prog_cc_g=yes
19973else
19974  CFLAGS=""
19975      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19976/* end confdefs.h.  */
19977
19978int
19979main ()
19980{
19981
19982  ;
19983  return 0;
19984}
19985_ACEOF
19986if ac_fn_c_try_compile "$LINENO"; then :
19987
19988else
19989  ac_c_werror_flag=$ac_save_c_werror_flag
19990	 CFLAGS="-g"
19991	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19992/* end confdefs.h.  */
19993
19994int
19995main ()
19996{
19997
19998  ;
19999  return 0;
20000}
20001_ACEOF
20002if ac_fn_c_try_compile "$LINENO"; then :
20003  ac_cv_prog_cc_g=yes
20004fi
20005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20006fi
20007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20008fi
20009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20010   ac_c_werror_flag=$ac_save_c_werror_flag
20011fi
20012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20013$as_echo "$ac_cv_prog_cc_g" >&6; }
20014if test "$ac_test_CFLAGS" = set; then
20015  CFLAGS=$ac_save_CFLAGS
20016elif test $ac_cv_prog_cc_g = yes; then
20017  if test "$GCC" = yes; then
20018    CFLAGS="-g -O2"
20019  else
20020    CFLAGS="-g"
20021  fi
20022else
20023  if test "$GCC" = yes; then
20024    CFLAGS="-O2"
20025  else
20026    CFLAGS=
20027  fi
20028fi
20029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20030$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20031if test "${ac_cv_prog_cc_c89+set}" = set; then :
20032  $as_echo_n "(cached) " >&6
20033else
20034  ac_cv_prog_cc_c89=no
20035ac_save_CC=$CC
20036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20037/* end confdefs.h.  */
20038#include <stdarg.h>
20039#include <stdio.h>
20040#include <sys/types.h>
20041#include <sys/stat.h>
20042/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20043struct buf { int x; };
20044FILE * (*rcsopen) (struct buf *, struct stat *, int);
20045static char *e (p, i)
20046     char **p;
20047     int i;
20048{
20049  return p[i];
20050}
20051static char *f (char * (*g) (char **, int), char **p, ...)
20052{
20053  char *s;
20054  va_list v;
20055  va_start (v,p);
20056  s = g (p, va_arg (v,int));
20057  va_end (v);
20058  return s;
20059}
20060
20061/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20062   function prototypes and stuff, but not '\xHH' hex character constants.
20063   These don't provoke an error unfortunately, instead are silently treated
20064   as 'x'.  The following induces an error, until -std is added to get
20065   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20066   array size at least.  It's necessary to write '\x00'==0 to get something
20067   that's true only with -std.  */
20068int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20069
20070/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20071   inside strings and character constants.  */
20072#define FOO(x) 'x'
20073int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20074
20075int test (int i, double x);
20076struct s1 {int (*f) (int a);};
20077struct s2 {int (*f) (double a);};
20078int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20079int argc;
20080char **argv;
20081int
20082main ()
20083{
20084return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20085  ;
20086  return 0;
20087}
20088_ACEOF
20089for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20090	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20091do
20092  CC="$ac_save_CC $ac_arg"
20093  if ac_fn_c_try_compile "$LINENO"; then :
20094  ac_cv_prog_cc_c89=$ac_arg
20095fi
20096rm -f core conftest.err conftest.$ac_objext
20097  test "x$ac_cv_prog_cc_c89" != "xno" && break
20098done
20099rm -f conftest.$ac_ext
20100CC=$ac_save_CC
20101
20102fi
20103# AC_CACHE_VAL
20104case "x$ac_cv_prog_cc_c89" in
20105  x)
20106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20107$as_echo "none needed" >&6; } ;;
20108  xno)
20109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20110$as_echo "unsupported" >&6; } ;;
20111  *)
20112    CC="$CC $ac_cv_prog_cc_c89"
20113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20114$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20115esac
20116if test "x$ac_cv_prog_cc_c89" != xno; then :
20117
20118fi
20119
20120ac_ext=cpp
20121ac_cpp='$CXXCPP $CPPFLAGS'
20122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20125
20126
20127### Locate C++ compiler (CXX)
20128
20129if test "x$CXX" != x; then
20130  COMPILER_CHECK_LIST="$CXX"
20131elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20132  COMPILER_CHECK_LIST="cl"
20133elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20134  COMPILER_CHECK_LIST="CC g++"
20135else
20136  COMPILER_CHECK_LIST="g++ CC"
20137fi
20138
20139
20140  COMPILER_NAME=C++
20141
20142  CXX=
20143  # If TOOLS_DIR is set, check for all compiler names in there first
20144  # before checking the rest of the PATH.
20145  if test -n "$TOOLS_DIR"; then
20146    PATH_save="$PATH"
20147    PATH="$TOOLS_DIR"
20148    for ac_prog in $COMPILER_CHECK_LIST
20149do
20150  # Extract the first word of "$ac_prog", so it can be a program name with args.
20151set dummy $ac_prog; ac_word=$2
20152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20153$as_echo_n "checking for $ac_word... " >&6; }
20154if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20155  $as_echo_n "(cached) " >&6
20156else
20157  case $TOOLS_DIR_CXX in
20158  [\\/]* | ?:[\\/]*)
20159  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20160  ;;
20161  *)
20162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20163for as_dir in $PATH
20164do
20165  IFS=$as_save_IFS
20166  test -z "$as_dir" && as_dir=.
20167    for ac_exec_ext in '' $ac_executable_extensions; do
20168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20169    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20171    break 2
20172  fi
20173done
20174  done
20175IFS=$as_save_IFS
20176
20177  ;;
20178esac
20179fi
20180TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20181if test -n "$TOOLS_DIR_CXX"; then
20182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20183$as_echo "$TOOLS_DIR_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 "$TOOLS_DIR_CXX" && break
20191done
20192
20193    CXX=$TOOLS_DIR_CXX
20194    PATH="$PATH_save"
20195  fi
20196
20197  # AC_PATH_PROGS can't be run multiple times with the same variable,
20198  # so create a new name for this run.
20199  if test "x$CXX" = x; then
20200    for ac_prog in $COMPILER_CHECK_LIST
20201do
20202  # Extract the first word of "$ac_prog", so it can be a program name with args.
20203set dummy $ac_prog; ac_word=$2
20204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20205$as_echo_n "checking for $ac_word... " >&6; }
20206if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20207  $as_echo_n "(cached) " >&6
20208else
20209  case $POTENTIAL_CXX in
20210  [\\/]* | ?:[\\/]*)
20211  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20212  ;;
20213  *)
20214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20215for as_dir in $PATH
20216do
20217  IFS=$as_save_IFS
20218  test -z "$as_dir" && as_dir=.
20219    for ac_exec_ext in '' $ac_executable_extensions; do
20220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20221    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20223    break 2
20224  fi
20225done
20226  done
20227IFS=$as_save_IFS
20228
20229  ;;
20230esac
20231fi
20232POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20233if test -n "$POTENTIAL_CXX"; then
20234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20235$as_echo "$POTENTIAL_CXX" >&6; }
20236else
20237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20238$as_echo "no" >&6; }
20239fi
20240
20241
20242  test -n "$POTENTIAL_CXX" && break
20243done
20244
20245    CXX=$POTENTIAL_CXX
20246  fi
20247
20248  if test "x$CXX" = x; then
20249
20250    # Print a helpful message on how to acquire the necessary build dependency.
20251    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20252    MISSING_DEPENDENCY=devkit
20253    PKGHANDLER_COMMAND=
20254
20255    case $PKGHANDLER in
20256	apt-get)
20257                apt_help     $MISSING_DEPENDENCY ;;
20258    yum)
20259                yum_help     $MISSING_DEPENDENCY ;;
20260	port)
20261                port_help    $MISSING_DEPENDENCY ;;
20262	pkgutil)
20263                pkgutil_help $MISSING_DEPENDENCY ;;
20264	pkgadd)
20265                pkgadd_help  $MISSING_DEPENDENCY ;;
20266    * )
20267      break ;;
20268    esac
20269
20270    if test "x$PKGHANDLER_COMMAND" != x; then
20271        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20272    fi
20273
20274      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20275  fi
20276
20277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20278
20279  # First separate the path from the arguments. This will split at the first
20280  # space.
20281  complete="$CXX"
20282  path="${complete%% *}"
20283  tmp="$complete EOL"
20284  arguments="${tmp#* }"
20285
20286  # Input might be given as Windows format, start by converting to
20287  # unix format.
20288  new_path=`$CYGPATH -u "$path"`
20289
20290  # Now try to locate executable using which
20291  new_path=`$WHICH "$new_path" 2> /dev/null`
20292  # bat and cmd files are not always considered executable in cygwin causing which
20293  # to not find them
20294  if test "x$new_path" = x \
20295           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20296           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20297    new_path=`$CYGPATH -u "$path"`
20298  fi
20299  if test "x$new_path" = x; then
20300    # Oops. Which didn't find the executable.
20301    # The splitting of arguments from the executable at a space might have been incorrect,
20302    # since paths with space are more likely in Windows. Give it another try with the whole
20303    # argument.
20304    path="$complete"
20305    arguments="EOL"
20306    new_path=`$CYGPATH -u "$path"`
20307    new_path=`$WHICH "$new_path" 2> /dev/null`
20308    # bat and cmd files are not always considered executable in cygwin causing which
20309    # to not find them
20310    if test "x$new_path" = x \
20311             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20312             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20313      new_path=`$CYGPATH -u "$path"`
20314    fi
20315    if test "x$new_path" = x; then
20316      # It's still not found. Now this is an unrecoverable error.
20317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20318$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20319      has_space=`$ECHO "$complete" | $GREP " "`
20320      if test "x$has_space" != x; then
20321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20323      fi
20324      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20325    fi
20326  fi
20327
20328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20331  # "foo.exe" is OK but "foo" is an error.
20332  #
20333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20334  # It is also a way to make sure we got the proper file name for the real test later on.
20335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20336  if test "x$test_shortpath" = x; then
20337    # Short path failed, file does not exist as specified.
20338    # Try adding .exe or .cmd
20339    if test -f "${new_path}.exe"; then
20340       input_to_shortpath="${new_path}.exe"
20341    elif test -f "${new_path}.cmd"; then
20342       input_to_shortpath="${new_path}.cmd"
20343    else
20344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20345$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20348      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20349    fi
20350  else
20351    input_to_shortpath="$new_path"
20352  fi
20353
20354  # Call helper function which possibly converts this using DOS-style short mode.
20355  # If so, the updated path is stored in $new_path.
20356  new_path="$input_to_shortpath"
20357
20358  input_path="$input_to_shortpath"
20359  # Check if we need to convert this using DOS-style short mode. If the path
20360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20361  # take no chances and rewrite it.
20362  # Note: m4 eats our [], so we need to use [ and ] instead.
20363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20364  if test "x$has_forbidden_chars" != x; then
20365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20369      # Going to short mode and back again did indeed matter. Since short mode is
20370      # case insensitive, let's make it lowercase to improve readability.
20371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20372      # Now convert it back to Unix-stile (cygpath)
20373      input_path=`$CYGPATH -u "$shortmode_path"`
20374      new_path="$input_path"
20375    fi
20376  fi
20377
20378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20379  if test "x$test_cygdrive_prefix" = x; then
20380    # As a simple fix, exclude /usr/bin since it's not a real path.
20381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20383      # a path prefixed by /cygdrive for fixpath to work.
20384      new_path="$CYGWIN_ROOT_PATH$input_path"
20385    fi
20386  fi
20387
20388  # remove trailing .exe if any
20389  new_path="${new_path/%.exe/}"
20390
20391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20392
20393  # First separate the path from the arguments. This will split at the first
20394  # space.
20395  complete="$CXX"
20396  path="${complete%% *}"
20397  tmp="$complete EOL"
20398  arguments="${tmp#* }"
20399
20400  # Input might be given as Windows format, start by converting to
20401  # unix format.
20402  new_path="$path"
20403
20404  windows_path="$new_path"
20405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20406    unix_path=`$CYGPATH -u "$windows_path"`
20407    new_path="$unix_path"
20408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20410    new_path="$unix_path"
20411  fi
20412
20413
20414  # Now try to locate executable using which
20415  new_path=`$WHICH "$new_path" 2> /dev/null`
20416
20417  if test "x$new_path" = x; then
20418    # Oops. Which didn't find the executable.
20419    # The splitting of arguments from the executable at a space might have been incorrect,
20420    # since paths with space are more likely in Windows. Give it another try with the whole
20421    # argument.
20422    path="$complete"
20423    arguments="EOL"
20424    new_path="$path"
20425
20426  windows_path="$new_path"
20427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20428    unix_path=`$CYGPATH -u "$windows_path"`
20429    new_path="$unix_path"
20430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20432    new_path="$unix_path"
20433  fi
20434
20435
20436    new_path=`$WHICH "$new_path" 2> /dev/null`
20437
20438    if test "x$new_path" = x; then
20439      # It's still not found. Now this is an unrecoverable error.
20440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20441$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20442      has_space=`$ECHO "$complete" | $GREP " "`
20443      if test "x$has_space" != x; then
20444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20446      fi
20447      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20448    fi
20449  fi
20450
20451  # Now new_path has a complete unix path to the binary
20452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20453    # Keep paths in /bin as-is, but remove trailing .exe if any
20454    new_path="${new_path/%.exe/}"
20455    # Do not save /bin paths to all_fixpath_prefixes!
20456  else
20457    # Not in mixed or Windows style, start by that.
20458    new_path=`cmd //c echo $new_path`
20459
20460  input_path="$new_path"
20461  # Check if we need to convert this using DOS-style short mode. If the path
20462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20463  # take no chances and rewrite it.
20464  # Note: m4 eats our [], so we need to use [ and ] instead.
20465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20466  if test "x$has_forbidden_chars" != x; then
20467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20469  fi
20470
20471    # Output is in $new_path
20472
20473  windows_path="$new_path"
20474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20475    unix_path=`$CYGPATH -u "$windows_path"`
20476    new_path="$unix_path"
20477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20479    new_path="$unix_path"
20480  fi
20481
20482    # remove trailing .exe if any
20483    new_path="${new_path/%.exe/}"
20484
20485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20487  fi
20488
20489  else
20490    # We're on a posix platform. Hooray! :)
20491    # First separate the path from the arguments. This will split at the first
20492    # space.
20493    complete="$CXX"
20494    path="${complete%% *}"
20495    tmp="$complete EOL"
20496    arguments="${tmp#* }"
20497
20498    # Cannot rely on the command "which" here since it doesn't always work.
20499    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20500    if test -z "$is_absolute_path"; then
20501      # Path to executable is not absolute. Find it.
20502      IFS_save="$IFS"
20503      IFS=:
20504      for p in $PATH; do
20505        if test -f "$p/$path" && test -x "$p/$path"; then
20506          new_path="$p/$path"
20507          break
20508        fi
20509      done
20510      IFS="$IFS_save"
20511    else
20512      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20513$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20514      new_path="$path"
20515    fi
20516
20517    if test "x$new_path" = x; then
20518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20519$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20520        has_space=`$ECHO "$complete" | $GREP " "`
20521        if test "x$has_space" != x; then
20522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20524        fi
20525        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20526      fi
20527  fi
20528
20529      # Now join together the path and the arguments once again
20530      if test "x$arguments" != xEOL; then
20531        new_complete="$new_path ${arguments% *}"
20532      else
20533        new_complete="$new_path"
20534      fi
20535
20536  if test "x$complete" != "x$new_complete"; then
20537      CXX="$new_complete"
20538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20539$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20540    fi
20541
20542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20543$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20544  TEST_COMPILER="$CXX"
20545
20546    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20547        # Follow a chain of symbolic links. Use readlink
20548        # where it exists, else fall back to horribly
20549        # complicated shell code.
20550        if test "x$READLINK_TESTED" != yes; then
20551            # On MacOSX there is a readlink tool with a different
20552            # purpose than the GNU readlink tool. Check the found readlink.
20553            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20554            if test "x$ISGNU" = x; then
20555                 # A readlink that we do not know how to use.
20556                 # Are there other non-GNU readlinks out there?
20557                 READLINK_TESTED=yes
20558                 READLINK=
20559            fi
20560        fi
20561
20562        if test "x$READLINK" != x; then
20563            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20564        else
20565            # Save the current directory for restoring afterwards
20566            STARTDIR=$PWD
20567            COUNTER=0
20568            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20569            sym_link_file=`$BASENAME $TEST_COMPILER`
20570            # Use the system pwd and not the shell builtin to resolve directory symlinks
20571            cd $sym_link_dir
20572            cd `$THEPWDCMD`
20573            sym_link_dir=`$THEPWDCMD`
20574            # Resolve file symlinks
20575            while test $COUNTER -lt 20; do
20576                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20577                if test "x$ISLINK" == x; then
20578                    # This is not a symbolic link! We are done!
20579                    break
20580                fi
20581                # Again resolve directory symlinks since the target of the just found
20582                # link could be in a different directory
20583                cd `$DIRNAME $ISLINK`
20584                sym_link_dir=`$THEPWDCMD`
20585                sym_link_file=`$BASENAME $ISLINK`
20586                let COUNTER=COUNTER+1
20587            done
20588            cd $STARTDIR
20589            TEST_COMPILER=$sym_link_dir/$sym_link_file
20590        fi
20591    fi
20592
20593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20594$as_echo "$TEST_COMPILER" >&6; }
20595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20596$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20597
20598  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20599  if test "x$COMPILER_BASENAME" = "xccache"; then
20600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20601$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20602    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20603    # We want to control ccache invocation ourselves, so ignore this cc and try
20604    # searching again.
20605
20606    # Remove the path to the fake ccache cc from the PATH
20607    RETRY_COMPILER_SAVED_PATH="$PATH"
20608    COMPILER_DIRNAME=`$DIRNAME $CXX`
20609    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20610
20611    # Try again looking for our compiler
20612    if test -n "$ac_tool_prefix"; then
20613  for ac_prog in $COMPILER_CHECK_LIST
20614  do
20615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20618$as_echo_n "checking for $ac_word... " >&6; }
20619if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20620  $as_echo_n "(cached) " >&6
20621else
20622  if test -n "$PROPER_COMPILER_CXX"; then
20623  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20624else
20625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20626for as_dir in $PATH
20627do
20628  IFS=$as_save_IFS
20629  test -z "$as_dir" && as_dir=.
20630    for ac_exec_ext in '' $ac_executable_extensions; do
20631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20632    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20634    break 2
20635  fi
20636done
20637  done
20638IFS=$as_save_IFS
20639
20640fi
20641fi
20642PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20643if test -n "$PROPER_COMPILER_CXX"; then
20644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20645$as_echo "$PROPER_COMPILER_CXX" >&6; }
20646else
20647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20648$as_echo "no" >&6; }
20649fi
20650
20651
20652    test -n "$PROPER_COMPILER_CXX" && break
20653  done
20654fi
20655if test -z "$PROPER_COMPILER_CXX"; then
20656  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20657  for ac_prog in $COMPILER_CHECK_LIST
20658do
20659  # Extract the first word of "$ac_prog", so it can be a program name with args.
20660set dummy $ac_prog; ac_word=$2
20661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20662$as_echo_n "checking for $ac_word... " >&6; }
20663if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20664  $as_echo_n "(cached) " >&6
20665else
20666  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20667  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20668else
20669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20670for as_dir in $PATH
20671do
20672  IFS=$as_save_IFS
20673  test -z "$as_dir" && as_dir=.
20674    for ac_exec_ext in '' $ac_executable_extensions; do
20675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20676    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20678    break 2
20679  fi
20680done
20681  done
20682IFS=$as_save_IFS
20683
20684fi
20685fi
20686ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20687if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20689$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20690else
20691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20692$as_echo "no" >&6; }
20693fi
20694
20695
20696  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20697done
20698
20699  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20700    PROPER_COMPILER_CXX=""
20701  else
20702    case $cross_compiling:$ac_tool_warned in
20703yes:)
20704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20706ac_tool_warned=yes ;;
20707esac
20708    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20709  fi
20710fi
20711
20712
20713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20714
20715  # First separate the path from the arguments. This will split at the first
20716  # space.
20717  complete="$PROPER_COMPILER_CXX"
20718  path="${complete%% *}"
20719  tmp="$complete EOL"
20720  arguments="${tmp#* }"
20721
20722  # Input might be given as Windows format, start by converting to
20723  # unix format.
20724  new_path=`$CYGPATH -u "$path"`
20725
20726  # Now try to locate executable using which
20727  new_path=`$WHICH "$new_path" 2> /dev/null`
20728  # bat and cmd files are not always considered executable in cygwin causing which
20729  # to not find them
20730  if test "x$new_path" = x \
20731           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20732           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20733    new_path=`$CYGPATH -u "$path"`
20734  fi
20735  if test "x$new_path" = x; then
20736    # Oops. Which didn't find the executable.
20737    # The splitting of arguments from the executable at a space might have been incorrect,
20738    # since paths with space are more likely in Windows. Give it another try with the whole
20739    # argument.
20740    path="$complete"
20741    arguments="EOL"
20742    new_path=`$CYGPATH -u "$path"`
20743    new_path=`$WHICH "$new_path" 2> /dev/null`
20744    # bat and cmd files are not always considered executable in cygwin causing which
20745    # to not find them
20746    if test "x$new_path" = x \
20747             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20748             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20749      new_path=`$CYGPATH -u "$path"`
20750    fi
20751    if test "x$new_path" = x; then
20752      # It's still not found. Now this is an unrecoverable error.
20753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20754$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20755      has_space=`$ECHO "$complete" | $GREP " "`
20756      if test "x$has_space" != x; then
20757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20759      fi
20760      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20761    fi
20762  fi
20763
20764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20767  # "foo.exe" is OK but "foo" is an error.
20768  #
20769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20770  # It is also a way to make sure we got the proper file name for the real test later on.
20771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20772  if test "x$test_shortpath" = x; then
20773    # Short path failed, file does not exist as specified.
20774    # Try adding .exe or .cmd
20775    if test -f "${new_path}.exe"; then
20776       input_to_shortpath="${new_path}.exe"
20777    elif test -f "${new_path}.cmd"; then
20778       input_to_shortpath="${new_path}.cmd"
20779    else
20780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20781$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20784      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20785    fi
20786  else
20787    input_to_shortpath="$new_path"
20788  fi
20789
20790  # Call helper function which possibly converts this using DOS-style short mode.
20791  # If so, the updated path is stored in $new_path.
20792  new_path="$input_to_shortpath"
20793
20794  input_path="$input_to_shortpath"
20795  # Check if we need to convert this using DOS-style short mode. If the path
20796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20797  # take no chances and rewrite it.
20798  # Note: m4 eats our [], so we need to use [ and ] instead.
20799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20800  if test "x$has_forbidden_chars" != x; then
20801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20805      # Going to short mode and back again did indeed matter. Since short mode is
20806      # case insensitive, let's make it lowercase to improve readability.
20807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20808      # Now convert it back to Unix-stile (cygpath)
20809      input_path=`$CYGPATH -u "$shortmode_path"`
20810      new_path="$input_path"
20811    fi
20812  fi
20813
20814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20815  if test "x$test_cygdrive_prefix" = x; then
20816    # As a simple fix, exclude /usr/bin since it's not a real path.
20817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20819      # a path prefixed by /cygdrive for fixpath to work.
20820      new_path="$CYGWIN_ROOT_PATH$input_path"
20821    fi
20822  fi
20823
20824  # remove trailing .exe if any
20825  new_path="${new_path/%.exe/}"
20826
20827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20828
20829  # First separate the path from the arguments. This will split at the first
20830  # space.
20831  complete="$PROPER_COMPILER_CXX"
20832  path="${complete%% *}"
20833  tmp="$complete EOL"
20834  arguments="${tmp#* }"
20835
20836  # Input might be given as Windows format, start by converting to
20837  # unix format.
20838  new_path="$path"
20839
20840  windows_path="$new_path"
20841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20842    unix_path=`$CYGPATH -u "$windows_path"`
20843    new_path="$unix_path"
20844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20846    new_path="$unix_path"
20847  fi
20848
20849
20850  # Now try to locate executable using which
20851  new_path=`$WHICH "$new_path" 2> /dev/null`
20852
20853  if test "x$new_path" = x; then
20854    # Oops. Which didn't find the executable.
20855    # The splitting of arguments from the executable at a space might have been incorrect,
20856    # since paths with space are more likely in Windows. Give it another try with the whole
20857    # argument.
20858    path="$complete"
20859    arguments="EOL"
20860    new_path="$path"
20861
20862  windows_path="$new_path"
20863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20864    unix_path=`$CYGPATH -u "$windows_path"`
20865    new_path="$unix_path"
20866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20868    new_path="$unix_path"
20869  fi
20870
20871
20872    new_path=`$WHICH "$new_path" 2> /dev/null`
20873
20874    if test "x$new_path" = x; then
20875      # It's still not found. Now this is an unrecoverable error.
20876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20877$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20878      has_space=`$ECHO "$complete" | $GREP " "`
20879      if test "x$has_space" != x; then
20880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20882      fi
20883      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20884    fi
20885  fi
20886
20887  # Now new_path has a complete unix path to the binary
20888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20889    # Keep paths in /bin as-is, but remove trailing .exe if any
20890    new_path="${new_path/%.exe/}"
20891    # Do not save /bin paths to all_fixpath_prefixes!
20892  else
20893    # Not in mixed or Windows style, start by that.
20894    new_path=`cmd //c echo $new_path`
20895
20896  input_path="$new_path"
20897  # Check if we need to convert this using DOS-style short mode. If the path
20898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20899  # take no chances and rewrite it.
20900  # Note: m4 eats our [], so we need to use [ and ] instead.
20901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20902  if test "x$has_forbidden_chars" != x; then
20903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20905  fi
20906
20907    # Output is in $new_path
20908
20909  windows_path="$new_path"
20910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20911    unix_path=`$CYGPATH -u "$windows_path"`
20912    new_path="$unix_path"
20913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20915    new_path="$unix_path"
20916  fi
20917
20918    # remove trailing .exe if any
20919    new_path="${new_path/%.exe/}"
20920
20921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20923  fi
20924
20925  else
20926    # We're on a posix platform. Hooray! :)
20927    # First separate the path from the arguments. This will split at the first
20928    # space.
20929    complete="$PROPER_COMPILER_CXX"
20930    path="${complete%% *}"
20931    tmp="$complete EOL"
20932    arguments="${tmp#* }"
20933
20934    # Cannot rely on the command "which" here since it doesn't always work.
20935    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20936    if test -z "$is_absolute_path"; then
20937      # Path to executable is not absolute. Find it.
20938      IFS_save="$IFS"
20939      IFS=:
20940      for p in $PATH; do
20941        if test -f "$p/$path" && test -x "$p/$path"; then
20942          new_path="$p/$path"
20943          break
20944        fi
20945      done
20946      IFS="$IFS_save"
20947    else
20948      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20949$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20950      new_path="$path"
20951    fi
20952
20953    if test "x$new_path" = x; then
20954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20955$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20956        has_space=`$ECHO "$complete" | $GREP " "`
20957        if test "x$has_space" != x; then
20958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20960        fi
20961        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20962      fi
20963  fi
20964
20965      # Now join together the path and the arguments once again
20966      if test "x$arguments" != xEOL; then
20967        new_complete="$new_path ${arguments% *}"
20968      else
20969        new_complete="$new_path"
20970      fi
20971
20972  if test "x$complete" != "x$new_complete"; then
20973      PROPER_COMPILER_CXX="$new_complete"
20974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20975$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20976    fi
20977
20978    PATH="$RETRY_COMPILER_SAVED_PATH"
20979
20980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20981$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20982
20983    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20984        # Follow a chain of symbolic links. Use readlink
20985        # where it exists, else fall back to horribly
20986        # complicated shell code.
20987        if test "x$READLINK_TESTED" != yes; then
20988            # On MacOSX there is a readlink tool with a different
20989            # purpose than the GNU readlink tool. Check the found readlink.
20990            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20991            if test "x$ISGNU" = x; then
20992                 # A readlink that we do not know how to use.
20993                 # Are there other non-GNU readlinks out there?
20994                 READLINK_TESTED=yes
20995                 READLINK=
20996            fi
20997        fi
20998
20999        if test "x$READLINK" != x; then
21000            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21001        else
21002            # Save the current directory for restoring afterwards
21003            STARTDIR=$PWD
21004            COUNTER=0
21005            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21006            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21007            # Use the system pwd and not the shell builtin to resolve directory symlinks
21008            cd $sym_link_dir
21009            cd `$THEPWDCMD`
21010            sym_link_dir=`$THEPWDCMD`
21011            # Resolve file symlinks
21012            while test $COUNTER -lt 20; do
21013                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21014                if test "x$ISLINK" == x; then
21015                    # This is not a symbolic link! We are done!
21016                    break
21017                fi
21018                # Again resolve directory symlinks since the target of the just found
21019                # link could be in a different directory
21020                cd `$DIRNAME $ISLINK`
21021                sym_link_dir=`$THEPWDCMD`
21022                sym_link_file=`$BASENAME $ISLINK`
21023                let COUNTER=COUNTER+1
21024            done
21025            cd $STARTDIR
21026            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21027        fi
21028    fi
21029
21030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21031$as_echo "$PROPER_COMPILER_CXX" >&6; }
21032    CXX="$PROPER_COMPILER_CXX"
21033  else
21034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21035$as_echo "no, keeping CXX" >&6; }
21036    CXX="$TEST_COMPILER"
21037  fi
21038
21039  COMPILER=$CXX
21040  COMPILER_NAME=$COMPILER_NAME
21041
21042  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21043    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21044    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21045    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21046    if test $? -ne 0; then
21047      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21048
21049      { $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
21050$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21051      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21052$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21053      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21054    else
21055      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21056      COMPILER_VENDOR="Sun Studio"
21057    fi
21058  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21059    # First line typically looks something like:
21060    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21061    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21062    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21063    COMPILER_VENDOR="Microsoft CL.EXE"
21064    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21065    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21066      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21067        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21068      fi
21069    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21070      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21071        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21072      fi
21073    fi
21074  else
21075    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21076    # Check that this is likely to be GCC.
21077    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21078    if test $? -ne 0; then
21079      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21080$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21081      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21082$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21083      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21084    fi
21085
21086    # First line typically looks something like:
21087    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21088    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21089    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21090  fi
21091  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21092  CXX_VERSION="$COMPILER_VERSION"
21093  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21094  CXX_VENDOR="$COMPILER_VENDOR"
21095
21096  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21097$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21098
21099
21100# Now that we have resolved CXX ourself, let autoconf have its go at it
21101ac_ext=cpp
21102ac_cpp='$CXXCPP $CPPFLAGS'
21103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21106if test -z "$CXX"; then
21107  if test -n "$CCC"; then
21108    CXX=$CCC
21109  else
21110    if test -n "$ac_tool_prefix"; then
21111  for ac_prog in $CXX
21112  do
21113    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21116$as_echo_n "checking for $ac_word... " >&6; }
21117if test "${ac_cv_prog_CXX+set}" = set; then :
21118  $as_echo_n "(cached) " >&6
21119else
21120  if test -n "$CXX"; then
21121  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21122else
21123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21124for as_dir in $PATH
21125do
21126  IFS=$as_save_IFS
21127  test -z "$as_dir" && as_dir=.
21128    for ac_exec_ext in '' $ac_executable_extensions; do
21129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21130    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21132    break 2
21133  fi
21134done
21135  done
21136IFS=$as_save_IFS
21137
21138fi
21139fi
21140CXX=$ac_cv_prog_CXX
21141if test -n "$CXX"; then
21142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21143$as_echo "$CXX" >&6; }
21144else
21145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21146$as_echo "no" >&6; }
21147fi
21148
21149
21150    test -n "$CXX" && break
21151  done
21152fi
21153if test -z "$CXX"; then
21154  ac_ct_CXX=$CXX
21155  for ac_prog in $CXX
21156do
21157  # Extract the first word of "$ac_prog", so it can be a program name with args.
21158set dummy $ac_prog; ac_word=$2
21159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21160$as_echo_n "checking for $ac_word... " >&6; }
21161if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21162  $as_echo_n "(cached) " >&6
21163else
21164  if test -n "$ac_ct_CXX"; then
21165  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21166else
21167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21168for as_dir in $PATH
21169do
21170  IFS=$as_save_IFS
21171  test -z "$as_dir" && as_dir=.
21172    for ac_exec_ext in '' $ac_executable_extensions; do
21173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21174    ac_cv_prog_ac_ct_CXX="$ac_prog"
21175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21176    break 2
21177  fi
21178done
21179  done
21180IFS=$as_save_IFS
21181
21182fi
21183fi
21184ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21185if test -n "$ac_ct_CXX"; then
21186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21187$as_echo "$ac_ct_CXX" >&6; }
21188else
21189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21190$as_echo "no" >&6; }
21191fi
21192
21193
21194  test -n "$ac_ct_CXX" && break
21195done
21196
21197  if test "x$ac_ct_CXX" = x; then
21198    CXX="g++"
21199  else
21200    case $cross_compiling:$ac_tool_warned in
21201yes:)
21202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21204ac_tool_warned=yes ;;
21205esac
21206    CXX=$ac_ct_CXX
21207  fi
21208fi
21209
21210  fi
21211fi
21212# Provide some information about the compiler.
21213$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21214set X $ac_compile
21215ac_compiler=$2
21216for ac_option in --version -v -V -qversion; do
21217  { { ac_try="$ac_compiler $ac_option >&5"
21218case "(($ac_try" in
21219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21220  *) ac_try_echo=$ac_try;;
21221esac
21222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21223$as_echo "$ac_try_echo"; } >&5
21224  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21225  ac_status=$?
21226  if test -s conftest.err; then
21227    sed '10a\
21228... rest of stderr output deleted ...
21229         10q' conftest.err >conftest.er1
21230    cat conftest.er1 >&5
21231  fi
21232  rm -f conftest.er1 conftest.err
21233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21234  test $ac_status = 0; }
21235done
21236
21237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21238$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21239if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21240  $as_echo_n "(cached) " >&6
21241else
21242  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21243/* end confdefs.h.  */
21244
21245int
21246main ()
21247{
21248#ifndef __GNUC__
21249       choke me
21250#endif
21251
21252  ;
21253  return 0;
21254}
21255_ACEOF
21256if ac_fn_cxx_try_compile "$LINENO"; then :
21257  ac_compiler_gnu=yes
21258else
21259  ac_compiler_gnu=no
21260fi
21261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21262ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21263
21264fi
21265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21266$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21267if test $ac_compiler_gnu = yes; then
21268  GXX=yes
21269else
21270  GXX=
21271fi
21272ac_test_CXXFLAGS=${CXXFLAGS+set}
21273ac_save_CXXFLAGS=$CXXFLAGS
21274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21275$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21276if test "${ac_cv_prog_cxx_g+set}" = set; then :
21277  $as_echo_n "(cached) " >&6
21278else
21279  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21280   ac_cxx_werror_flag=yes
21281   ac_cv_prog_cxx_g=no
21282   CXXFLAGS="-g"
21283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21284/* end confdefs.h.  */
21285
21286int
21287main ()
21288{
21289
21290  ;
21291  return 0;
21292}
21293_ACEOF
21294if ac_fn_cxx_try_compile "$LINENO"; then :
21295  ac_cv_prog_cxx_g=yes
21296else
21297  CXXFLAGS=""
21298      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21299/* end confdefs.h.  */
21300
21301int
21302main ()
21303{
21304
21305  ;
21306  return 0;
21307}
21308_ACEOF
21309if ac_fn_cxx_try_compile "$LINENO"; then :
21310
21311else
21312  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21313	 CXXFLAGS="-g"
21314	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21315/* end confdefs.h.  */
21316
21317int
21318main ()
21319{
21320
21321  ;
21322  return 0;
21323}
21324_ACEOF
21325if ac_fn_cxx_try_compile "$LINENO"; then :
21326  ac_cv_prog_cxx_g=yes
21327fi
21328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21329fi
21330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21331fi
21332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21333   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21334fi
21335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21336$as_echo "$ac_cv_prog_cxx_g" >&6; }
21337if test "$ac_test_CXXFLAGS" = set; then
21338  CXXFLAGS=$ac_save_CXXFLAGS
21339elif test $ac_cv_prog_cxx_g = yes; then
21340  if test "$GXX" = yes; then
21341    CXXFLAGS="-g -O2"
21342  else
21343    CXXFLAGS="-g"
21344  fi
21345else
21346  if test "$GXX" = yes; then
21347    CXXFLAGS="-O2"
21348  else
21349    CXXFLAGS=
21350  fi
21351fi
21352ac_ext=cpp
21353ac_cpp='$CXXCPP $CPPFLAGS'
21354ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21355ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21356ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21357
21358
21359### Locate other tools
21360
21361if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21362    ac_ext=m
21363ac_cpp='$OBJCPP $CPPFLAGS'
21364ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21365ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21366ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21367if test -n "$ac_tool_prefix"; then
21368  for ac_prog in gcc objcc objc cc CC
21369  do
21370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21373$as_echo_n "checking for $ac_word... " >&6; }
21374if test "${ac_cv_prog_OBJC+set}" = set; then :
21375  $as_echo_n "(cached) " >&6
21376else
21377  if test -n "$OBJC"; then
21378  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21379else
21380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21381for as_dir in $PATH
21382do
21383  IFS=$as_save_IFS
21384  test -z "$as_dir" && as_dir=.
21385    for ac_exec_ext in '' $ac_executable_extensions; do
21386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21387    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21389    break 2
21390  fi
21391done
21392  done
21393IFS=$as_save_IFS
21394
21395fi
21396fi
21397OBJC=$ac_cv_prog_OBJC
21398if test -n "$OBJC"; then
21399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21400$as_echo "$OBJC" >&6; }
21401else
21402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21403$as_echo "no" >&6; }
21404fi
21405
21406
21407    test -n "$OBJC" && break
21408  done
21409fi
21410if test -z "$OBJC"; then
21411  ac_ct_OBJC=$OBJC
21412  for ac_prog in gcc objcc objc cc CC
21413do
21414  # Extract the first word of "$ac_prog", so it can be a program name with args.
21415set dummy $ac_prog; ac_word=$2
21416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21417$as_echo_n "checking for $ac_word... " >&6; }
21418if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21419  $as_echo_n "(cached) " >&6
21420else
21421  if test -n "$ac_ct_OBJC"; then
21422  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21423else
21424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425for as_dir in $PATH
21426do
21427  IFS=$as_save_IFS
21428  test -z "$as_dir" && as_dir=.
21429    for ac_exec_ext in '' $ac_executable_extensions; do
21430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21431    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433    break 2
21434  fi
21435done
21436  done
21437IFS=$as_save_IFS
21438
21439fi
21440fi
21441ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21442if test -n "$ac_ct_OBJC"; then
21443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21444$as_echo "$ac_ct_OBJC" >&6; }
21445else
21446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21447$as_echo "no" >&6; }
21448fi
21449
21450
21451  test -n "$ac_ct_OBJC" && break
21452done
21453
21454  if test "x$ac_ct_OBJC" = x; then
21455    OBJC="gcc"
21456  else
21457    case $cross_compiling:$ac_tool_warned in
21458yes:)
21459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21461ac_tool_warned=yes ;;
21462esac
21463    OBJC=$ac_ct_OBJC
21464  fi
21465fi
21466
21467# Provide some information about the compiler.
21468$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21469set X $ac_compile
21470ac_compiler=$2
21471for ac_option in --version -v -V -qversion; do
21472  { { ac_try="$ac_compiler $ac_option >&5"
21473case "(($ac_try" in
21474  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21475  *) ac_try_echo=$ac_try;;
21476esac
21477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21478$as_echo "$ac_try_echo"; } >&5
21479  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21480  ac_status=$?
21481  if test -s conftest.err; then
21482    sed '10a\
21483... rest of stderr output deleted ...
21484         10q' conftest.err >conftest.er1
21485    cat conftest.er1 >&5
21486  fi
21487  rm -f conftest.er1 conftest.err
21488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21489  test $ac_status = 0; }
21490done
21491
21492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21493$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21494if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21495  $as_echo_n "(cached) " >&6
21496else
21497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21498/* end confdefs.h.  */
21499
21500int
21501main ()
21502{
21503#ifndef __GNUC__
21504       choke me
21505#endif
21506
21507  ;
21508  return 0;
21509}
21510_ACEOF
21511if ac_fn_objc_try_compile "$LINENO"; then :
21512  ac_compiler_gnu=yes
21513else
21514  ac_compiler_gnu=no
21515fi
21516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21517ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21518
21519fi
21520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21521$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21522if test $ac_compiler_gnu = yes; then
21523  GOBJC=yes
21524else
21525  GOBJC=
21526fi
21527ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21528ac_save_OBJCFLAGS=$OBJCFLAGS
21529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21530$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21531if test "${ac_cv_prog_objc_g+set}" = set; then :
21532  $as_echo_n "(cached) " >&6
21533else
21534  ac_save_objc_werror_flag=$ac_objc_werror_flag
21535   ac_objc_werror_flag=yes
21536   ac_cv_prog_objc_g=no
21537   OBJCFLAGS="-g"
21538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21539/* end confdefs.h.  */
21540
21541int
21542main ()
21543{
21544
21545  ;
21546  return 0;
21547}
21548_ACEOF
21549if ac_fn_objc_try_compile "$LINENO"; then :
21550  ac_cv_prog_objc_g=yes
21551else
21552  OBJCFLAGS=""
21553      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21554/* end confdefs.h.  */
21555
21556int
21557main ()
21558{
21559
21560  ;
21561  return 0;
21562}
21563_ACEOF
21564if ac_fn_objc_try_compile "$LINENO"; then :
21565
21566else
21567  ac_objc_werror_flag=$ac_save_objc_werror_flag
21568	 OBJCFLAGS="-g"
21569	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21570/* end confdefs.h.  */
21571
21572int
21573main ()
21574{
21575
21576  ;
21577  return 0;
21578}
21579_ACEOF
21580if ac_fn_objc_try_compile "$LINENO"; then :
21581  ac_cv_prog_objc_g=yes
21582fi
21583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21584fi
21585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21586fi
21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21588   ac_objc_werror_flag=$ac_save_objc_werror_flag
21589fi
21590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21591$as_echo "$ac_cv_prog_objc_g" >&6; }
21592if test "$ac_test_OBJCFLAGS" = set; then
21593  OBJCFLAGS=$ac_save_OBJCFLAGS
21594elif test $ac_cv_prog_objc_g = yes; then
21595  if test "$GOBJC" = yes; then
21596    OBJCFLAGS="-g -O2"
21597  else
21598    OBJCFLAGS="-g"
21599  fi
21600else
21601  if test "$GOBJC" = yes; then
21602    OBJCFLAGS="-O2"
21603  else
21604    OBJCFLAGS=
21605  fi
21606fi
21607ac_ext=cpp
21608ac_cpp='$CXXCPP $CPPFLAGS'
21609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21612
21613
21614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21615
21616  # First separate the path from the arguments. This will split at the first
21617  # space.
21618  complete="$OBJC"
21619  path="${complete%% *}"
21620  tmp="$complete EOL"
21621  arguments="${tmp#* }"
21622
21623  # Input might be given as Windows format, start by converting to
21624  # unix format.
21625  new_path=`$CYGPATH -u "$path"`
21626
21627  # Now try to locate executable using which
21628  new_path=`$WHICH "$new_path" 2> /dev/null`
21629  # bat and cmd files are not always considered executable in cygwin causing which
21630  # to not find them
21631  if test "x$new_path" = x \
21632           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21633           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21634    new_path=`$CYGPATH -u "$path"`
21635  fi
21636  if test "x$new_path" = x; then
21637    # Oops. Which didn't find the executable.
21638    # The splitting of arguments from the executable at a space might have been incorrect,
21639    # since paths with space are more likely in Windows. Give it another try with the whole
21640    # argument.
21641    path="$complete"
21642    arguments="EOL"
21643    new_path=`$CYGPATH -u "$path"`
21644    new_path=`$WHICH "$new_path" 2> /dev/null`
21645    # bat and cmd files are not always considered executable in cygwin causing which
21646    # to not find them
21647    if test "x$new_path" = x \
21648             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21649             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21650      new_path=`$CYGPATH -u "$path"`
21651    fi
21652    if test "x$new_path" = x; then
21653      # It's still not found. Now this is an unrecoverable error.
21654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21655$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21656      has_space=`$ECHO "$complete" | $GREP " "`
21657      if test "x$has_space" != x; then
21658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21660      fi
21661      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21662    fi
21663  fi
21664
21665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21668  # "foo.exe" is OK but "foo" is an error.
21669  #
21670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21671  # It is also a way to make sure we got the proper file name for the real test later on.
21672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21673  if test "x$test_shortpath" = x; then
21674    # Short path failed, file does not exist as specified.
21675    # Try adding .exe or .cmd
21676    if test -f "${new_path}.exe"; then
21677       input_to_shortpath="${new_path}.exe"
21678    elif test -f "${new_path}.cmd"; then
21679       input_to_shortpath="${new_path}.cmd"
21680    else
21681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21682$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21683      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21684$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21685      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21686    fi
21687  else
21688    input_to_shortpath="$new_path"
21689  fi
21690
21691  # Call helper function which possibly converts this using DOS-style short mode.
21692  # If so, the updated path is stored in $new_path.
21693  new_path="$input_to_shortpath"
21694
21695  input_path="$input_to_shortpath"
21696  # Check if we need to convert this using DOS-style short mode. If the path
21697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21698  # take no chances and rewrite it.
21699  # Note: m4 eats our [], so we need to use [ and ] instead.
21700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21701  if test "x$has_forbidden_chars" != x; then
21702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21706      # Going to short mode and back again did indeed matter. Since short mode is
21707      # case insensitive, let's make it lowercase to improve readability.
21708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21709      # Now convert it back to Unix-stile (cygpath)
21710      input_path=`$CYGPATH -u "$shortmode_path"`
21711      new_path="$input_path"
21712    fi
21713  fi
21714
21715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21716  if test "x$test_cygdrive_prefix" = x; then
21717    # As a simple fix, exclude /usr/bin since it's not a real path.
21718    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21720      # a path prefixed by /cygdrive for fixpath to work.
21721      new_path="$CYGWIN_ROOT_PATH$input_path"
21722    fi
21723  fi
21724
21725  # remove trailing .exe if any
21726  new_path="${new_path/%.exe/}"
21727
21728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21729
21730  # First separate the path from the arguments. This will split at the first
21731  # space.
21732  complete="$OBJC"
21733  path="${complete%% *}"
21734  tmp="$complete EOL"
21735  arguments="${tmp#* }"
21736
21737  # Input might be given as Windows format, start by converting to
21738  # unix format.
21739  new_path="$path"
21740
21741  windows_path="$new_path"
21742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21743    unix_path=`$CYGPATH -u "$windows_path"`
21744    new_path="$unix_path"
21745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21747    new_path="$unix_path"
21748  fi
21749
21750
21751  # Now try to locate executable using which
21752  new_path=`$WHICH "$new_path" 2> /dev/null`
21753
21754  if test "x$new_path" = x; then
21755    # Oops. Which didn't find the executable.
21756    # The splitting of arguments from the executable at a space might have been incorrect,
21757    # since paths with space are more likely in Windows. Give it another try with the whole
21758    # argument.
21759    path="$complete"
21760    arguments="EOL"
21761    new_path="$path"
21762
21763  windows_path="$new_path"
21764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21765    unix_path=`$CYGPATH -u "$windows_path"`
21766    new_path="$unix_path"
21767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21769    new_path="$unix_path"
21770  fi
21771
21772
21773    new_path=`$WHICH "$new_path" 2> /dev/null`
21774
21775    if test "x$new_path" = x; then
21776      # It's still not found. Now this is an unrecoverable error.
21777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21778$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21779      has_space=`$ECHO "$complete" | $GREP " "`
21780      if test "x$has_space" != x; then
21781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21783      fi
21784      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21785    fi
21786  fi
21787
21788  # Now new_path has a complete unix path to the binary
21789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21790    # Keep paths in /bin as-is, but remove trailing .exe if any
21791    new_path="${new_path/%.exe/}"
21792    # Do not save /bin paths to all_fixpath_prefixes!
21793  else
21794    # Not in mixed or Windows style, start by that.
21795    new_path=`cmd //c echo $new_path`
21796
21797  input_path="$new_path"
21798  # Check if we need to convert this using DOS-style short mode. If the path
21799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21800  # take no chances and rewrite it.
21801  # Note: m4 eats our [], so we need to use [ and ] instead.
21802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21803  if test "x$has_forbidden_chars" != x; then
21804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21806  fi
21807
21808    # Output is in $new_path
21809
21810  windows_path="$new_path"
21811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21812    unix_path=`$CYGPATH -u "$windows_path"`
21813    new_path="$unix_path"
21814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21816    new_path="$unix_path"
21817  fi
21818
21819    # remove trailing .exe if any
21820    new_path="${new_path/%.exe/}"
21821
21822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21824  fi
21825
21826  else
21827    # We're on a posix platform. Hooray! :)
21828    # First separate the path from the arguments. This will split at the first
21829    # space.
21830    complete="$OBJC"
21831    path="${complete%% *}"
21832    tmp="$complete EOL"
21833    arguments="${tmp#* }"
21834
21835    # Cannot rely on the command "which" here since it doesn't always work.
21836    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21837    if test -z "$is_absolute_path"; then
21838      # Path to executable is not absolute. Find it.
21839      IFS_save="$IFS"
21840      IFS=:
21841      for p in $PATH; do
21842        if test -f "$p/$path" && test -x "$p/$path"; then
21843          new_path="$p/$path"
21844          break
21845        fi
21846      done
21847      IFS="$IFS_save"
21848    else
21849      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21850$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21851      new_path="$path"
21852    fi
21853
21854    if test "x$new_path" = x; then
21855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21856$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21857        has_space=`$ECHO "$complete" | $GREP " "`
21858        if test "x$has_space" != x; then
21859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21861        fi
21862        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21863      fi
21864  fi
21865
21866      # Now join together the path and the arguments once again
21867      if test "x$arguments" != xEOL; then
21868        new_complete="$new_path ${arguments% *}"
21869      else
21870        new_complete="$new_path"
21871      fi
21872
21873  if test "x$complete" != "x$new_complete"; then
21874      OBJC="$new_complete"
21875      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21876$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21877    fi
21878
21879else
21880    OBJC=
21881fi
21882
21883# Restore the flags to the user specified values.
21884# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21885CFLAGS="$ORG_CFLAGS"
21886CXXFLAGS="$ORG_CXXFLAGS"
21887OBJCFLAGS="$ORG_OBJCFLAGS"
21888
21889LD="$CC"
21890LDEXE="$CC"
21891LDCXX="$CXX"
21892LDEXECXX="$CXX"
21893
21894# LDEXE is the linker to use, when creating executables.
21895
21896# Linking C++ libraries.
21897
21898# Linking C++ executables.
21899
21900
21901if test "x$OPENJDK_TARGET_OS" != xwindows; then
21902    if test -n "$ac_tool_prefix"; then
21903  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21904set dummy ${ac_tool_prefix}ar; ac_word=$2
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21906$as_echo_n "checking for $ac_word... " >&6; }
21907if test "${ac_cv_prog_AR+set}" = set; then :
21908  $as_echo_n "(cached) " >&6
21909else
21910  if test -n "$AR"; then
21911  ac_cv_prog_AR="$AR" # Let the user override the test.
21912else
21913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21914for as_dir in $PATH
21915do
21916  IFS=$as_save_IFS
21917  test -z "$as_dir" && as_dir=.
21918    for ac_exec_ext in '' $ac_executable_extensions; do
21919  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21920    ac_cv_prog_AR="${ac_tool_prefix}ar"
21921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21922    break 2
21923  fi
21924done
21925  done
21926IFS=$as_save_IFS
21927
21928fi
21929fi
21930AR=$ac_cv_prog_AR
21931if test -n "$AR"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21933$as_echo "$AR" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940fi
21941if test -z "$ac_cv_prog_AR"; then
21942  ac_ct_AR=$AR
21943  # Extract the first word of "ar", so it can be a program name with args.
21944set dummy ar; ac_word=$2
21945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21946$as_echo_n "checking for $ac_word... " >&6; }
21947if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21948  $as_echo_n "(cached) " >&6
21949else
21950  if test -n "$ac_ct_AR"; then
21951  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21952else
21953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21954for as_dir in $PATH
21955do
21956  IFS=$as_save_IFS
21957  test -z "$as_dir" && as_dir=.
21958    for ac_exec_ext in '' $ac_executable_extensions; do
21959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21960    ac_cv_prog_ac_ct_AR="ar"
21961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21962    break 2
21963  fi
21964done
21965  done
21966IFS=$as_save_IFS
21967
21968fi
21969fi
21970ac_ct_AR=$ac_cv_prog_ac_ct_AR
21971if test -n "$ac_ct_AR"; then
21972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21973$as_echo "$ac_ct_AR" >&6; }
21974else
21975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21976$as_echo "no" >&6; }
21977fi
21978
21979  if test "x$ac_ct_AR" = x; then
21980    AR=""
21981  else
21982    case $cross_compiling:$ac_tool_warned in
21983yes:)
21984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21986ac_tool_warned=yes ;;
21987esac
21988    AR=$ac_ct_AR
21989  fi
21990else
21991  AR="$ac_cv_prog_AR"
21992fi
21993
21994
21995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21996
21997  # First separate the path from the arguments. This will split at the first
21998  # space.
21999  complete="$AR"
22000  path="${complete%% *}"
22001  tmp="$complete EOL"
22002  arguments="${tmp#* }"
22003
22004  # Input might be given as Windows format, start by converting to
22005  # unix format.
22006  new_path=`$CYGPATH -u "$path"`
22007
22008  # Now try to locate executable using which
22009  new_path=`$WHICH "$new_path" 2> /dev/null`
22010  # bat and cmd files are not always considered executable in cygwin causing which
22011  # to not find them
22012  if test "x$new_path" = x \
22013           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22014           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22015    new_path=`$CYGPATH -u "$path"`
22016  fi
22017  if test "x$new_path" = x; then
22018    # Oops. Which didn't find the executable.
22019    # The splitting of arguments from the executable at a space might have been incorrect,
22020    # since paths with space are more likely in Windows. Give it another try with the whole
22021    # argument.
22022    path="$complete"
22023    arguments="EOL"
22024    new_path=`$CYGPATH -u "$path"`
22025    new_path=`$WHICH "$new_path" 2> /dev/null`
22026    # bat and cmd files are not always considered executable in cygwin causing which
22027    # to not find them
22028    if test "x$new_path" = x \
22029             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22030             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22031      new_path=`$CYGPATH -u "$path"`
22032    fi
22033    if test "x$new_path" = x; then
22034      # It's still not found. Now this is an unrecoverable error.
22035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22036$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22037      has_space=`$ECHO "$complete" | $GREP " "`
22038      if test "x$has_space" != x; then
22039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22041      fi
22042      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22043    fi
22044  fi
22045
22046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22049  # "foo.exe" is OK but "foo" is an error.
22050  #
22051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22052  # It is also a way to make sure we got the proper file name for the real test later on.
22053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22054  if test "x$test_shortpath" = x; then
22055    # Short path failed, file does not exist as specified.
22056    # Try adding .exe or .cmd
22057    if test -f "${new_path}.exe"; then
22058       input_to_shortpath="${new_path}.exe"
22059    elif test -f "${new_path}.cmd"; then
22060       input_to_shortpath="${new_path}.cmd"
22061    else
22062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22063$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22066      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22067    fi
22068  else
22069    input_to_shortpath="$new_path"
22070  fi
22071
22072  # Call helper function which possibly converts this using DOS-style short mode.
22073  # If so, the updated path is stored in $new_path.
22074  new_path="$input_to_shortpath"
22075
22076  input_path="$input_to_shortpath"
22077  # Check if we need to convert this using DOS-style short mode. If the path
22078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22079  # take no chances and rewrite it.
22080  # Note: m4 eats our [], so we need to use [ and ] instead.
22081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22082  if test "x$has_forbidden_chars" != x; then
22083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22087      # Going to short mode and back again did indeed matter. Since short mode is
22088      # case insensitive, let's make it lowercase to improve readability.
22089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22090      # Now convert it back to Unix-stile (cygpath)
22091      input_path=`$CYGPATH -u "$shortmode_path"`
22092      new_path="$input_path"
22093    fi
22094  fi
22095
22096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22097  if test "x$test_cygdrive_prefix" = x; then
22098    # As a simple fix, exclude /usr/bin since it's not a real path.
22099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22101      # a path prefixed by /cygdrive for fixpath to work.
22102      new_path="$CYGWIN_ROOT_PATH$input_path"
22103    fi
22104  fi
22105
22106  # remove trailing .exe if any
22107  new_path="${new_path/%.exe/}"
22108
22109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22110
22111  # First separate the path from the arguments. This will split at the first
22112  # space.
22113  complete="$AR"
22114  path="${complete%% *}"
22115  tmp="$complete EOL"
22116  arguments="${tmp#* }"
22117
22118  # Input might be given as Windows format, start by converting to
22119  # unix format.
22120  new_path="$path"
22121
22122  windows_path="$new_path"
22123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22124    unix_path=`$CYGPATH -u "$windows_path"`
22125    new_path="$unix_path"
22126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22128    new_path="$unix_path"
22129  fi
22130
22131
22132  # Now try to locate executable using which
22133  new_path=`$WHICH "$new_path" 2> /dev/null`
22134
22135  if test "x$new_path" = x; then
22136    # Oops. Which didn't find the executable.
22137    # The splitting of arguments from the executable at a space might have been incorrect,
22138    # since paths with space are more likely in Windows. Give it another try with the whole
22139    # argument.
22140    path="$complete"
22141    arguments="EOL"
22142    new_path="$path"
22143
22144  windows_path="$new_path"
22145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22146    unix_path=`$CYGPATH -u "$windows_path"`
22147    new_path="$unix_path"
22148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22150    new_path="$unix_path"
22151  fi
22152
22153
22154    new_path=`$WHICH "$new_path" 2> /dev/null`
22155
22156    if test "x$new_path" = x; then
22157      # It's still not found. Now this is an unrecoverable error.
22158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22159$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22160      has_space=`$ECHO "$complete" | $GREP " "`
22161      if test "x$has_space" != x; then
22162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22164      fi
22165      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22166    fi
22167  fi
22168
22169  # Now new_path has a complete unix path to the binary
22170  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22171    # Keep paths in /bin as-is, but remove trailing .exe if any
22172    new_path="${new_path/%.exe/}"
22173    # Do not save /bin paths to all_fixpath_prefixes!
22174  else
22175    # Not in mixed or Windows style, start by that.
22176    new_path=`cmd //c echo $new_path`
22177
22178  input_path="$new_path"
22179  # Check if we need to convert this using DOS-style short mode. If the path
22180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22181  # take no chances and rewrite it.
22182  # Note: m4 eats our [], so we need to use [ and ] instead.
22183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22184  if test "x$has_forbidden_chars" != x; then
22185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22187  fi
22188
22189    # Output is in $new_path
22190
22191  windows_path="$new_path"
22192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22193    unix_path=`$CYGPATH -u "$windows_path"`
22194    new_path="$unix_path"
22195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22197    new_path="$unix_path"
22198  fi
22199
22200    # remove trailing .exe if any
22201    new_path="${new_path/%.exe/}"
22202
22203    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22204    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22205  fi
22206
22207  else
22208    # We're on a posix platform. Hooray! :)
22209    # First separate the path from the arguments. This will split at the first
22210    # space.
22211    complete="$AR"
22212    path="${complete%% *}"
22213    tmp="$complete EOL"
22214    arguments="${tmp#* }"
22215
22216    # Cannot rely on the command "which" here since it doesn't always work.
22217    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22218    if test -z "$is_absolute_path"; then
22219      # Path to executable is not absolute. Find it.
22220      IFS_save="$IFS"
22221      IFS=:
22222      for p in $PATH; do
22223        if test -f "$p/$path" && test -x "$p/$path"; then
22224          new_path="$p/$path"
22225          break
22226        fi
22227      done
22228      IFS="$IFS_save"
22229    else
22230      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22231$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22232      new_path="$path"
22233    fi
22234
22235    if test "x$new_path" = x; then
22236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22237$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22238        has_space=`$ECHO "$complete" | $GREP " "`
22239        if test "x$has_space" != x; then
22240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22242        fi
22243        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22244      fi
22245  fi
22246
22247      # Now join together the path and the arguments once again
22248      if test "x$arguments" != xEOL; then
22249        new_complete="$new_path ${arguments% *}"
22250      else
22251        new_complete="$new_path"
22252      fi
22253
22254  if test "x$complete" != "x$new_complete"; then
22255      AR="$new_complete"
22256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22257$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22258    fi
22259
22260fi
22261if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22262    ARFLAGS="-r"
22263else
22264    ARFLAGS=""
22265fi
22266
22267
22268# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22269HOTSPOT_CXX="$CXX"
22270HOTSPOT_LD="$LD"
22271
22272
22273
22274COMPILER_NAME=gcc
22275COMPILER_TYPE=CC
22276if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22277
22278    # For now, assume that we are always compiling using cl.exe.
22279    CC_OUT_OPTION=-Fo
22280    EXE_OUT_OPTION=-out:
22281    LD_OUT_OPTION=-out:
22282    AR_OUT_OPTION=-out:
22283    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22284    # program for something completely different.
22285    # Extract the first word of "link", so it can be a program name with args.
22286set dummy link; ac_word=$2
22287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22288$as_echo_n "checking for $ac_word... " >&6; }
22289if test "${ac_cv_prog_WINLD+set}" = set; then :
22290  $as_echo_n "(cached) " >&6
22291else
22292  if test -n "$WINLD"; then
22293  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22294else
22295  ac_prog_rejected=no
22296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22297for as_dir in $PATH
22298do
22299  IFS=$as_save_IFS
22300  test -z "$as_dir" && as_dir=.
22301    for ac_exec_ext in '' $ac_executable_extensions; do
22302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22303    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22304       ac_prog_rejected=yes
22305       continue
22306     fi
22307    ac_cv_prog_WINLD="link"
22308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22309    break 2
22310  fi
22311done
22312  done
22313IFS=$as_save_IFS
22314
22315if test $ac_prog_rejected = yes; then
22316  # We found a bogon in the path, so make sure we never use it.
22317  set dummy $ac_cv_prog_WINLD
22318  shift
22319  if test $# != 0; then
22320    # We chose a different compiler from the bogus one.
22321    # However, it has the same basename, so the bogon will be chosen
22322    # first if we set WINLD to just the basename; use the full file name.
22323    shift
22324    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22325  fi
22326fi
22327fi
22328fi
22329WINLD=$ac_cv_prog_WINLD
22330if test -n "$WINLD"; then
22331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22332$as_echo "$WINLD" >&6; }
22333else
22334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22335$as_echo "no" >&6; }
22336fi
22337
22338
22339    # Since we must ignore the first found link, WINLD will contain
22340    # the full path to the link.exe program.
22341
22342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22343
22344  # First separate the path from the arguments. This will split at the first
22345  # space.
22346  complete="$WINLD"
22347  path="${complete%% *}"
22348  tmp="$complete EOL"
22349  arguments="${tmp#* }"
22350
22351  # Input might be given as Windows format, start by converting to
22352  # unix format.
22353  new_path=`$CYGPATH -u "$path"`
22354
22355  # Now try to locate executable using which
22356  new_path=`$WHICH "$new_path" 2> /dev/null`
22357  # bat and cmd files are not always considered executable in cygwin causing which
22358  # to not find them
22359  if test "x$new_path" = x \
22360           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22361           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22362    new_path=`$CYGPATH -u "$path"`
22363  fi
22364  if test "x$new_path" = x; then
22365    # Oops. Which didn't find the executable.
22366    # The splitting of arguments from the executable at a space might have been incorrect,
22367    # since paths with space are more likely in Windows. Give it another try with the whole
22368    # argument.
22369    path="$complete"
22370    arguments="EOL"
22371    new_path=`$CYGPATH -u "$path"`
22372    new_path=`$WHICH "$new_path" 2> /dev/null`
22373    # bat and cmd files are not always considered executable in cygwin causing which
22374    # to not find them
22375    if test "x$new_path" = x \
22376             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22377             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22378      new_path=`$CYGPATH -u "$path"`
22379    fi
22380    if test "x$new_path" = x; then
22381      # It's still not found. Now this is an unrecoverable error.
22382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22383$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22384      has_space=`$ECHO "$complete" | $GREP " "`
22385      if test "x$has_space" != x; then
22386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22388      fi
22389      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22390    fi
22391  fi
22392
22393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22396  # "foo.exe" is OK but "foo" is an error.
22397  #
22398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22399  # It is also a way to make sure we got the proper file name for the real test later on.
22400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22401  if test "x$test_shortpath" = x; then
22402    # Short path failed, file does not exist as specified.
22403    # Try adding .exe or .cmd
22404    if test -f "${new_path}.exe"; then
22405       input_to_shortpath="${new_path}.exe"
22406    elif test -f "${new_path}.cmd"; then
22407       input_to_shortpath="${new_path}.cmd"
22408    else
22409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22410$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22413      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22414    fi
22415  else
22416    input_to_shortpath="$new_path"
22417  fi
22418
22419  # Call helper function which possibly converts this using DOS-style short mode.
22420  # If so, the updated path is stored in $new_path.
22421  new_path="$input_to_shortpath"
22422
22423  input_path="$input_to_shortpath"
22424  # Check if we need to convert this using DOS-style short mode. If the path
22425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22426  # take no chances and rewrite it.
22427  # Note: m4 eats our [], so we need to use [ and ] instead.
22428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22429  if test "x$has_forbidden_chars" != x; then
22430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22434      # Going to short mode and back again did indeed matter. Since short mode is
22435      # case insensitive, let's make it lowercase to improve readability.
22436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22437      # Now convert it back to Unix-stile (cygpath)
22438      input_path=`$CYGPATH -u "$shortmode_path"`
22439      new_path="$input_path"
22440    fi
22441  fi
22442
22443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22444  if test "x$test_cygdrive_prefix" = x; then
22445    # As a simple fix, exclude /usr/bin since it's not a real path.
22446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22448      # a path prefixed by /cygdrive for fixpath to work.
22449      new_path="$CYGWIN_ROOT_PATH$input_path"
22450    fi
22451  fi
22452
22453  # remove trailing .exe if any
22454  new_path="${new_path/%.exe/}"
22455
22456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22457
22458  # First separate the path from the arguments. This will split at the first
22459  # space.
22460  complete="$WINLD"
22461  path="${complete%% *}"
22462  tmp="$complete EOL"
22463  arguments="${tmp#* }"
22464
22465  # Input might be given as Windows format, start by converting to
22466  # unix format.
22467  new_path="$path"
22468
22469  windows_path="$new_path"
22470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22471    unix_path=`$CYGPATH -u "$windows_path"`
22472    new_path="$unix_path"
22473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22475    new_path="$unix_path"
22476  fi
22477
22478
22479  # Now try to locate executable using which
22480  new_path=`$WHICH "$new_path" 2> /dev/null`
22481
22482  if test "x$new_path" = x; then
22483    # Oops. Which didn't find the executable.
22484    # The splitting of arguments from the executable at a space might have been incorrect,
22485    # since paths with space are more likely in Windows. Give it another try with the whole
22486    # argument.
22487    path="$complete"
22488    arguments="EOL"
22489    new_path="$path"
22490
22491  windows_path="$new_path"
22492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22493    unix_path=`$CYGPATH -u "$windows_path"`
22494    new_path="$unix_path"
22495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22497    new_path="$unix_path"
22498  fi
22499
22500
22501    new_path=`$WHICH "$new_path" 2> /dev/null`
22502
22503    if test "x$new_path" = x; then
22504      # It's still not found. Now this is an unrecoverable error.
22505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22506$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22507      has_space=`$ECHO "$complete" | $GREP " "`
22508      if test "x$has_space" != x; then
22509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22511      fi
22512      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22513    fi
22514  fi
22515
22516  # Now new_path has a complete unix path to the binary
22517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22518    # Keep paths in /bin as-is, but remove trailing .exe if any
22519    new_path="${new_path/%.exe/}"
22520    # Do not save /bin paths to all_fixpath_prefixes!
22521  else
22522    # Not in mixed or Windows style, start by that.
22523    new_path=`cmd //c echo $new_path`
22524
22525  input_path="$new_path"
22526  # Check if we need to convert this using DOS-style short mode. If the path
22527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22528  # take no chances and rewrite it.
22529  # Note: m4 eats our [], so we need to use [ and ] instead.
22530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22531  if test "x$has_forbidden_chars" != x; then
22532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22534  fi
22535
22536    # Output is in $new_path
22537
22538  windows_path="$new_path"
22539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22540    unix_path=`$CYGPATH -u "$windows_path"`
22541    new_path="$unix_path"
22542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22544    new_path="$unix_path"
22545  fi
22546
22547    # remove trailing .exe if any
22548    new_path="${new_path/%.exe/}"
22549
22550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22552  fi
22553
22554  else
22555    # We're on a posix platform. Hooray! :)
22556    # First separate the path from the arguments. This will split at the first
22557    # space.
22558    complete="$WINLD"
22559    path="${complete%% *}"
22560    tmp="$complete EOL"
22561    arguments="${tmp#* }"
22562
22563    # Cannot rely on the command "which" here since it doesn't always work.
22564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22565    if test -z "$is_absolute_path"; then
22566      # Path to executable is not absolute. Find it.
22567      IFS_save="$IFS"
22568      IFS=:
22569      for p in $PATH; do
22570        if test -f "$p/$path" && test -x "$p/$path"; then
22571          new_path="$p/$path"
22572          break
22573        fi
22574      done
22575      IFS="$IFS_save"
22576    else
22577      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22578$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22579      new_path="$path"
22580    fi
22581
22582    if test "x$new_path" = x; then
22583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22584$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22585        has_space=`$ECHO "$complete" | $GREP " "`
22586        if test "x$has_space" != x; then
22587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22589        fi
22590        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22591      fi
22592  fi
22593
22594      # Now join together the path and the arguments once again
22595      if test "x$arguments" != xEOL; then
22596        new_complete="$new_path ${arguments% *}"
22597      else
22598        new_complete="$new_path"
22599      fi
22600
22601  if test "x$complete" != "x$new_complete"; then
22602      WINLD="$new_complete"
22603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22604$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22605    fi
22606
22607    printf "Windows linker was found at $WINLD\n"
22608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22609$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22610    "$WINLD" --version > /dev/null
22611    if test $? -eq 0 ; then
22612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22613$as_echo "no" >&6; }
22614      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22615    else
22616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22617$as_echo "yes" >&6; }
22618    fi
22619    LD="$WINLD"
22620    LDEXE="$WINLD"
22621    LDCXX="$WINLD"
22622    LDEXECXX="$WINLD"
22623
22624    # Extract the first word of "mt", so it can be a program name with args.
22625set dummy mt; ac_word=$2
22626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22627$as_echo_n "checking for $ac_word... " >&6; }
22628if test "${ac_cv_prog_MT+set}" = set; then :
22629  $as_echo_n "(cached) " >&6
22630else
22631  if test -n "$MT"; then
22632  ac_cv_prog_MT="$MT" # Let the user override the test.
22633else
22634  ac_prog_rejected=no
22635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22636for as_dir in $PATH
22637do
22638  IFS=$as_save_IFS
22639  test -z "$as_dir" && as_dir=.
22640    for ac_exec_ext in '' $ac_executable_extensions; do
22641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22642    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22643       ac_prog_rejected=yes
22644       continue
22645     fi
22646    ac_cv_prog_MT="mt"
22647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22648    break 2
22649  fi
22650done
22651  done
22652IFS=$as_save_IFS
22653
22654if test $ac_prog_rejected = yes; then
22655  # We found a bogon in the path, so make sure we never use it.
22656  set dummy $ac_cv_prog_MT
22657  shift
22658  if test $# != 0; then
22659    # We chose a different compiler from the bogus one.
22660    # However, it has the same basename, so the bogon will be chosen
22661    # first if we set MT to just the basename; use the full file name.
22662    shift
22663    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22664  fi
22665fi
22666fi
22667fi
22668MT=$ac_cv_prog_MT
22669if test -n "$MT"; then
22670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22671$as_echo "$MT" >&6; }
22672else
22673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22674$as_echo "no" >&6; }
22675fi
22676
22677
22678
22679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22680
22681  # First separate the path from the arguments. This will split at the first
22682  # space.
22683  complete="$MT"
22684  path="${complete%% *}"
22685  tmp="$complete EOL"
22686  arguments="${tmp#* }"
22687
22688  # Input might be given as Windows format, start by converting to
22689  # unix format.
22690  new_path=`$CYGPATH -u "$path"`
22691
22692  # Now try to locate executable using which
22693  new_path=`$WHICH "$new_path" 2> /dev/null`
22694  # bat and cmd files are not always considered executable in cygwin causing which
22695  # to not find them
22696  if test "x$new_path" = x \
22697           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22698           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22699    new_path=`$CYGPATH -u "$path"`
22700  fi
22701  if test "x$new_path" = x; then
22702    # Oops. Which didn't find the executable.
22703    # The splitting of arguments from the executable at a space might have been incorrect,
22704    # since paths with space are more likely in Windows. Give it another try with the whole
22705    # argument.
22706    path="$complete"
22707    arguments="EOL"
22708    new_path=`$CYGPATH -u "$path"`
22709    new_path=`$WHICH "$new_path" 2> /dev/null`
22710    # bat and cmd files are not always considered executable in cygwin causing which
22711    # to not find them
22712    if test "x$new_path" = x \
22713             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22714             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22715      new_path=`$CYGPATH -u "$path"`
22716    fi
22717    if test "x$new_path" = x; then
22718      # It's still not found. Now this is an unrecoverable error.
22719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22720$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22721      has_space=`$ECHO "$complete" | $GREP " "`
22722      if test "x$has_space" != x; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22725      fi
22726      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22727    fi
22728  fi
22729
22730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22733  # "foo.exe" is OK but "foo" is an error.
22734  #
22735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22736  # It is also a way to make sure we got the proper file name for the real test later on.
22737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22738  if test "x$test_shortpath" = x; then
22739    # Short path failed, file does not exist as specified.
22740    # Try adding .exe or .cmd
22741    if test -f "${new_path}.exe"; then
22742       input_to_shortpath="${new_path}.exe"
22743    elif test -f "${new_path}.cmd"; then
22744       input_to_shortpath="${new_path}.cmd"
22745    else
22746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22747$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22748      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22749$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22750      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22751    fi
22752  else
22753    input_to_shortpath="$new_path"
22754  fi
22755
22756  # Call helper function which possibly converts this using DOS-style short mode.
22757  # If so, the updated path is stored in $new_path.
22758  new_path="$input_to_shortpath"
22759
22760  input_path="$input_to_shortpath"
22761  # Check if we need to convert this using DOS-style short mode. If the path
22762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22763  # take no chances and rewrite it.
22764  # Note: m4 eats our [], so we need to use [ and ] instead.
22765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22766  if test "x$has_forbidden_chars" != x; then
22767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22771      # Going to short mode and back again did indeed matter. Since short mode is
22772      # case insensitive, let's make it lowercase to improve readability.
22773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22774      # Now convert it back to Unix-stile (cygpath)
22775      input_path=`$CYGPATH -u "$shortmode_path"`
22776      new_path="$input_path"
22777    fi
22778  fi
22779
22780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22781  if test "x$test_cygdrive_prefix" = x; then
22782    # As a simple fix, exclude /usr/bin since it's not a real path.
22783    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22785      # a path prefixed by /cygdrive for fixpath to work.
22786      new_path="$CYGWIN_ROOT_PATH$input_path"
22787    fi
22788  fi
22789
22790  # remove trailing .exe if any
22791  new_path="${new_path/%.exe/}"
22792
22793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22794
22795  # First separate the path from the arguments. This will split at the first
22796  # space.
22797  complete="$MT"
22798  path="${complete%% *}"
22799  tmp="$complete EOL"
22800  arguments="${tmp#* }"
22801
22802  # Input might be given as Windows format, start by converting to
22803  # unix format.
22804  new_path="$path"
22805
22806  windows_path="$new_path"
22807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22808    unix_path=`$CYGPATH -u "$windows_path"`
22809    new_path="$unix_path"
22810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22812    new_path="$unix_path"
22813  fi
22814
22815
22816  # Now try to locate executable using which
22817  new_path=`$WHICH "$new_path" 2> /dev/null`
22818
22819  if test "x$new_path" = x; then
22820    # Oops. Which didn't find the executable.
22821    # The splitting of arguments from the executable at a space might have been incorrect,
22822    # since paths with space are more likely in Windows. Give it another try with the whole
22823    # argument.
22824    path="$complete"
22825    arguments="EOL"
22826    new_path="$path"
22827
22828  windows_path="$new_path"
22829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22830    unix_path=`$CYGPATH -u "$windows_path"`
22831    new_path="$unix_path"
22832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22834    new_path="$unix_path"
22835  fi
22836
22837
22838    new_path=`$WHICH "$new_path" 2> /dev/null`
22839
22840    if test "x$new_path" = x; then
22841      # It's still not found. Now this is an unrecoverable error.
22842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22843$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22844      has_space=`$ECHO "$complete" | $GREP " "`
22845      if test "x$has_space" != x; then
22846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22848      fi
22849      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22850    fi
22851  fi
22852
22853  # Now new_path has a complete unix path to the binary
22854  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22855    # Keep paths in /bin as-is, but remove trailing .exe if any
22856    new_path="${new_path/%.exe/}"
22857    # Do not save /bin paths to all_fixpath_prefixes!
22858  else
22859    # Not in mixed or Windows style, start by that.
22860    new_path=`cmd //c echo $new_path`
22861
22862  input_path="$new_path"
22863  # Check if we need to convert this using DOS-style short mode. If the path
22864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22865  # take no chances and rewrite it.
22866  # Note: m4 eats our [], so we need to use [ and ] instead.
22867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22868  if test "x$has_forbidden_chars" != x; then
22869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22871  fi
22872
22873    # Output is in $new_path
22874
22875  windows_path="$new_path"
22876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22877    unix_path=`$CYGPATH -u "$windows_path"`
22878    new_path="$unix_path"
22879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22881    new_path="$unix_path"
22882  fi
22883
22884    # remove trailing .exe if any
22885    new_path="${new_path/%.exe/}"
22886
22887    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22888    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22889  fi
22890
22891  else
22892    # We're on a posix platform. Hooray! :)
22893    # First separate the path from the arguments. This will split at the first
22894    # space.
22895    complete="$MT"
22896    path="${complete%% *}"
22897    tmp="$complete EOL"
22898    arguments="${tmp#* }"
22899
22900    # Cannot rely on the command "which" here since it doesn't always work.
22901    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22902    if test -z "$is_absolute_path"; then
22903      # Path to executable is not absolute. Find it.
22904      IFS_save="$IFS"
22905      IFS=:
22906      for p in $PATH; do
22907        if test -f "$p/$path" && test -x "$p/$path"; then
22908          new_path="$p/$path"
22909          break
22910        fi
22911      done
22912      IFS="$IFS_save"
22913    else
22914      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22915$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22916      new_path="$path"
22917    fi
22918
22919    if test "x$new_path" = x; then
22920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22921$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22922        has_space=`$ECHO "$complete" | $GREP " "`
22923        if test "x$has_space" != x; then
22924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22926        fi
22927        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22928      fi
22929  fi
22930
22931      # Now join together the path and the arguments once again
22932      if test "x$arguments" != xEOL; then
22933        new_complete="$new_path ${arguments% *}"
22934      else
22935        new_complete="$new_path"
22936      fi
22937
22938  if test "x$complete" != "x$new_complete"; then
22939      MT="$new_complete"
22940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22941$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22942    fi
22943
22944    # The resource compiler
22945    # Extract the first word of "rc", so it can be a program name with args.
22946set dummy rc; ac_word=$2
22947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22948$as_echo_n "checking for $ac_word... " >&6; }
22949if test "${ac_cv_prog_RC+set}" = set; then :
22950  $as_echo_n "(cached) " >&6
22951else
22952  if test -n "$RC"; then
22953  ac_cv_prog_RC="$RC" # Let the user override the test.
22954else
22955  ac_prog_rejected=no
22956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22957for as_dir in $PATH
22958do
22959  IFS=$as_save_IFS
22960  test -z "$as_dir" && as_dir=.
22961    for ac_exec_ext in '' $ac_executable_extensions; do
22962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22963    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22964       ac_prog_rejected=yes
22965       continue
22966     fi
22967    ac_cv_prog_RC="rc"
22968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22969    break 2
22970  fi
22971done
22972  done
22973IFS=$as_save_IFS
22974
22975if test $ac_prog_rejected = yes; then
22976  # We found a bogon in the path, so make sure we never use it.
22977  set dummy $ac_cv_prog_RC
22978  shift
22979  if test $# != 0; then
22980    # We chose a different compiler from the bogus one.
22981    # However, it has the same basename, so the bogon will be chosen
22982    # first if we set RC to just the basename; use the full file name.
22983    shift
22984    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22985  fi
22986fi
22987fi
22988fi
22989RC=$ac_cv_prog_RC
22990if test -n "$RC"; then
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22992$as_echo "$RC" >&6; }
22993else
22994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22995$as_echo "no" >&6; }
22996fi
22997
22998
22999
23000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23001
23002  # First separate the path from the arguments. This will split at the first
23003  # space.
23004  complete="$RC"
23005  path="${complete%% *}"
23006  tmp="$complete EOL"
23007  arguments="${tmp#* }"
23008
23009  # Input might be given as Windows format, start by converting to
23010  # unix format.
23011  new_path=`$CYGPATH -u "$path"`
23012
23013  # Now try to locate executable using which
23014  new_path=`$WHICH "$new_path" 2> /dev/null`
23015  # bat and cmd files are not always considered executable in cygwin causing which
23016  # to not find them
23017  if test "x$new_path" = x \
23018           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23019           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23020    new_path=`$CYGPATH -u "$path"`
23021  fi
23022  if test "x$new_path" = x; then
23023    # Oops. Which didn't find the executable.
23024    # The splitting of arguments from the executable at a space might have been incorrect,
23025    # since paths with space are more likely in Windows. Give it another try with the whole
23026    # argument.
23027    path="$complete"
23028    arguments="EOL"
23029    new_path=`$CYGPATH -u "$path"`
23030    new_path=`$WHICH "$new_path" 2> /dev/null`
23031    # bat and cmd files are not always considered executable in cygwin causing which
23032    # to not find them
23033    if test "x$new_path" = x \
23034             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23035             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23036      new_path=`$CYGPATH -u "$path"`
23037    fi
23038    if test "x$new_path" = x; then
23039      # It's still not found. Now this is an unrecoverable error.
23040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23041$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23042      has_space=`$ECHO "$complete" | $GREP " "`
23043      if test "x$has_space" != x; then
23044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23046      fi
23047      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23048    fi
23049  fi
23050
23051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23054  # "foo.exe" is OK but "foo" is an error.
23055  #
23056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23057  # It is also a way to make sure we got the proper file name for the real test later on.
23058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23059  if test "x$test_shortpath" = x; then
23060    # Short path failed, file does not exist as specified.
23061    # Try adding .exe or .cmd
23062    if test -f "${new_path}.exe"; then
23063       input_to_shortpath="${new_path}.exe"
23064    elif test -f "${new_path}.cmd"; then
23065       input_to_shortpath="${new_path}.cmd"
23066    else
23067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23068$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23071      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23072    fi
23073  else
23074    input_to_shortpath="$new_path"
23075  fi
23076
23077  # Call helper function which possibly converts this using DOS-style short mode.
23078  # If so, the updated path is stored in $new_path.
23079  new_path="$input_to_shortpath"
23080
23081  input_path="$input_to_shortpath"
23082  # Check if we need to convert this using DOS-style short mode. If the path
23083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23084  # take no chances and rewrite it.
23085  # Note: m4 eats our [], so we need to use [ and ] instead.
23086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23087  if test "x$has_forbidden_chars" != x; then
23088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23092      # Going to short mode and back again did indeed matter. Since short mode is
23093      # case insensitive, let's make it lowercase to improve readability.
23094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23095      # Now convert it back to Unix-stile (cygpath)
23096      input_path=`$CYGPATH -u "$shortmode_path"`
23097      new_path="$input_path"
23098    fi
23099  fi
23100
23101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23102  if test "x$test_cygdrive_prefix" = x; then
23103    # As a simple fix, exclude /usr/bin since it's not a real path.
23104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23106      # a path prefixed by /cygdrive for fixpath to work.
23107      new_path="$CYGWIN_ROOT_PATH$input_path"
23108    fi
23109  fi
23110
23111  # remove trailing .exe if any
23112  new_path="${new_path/%.exe/}"
23113
23114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23115
23116  # First separate the path from the arguments. This will split at the first
23117  # space.
23118  complete="$RC"
23119  path="${complete%% *}"
23120  tmp="$complete EOL"
23121  arguments="${tmp#* }"
23122
23123  # Input might be given as Windows format, start by converting to
23124  # unix format.
23125  new_path="$path"
23126
23127  windows_path="$new_path"
23128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23129    unix_path=`$CYGPATH -u "$windows_path"`
23130    new_path="$unix_path"
23131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23133    new_path="$unix_path"
23134  fi
23135
23136
23137  # Now try to locate executable using which
23138  new_path=`$WHICH "$new_path" 2> /dev/null`
23139
23140  if test "x$new_path" = x; then
23141    # Oops. Which didn't find the executable.
23142    # The splitting of arguments from the executable at a space might have been incorrect,
23143    # since paths with space are more likely in Windows. Give it another try with the whole
23144    # argument.
23145    path="$complete"
23146    arguments="EOL"
23147    new_path="$path"
23148
23149  windows_path="$new_path"
23150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23151    unix_path=`$CYGPATH -u "$windows_path"`
23152    new_path="$unix_path"
23153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23155    new_path="$unix_path"
23156  fi
23157
23158
23159    new_path=`$WHICH "$new_path" 2> /dev/null`
23160
23161    if test "x$new_path" = x; then
23162      # It's still not found. Now this is an unrecoverable error.
23163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23164$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23165      has_space=`$ECHO "$complete" | $GREP " "`
23166      if test "x$has_space" != x; then
23167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23169      fi
23170      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23171    fi
23172  fi
23173
23174  # Now new_path has a complete unix path to the binary
23175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23176    # Keep paths in /bin as-is, but remove trailing .exe if any
23177    new_path="${new_path/%.exe/}"
23178    # Do not save /bin paths to all_fixpath_prefixes!
23179  else
23180    # Not in mixed or Windows style, start by that.
23181    new_path=`cmd //c echo $new_path`
23182
23183  input_path="$new_path"
23184  # Check if we need to convert this using DOS-style short mode. If the path
23185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23186  # take no chances and rewrite it.
23187  # Note: m4 eats our [], so we need to use [ and ] instead.
23188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23189  if test "x$has_forbidden_chars" != x; then
23190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23192  fi
23193
23194    # Output is in $new_path
23195
23196  windows_path="$new_path"
23197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23198    unix_path=`$CYGPATH -u "$windows_path"`
23199    new_path="$unix_path"
23200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23202    new_path="$unix_path"
23203  fi
23204
23205    # remove trailing .exe if any
23206    new_path="${new_path/%.exe/}"
23207
23208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23210  fi
23211
23212  else
23213    # We're on a posix platform. Hooray! :)
23214    # First separate the path from the arguments. This will split at the first
23215    # space.
23216    complete="$RC"
23217    path="${complete%% *}"
23218    tmp="$complete EOL"
23219    arguments="${tmp#* }"
23220
23221    # Cannot rely on the command "which" here since it doesn't always work.
23222    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23223    if test -z "$is_absolute_path"; then
23224      # Path to executable is not absolute. Find it.
23225      IFS_save="$IFS"
23226      IFS=:
23227      for p in $PATH; do
23228        if test -f "$p/$path" && test -x "$p/$path"; then
23229          new_path="$p/$path"
23230          break
23231        fi
23232      done
23233      IFS="$IFS_save"
23234    else
23235      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23236$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23237      new_path="$path"
23238    fi
23239
23240    if test "x$new_path" = x; then
23241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23242$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23243        has_space=`$ECHO "$complete" | $GREP " "`
23244        if test "x$has_space" != x; then
23245          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23246$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23247        fi
23248        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23249      fi
23250  fi
23251
23252      # Now join together the path and the arguments once again
23253      if test "x$arguments" != xEOL; then
23254        new_complete="$new_path ${arguments% *}"
23255      else
23256        new_complete="$new_path"
23257      fi
23258
23259  if test "x$complete" != "x$new_complete"; then
23260      RC="$new_complete"
23261      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23262$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23263    fi
23264
23265
23266    # For hotspot, we need these in Windows mixed path,
23267    # so rewrite them all. Need added .exe suffix.
23268    HOTSPOT_CXX="$CXX.exe"
23269    HOTSPOT_LD="$LD.exe"
23270    HOTSPOT_MT="$MT.exe"
23271    HOTSPOT_RC="$RC.exe"
23272
23273  unix_path="$HOTSPOT_CXX"
23274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23275    windows_path=`$CYGPATH -m "$unix_path"`
23276    HOTSPOT_CXX="$windows_path"
23277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23278    windows_path=`cmd //c echo $unix_path`
23279    HOTSPOT_CXX="$windows_path"
23280  fi
23281
23282
23283  unix_path="$HOTSPOT_LD"
23284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23285    windows_path=`$CYGPATH -m "$unix_path"`
23286    HOTSPOT_LD="$windows_path"
23287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23288    windows_path=`cmd //c echo $unix_path`
23289    HOTSPOT_LD="$windows_path"
23290  fi
23291
23292
23293  unix_path="$HOTSPOT_MT"
23294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23295    windows_path=`$CYGPATH -m "$unix_path"`
23296    HOTSPOT_MT="$windows_path"
23297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23298    windows_path=`cmd //c echo $unix_path`
23299    HOTSPOT_MT="$windows_path"
23300  fi
23301
23302
23303  unix_path="$HOTSPOT_RC"
23304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23305    windows_path=`$CYGPATH -m "$unix_path"`
23306    HOTSPOT_RC="$windows_path"
23307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23308    windows_path=`cmd //c echo $unix_path`
23309    HOTSPOT_RC="$windows_path"
23310  fi
23311
23312
23313
23314
23315    RC_FLAGS="-nologo -l 0x409 -r"
23316    if test "x$VARIANT" = xOPT; then :
23317
23318        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23319
23320fi
23321    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23322    if test "x$JDK_UPDATE_VERSION" = x; then :
23323
23324        JDK_UPDATE_VERSION_NOTNULL=0
23325
23326fi
23327    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23328    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23329    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23330    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23331    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23332    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23333    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23334
23335    # lib.exe is used to create static libraries.
23336    # Extract the first word of "lib", so it can be a program name with args.
23337set dummy lib; ac_word=$2
23338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23339$as_echo_n "checking for $ac_word... " >&6; }
23340if test "${ac_cv_prog_WINAR+set}" = set; then :
23341  $as_echo_n "(cached) " >&6
23342else
23343  if test -n "$WINAR"; then
23344  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23345else
23346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23347for as_dir in $PATH
23348do
23349  IFS=$as_save_IFS
23350  test -z "$as_dir" && as_dir=.
23351    for ac_exec_ext in '' $ac_executable_extensions; do
23352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23353    ac_cv_prog_WINAR="lib"
23354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23355    break 2
23356  fi
23357done
23358  done
23359IFS=$as_save_IFS
23360
23361fi
23362fi
23363WINAR=$ac_cv_prog_WINAR
23364if test -n "$WINAR"; then
23365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23366$as_echo "$WINAR" >&6; }
23367else
23368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23369$as_echo "no" >&6; }
23370fi
23371
23372
23373
23374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23375
23376  # First separate the path from the arguments. This will split at the first
23377  # space.
23378  complete="$WINAR"
23379  path="${complete%% *}"
23380  tmp="$complete EOL"
23381  arguments="${tmp#* }"
23382
23383  # Input might be given as Windows format, start by converting to
23384  # unix format.
23385  new_path=`$CYGPATH -u "$path"`
23386
23387  # Now try to locate executable using which
23388  new_path=`$WHICH "$new_path" 2> /dev/null`
23389  # bat and cmd files are not always considered executable in cygwin causing which
23390  # to not find them
23391  if test "x$new_path" = x \
23392           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23393           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23394    new_path=`$CYGPATH -u "$path"`
23395  fi
23396  if test "x$new_path" = x; then
23397    # Oops. Which didn't find the executable.
23398    # The splitting of arguments from the executable at a space might have been incorrect,
23399    # since paths with space are more likely in Windows. Give it another try with the whole
23400    # argument.
23401    path="$complete"
23402    arguments="EOL"
23403    new_path=`$CYGPATH -u "$path"`
23404    new_path=`$WHICH "$new_path" 2> /dev/null`
23405    # bat and cmd files are not always considered executable in cygwin causing which
23406    # to not find them
23407    if test "x$new_path" = x \
23408             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23409             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23410      new_path=`$CYGPATH -u "$path"`
23411    fi
23412    if test "x$new_path" = x; then
23413      # It's still not found. Now this is an unrecoverable error.
23414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23415$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23416      has_space=`$ECHO "$complete" | $GREP " "`
23417      if test "x$has_space" != x; then
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23420      fi
23421      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23422    fi
23423  fi
23424
23425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23428  # "foo.exe" is OK but "foo" is an error.
23429  #
23430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23431  # It is also a way to make sure we got the proper file name for the real test later on.
23432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23433  if test "x$test_shortpath" = x; then
23434    # Short path failed, file does not exist as specified.
23435    # Try adding .exe or .cmd
23436    if test -f "${new_path}.exe"; then
23437       input_to_shortpath="${new_path}.exe"
23438    elif test -f "${new_path}.cmd"; then
23439       input_to_shortpath="${new_path}.cmd"
23440    else
23441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23442$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23445      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23446    fi
23447  else
23448    input_to_shortpath="$new_path"
23449  fi
23450
23451  # Call helper function which possibly converts this using DOS-style short mode.
23452  # If so, the updated path is stored in $new_path.
23453  new_path="$input_to_shortpath"
23454
23455  input_path="$input_to_shortpath"
23456  # Check if we need to convert this using DOS-style short mode. If the path
23457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23458  # take no chances and rewrite it.
23459  # Note: m4 eats our [], so we need to use [ and ] instead.
23460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23461  if test "x$has_forbidden_chars" != x; then
23462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23466      # Going to short mode and back again did indeed matter. Since short mode is
23467      # case insensitive, let's make it lowercase to improve readability.
23468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23469      # Now convert it back to Unix-stile (cygpath)
23470      input_path=`$CYGPATH -u "$shortmode_path"`
23471      new_path="$input_path"
23472    fi
23473  fi
23474
23475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23476  if test "x$test_cygdrive_prefix" = x; then
23477    # As a simple fix, exclude /usr/bin since it's not a real path.
23478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23480      # a path prefixed by /cygdrive for fixpath to work.
23481      new_path="$CYGWIN_ROOT_PATH$input_path"
23482    fi
23483  fi
23484
23485  # remove trailing .exe if any
23486  new_path="${new_path/%.exe/}"
23487
23488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23489
23490  # First separate the path from the arguments. This will split at the first
23491  # space.
23492  complete="$WINAR"
23493  path="${complete%% *}"
23494  tmp="$complete EOL"
23495  arguments="${tmp#* }"
23496
23497  # Input might be given as Windows format, start by converting to
23498  # unix format.
23499  new_path="$path"
23500
23501  windows_path="$new_path"
23502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23503    unix_path=`$CYGPATH -u "$windows_path"`
23504    new_path="$unix_path"
23505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23507    new_path="$unix_path"
23508  fi
23509
23510
23511  # Now try to locate executable using which
23512  new_path=`$WHICH "$new_path" 2> /dev/null`
23513
23514  if test "x$new_path" = x; then
23515    # Oops. Which didn't find the executable.
23516    # The splitting of arguments from the executable at a space might have been incorrect,
23517    # since paths with space are more likely in Windows. Give it another try with the whole
23518    # argument.
23519    path="$complete"
23520    arguments="EOL"
23521    new_path="$path"
23522
23523  windows_path="$new_path"
23524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23525    unix_path=`$CYGPATH -u "$windows_path"`
23526    new_path="$unix_path"
23527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23529    new_path="$unix_path"
23530  fi
23531
23532
23533    new_path=`$WHICH "$new_path" 2> /dev/null`
23534
23535    if test "x$new_path" = x; then
23536      # It's still not found. Now this is an unrecoverable error.
23537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23538$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23539      has_space=`$ECHO "$complete" | $GREP " "`
23540      if test "x$has_space" != x; then
23541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23543      fi
23544      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23545    fi
23546  fi
23547
23548  # Now new_path has a complete unix path to the binary
23549  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23550    # Keep paths in /bin as-is, but remove trailing .exe if any
23551    new_path="${new_path/%.exe/}"
23552    # Do not save /bin paths to all_fixpath_prefixes!
23553  else
23554    # Not in mixed or Windows style, start by that.
23555    new_path=`cmd //c echo $new_path`
23556
23557  input_path="$new_path"
23558  # Check if we need to convert this using DOS-style short mode. If the path
23559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23560  # take no chances and rewrite it.
23561  # Note: m4 eats our [], so we need to use [ and ] instead.
23562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23563  if test "x$has_forbidden_chars" != x; then
23564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23566  fi
23567
23568    # Output is in $new_path
23569
23570  windows_path="$new_path"
23571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23572    unix_path=`$CYGPATH -u "$windows_path"`
23573    new_path="$unix_path"
23574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23576    new_path="$unix_path"
23577  fi
23578
23579    # remove trailing .exe if any
23580    new_path="${new_path/%.exe/}"
23581
23582    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23583    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23584  fi
23585
23586  else
23587    # We're on a posix platform. Hooray! :)
23588    # First separate the path from the arguments. This will split at the first
23589    # space.
23590    complete="$WINAR"
23591    path="${complete%% *}"
23592    tmp="$complete EOL"
23593    arguments="${tmp#* }"
23594
23595    # Cannot rely on the command "which" here since it doesn't always work.
23596    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23597    if test -z "$is_absolute_path"; then
23598      # Path to executable is not absolute. Find it.
23599      IFS_save="$IFS"
23600      IFS=:
23601      for p in $PATH; do
23602        if test -f "$p/$path" && test -x "$p/$path"; then
23603          new_path="$p/$path"
23604          break
23605        fi
23606      done
23607      IFS="$IFS_save"
23608    else
23609      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23610$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23611      new_path="$path"
23612    fi
23613
23614    if test "x$new_path" = x; then
23615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23616$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23617        has_space=`$ECHO "$complete" | $GREP " "`
23618        if test "x$has_space" != x; then
23619          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23620$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23621        fi
23622        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23623      fi
23624  fi
23625
23626      # Now join together the path and the arguments once again
23627      if test "x$arguments" != xEOL; then
23628        new_complete="$new_path ${arguments% *}"
23629      else
23630        new_complete="$new_path"
23631      fi
23632
23633  if test "x$complete" != "x$new_complete"; then
23634      WINAR="$new_complete"
23635      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23636$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23637    fi
23638
23639    AR="$WINAR"
23640    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23641
23642    # Extract the first word of "dumpbin", so it can be a program name with args.
23643set dummy dumpbin; ac_word=$2
23644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23645$as_echo_n "checking for $ac_word... " >&6; }
23646if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23647  $as_echo_n "(cached) " >&6
23648else
23649  if test -n "$DUMPBIN"; then
23650  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23651else
23652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23653for as_dir in $PATH
23654do
23655  IFS=$as_save_IFS
23656  test -z "$as_dir" && as_dir=.
23657    for ac_exec_ext in '' $ac_executable_extensions; do
23658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23659    ac_cv_prog_DUMPBIN="dumpbin"
23660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23661    break 2
23662  fi
23663done
23664  done
23665IFS=$as_save_IFS
23666
23667fi
23668fi
23669DUMPBIN=$ac_cv_prog_DUMPBIN
23670if test -n "$DUMPBIN"; then
23671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23672$as_echo "$DUMPBIN" >&6; }
23673else
23674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23675$as_echo "no" >&6; }
23676fi
23677
23678
23679
23680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23681
23682  # First separate the path from the arguments. This will split at the first
23683  # space.
23684  complete="$DUMPBIN"
23685  path="${complete%% *}"
23686  tmp="$complete EOL"
23687  arguments="${tmp#* }"
23688
23689  # Input might be given as Windows format, start by converting to
23690  # unix format.
23691  new_path=`$CYGPATH -u "$path"`
23692
23693  # Now try to locate executable using which
23694  new_path=`$WHICH "$new_path" 2> /dev/null`
23695  # bat and cmd files are not always considered executable in cygwin causing which
23696  # to not find them
23697  if test "x$new_path" = x \
23698           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23700    new_path=`$CYGPATH -u "$path"`
23701  fi
23702  if test "x$new_path" = x; then
23703    # Oops. Which didn't find the executable.
23704    # The splitting of arguments from the executable at a space might have been incorrect,
23705    # since paths with space are more likely in Windows. Give it another try with the whole
23706    # argument.
23707    path="$complete"
23708    arguments="EOL"
23709    new_path=`$CYGPATH -u "$path"`
23710    new_path=`$WHICH "$new_path" 2> /dev/null`
23711    # bat and cmd files are not always considered executable in cygwin causing which
23712    # to not find them
23713    if test "x$new_path" = x \
23714             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23716      new_path=`$CYGPATH -u "$path"`
23717    fi
23718    if test "x$new_path" = x; then
23719      # It's still not found. Now this is an unrecoverable error.
23720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23721$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23722      has_space=`$ECHO "$complete" | $GREP " "`
23723      if test "x$has_space" != x; then
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23726      fi
23727      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23728    fi
23729  fi
23730
23731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23734  # "foo.exe" is OK but "foo" is an error.
23735  #
23736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23737  # It is also a way to make sure we got the proper file name for the real test later on.
23738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23739  if test "x$test_shortpath" = x; then
23740    # Short path failed, file does not exist as specified.
23741    # Try adding .exe or .cmd
23742    if test -f "${new_path}.exe"; then
23743       input_to_shortpath="${new_path}.exe"
23744    elif test -f "${new_path}.cmd"; then
23745       input_to_shortpath="${new_path}.cmd"
23746    else
23747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23748$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23751      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23752    fi
23753  else
23754    input_to_shortpath="$new_path"
23755  fi
23756
23757  # Call helper function which possibly converts this using DOS-style short mode.
23758  # If so, the updated path is stored in $new_path.
23759  new_path="$input_to_shortpath"
23760
23761  input_path="$input_to_shortpath"
23762  # Check if we need to convert this using DOS-style short mode. If the path
23763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23764  # take no chances and rewrite it.
23765  # Note: m4 eats our [], so we need to use [ and ] instead.
23766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23767  if test "x$has_forbidden_chars" != x; then
23768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23772      # Going to short mode and back again did indeed matter. Since short mode is
23773      # case insensitive, let's make it lowercase to improve readability.
23774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23775      # Now convert it back to Unix-stile (cygpath)
23776      input_path=`$CYGPATH -u "$shortmode_path"`
23777      new_path="$input_path"
23778    fi
23779  fi
23780
23781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23782  if test "x$test_cygdrive_prefix" = x; then
23783    # As a simple fix, exclude /usr/bin since it's not a real path.
23784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23786      # a path prefixed by /cygdrive for fixpath to work.
23787      new_path="$CYGWIN_ROOT_PATH$input_path"
23788    fi
23789  fi
23790
23791  # remove trailing .exe if any
23792  new_path="${new_path/%.exe/}"
23793
23794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23795
23796  # First separate the path from the arguments. This will split at the first
23797  # space.
23798  complete="$DUMPBIN"
23799  path="${complete%% *}"
23800  tmp="$complete EOL"
23801  arguments="${tmp#* }"
23802
23803  # Input might be given as Windows format, start by converting to
23804  # unix format.
23805  new_path="$path"
23806
23807  windows_path="$new_path"
23808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23809    unix_path=`$CYGPATH -u "$windows_path"`
23810    new_path="$unix_path"
23811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23813    new_path="$unix_path"
23814  fi
23815
23816
23817  # Now try to locate executable using which
23818  new_path=`$WHICH "$new_path" 2> /dev/null`
23819
23820  if test "x$new_path" = x; then
23821    # Oops. Which didn't find the executable.
23822    # The splitting of arguments from the executable at a space might have been incorrect,
23823    # since paths with space are more likely in Windows. Give it another try with the whole
23824    # argument.
23825    path="$complete"
23826    arguments="EOL"
23827    new_path="$path"
23828
23829  windows_path="$new_path"
23830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23831    unix_path=`$CYGPATH -u "$windows_path"`
23832    new_path="$unix_path"
23833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23835    new_path="$unix_path"
23836  fi
23837
23838
23839    new_path=`$WHICH "$new_path" 2> /dev/null`
23840
23841    if test "x$new_path" = x; then
23842      # It's still not found. Now this is an unrecoverable error.
23843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23844$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23845      has_space=`$ECHO "$complete" | $GREP " "`
23846      if test "x$has_space" != x; then
23847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23849      fi
23850      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23851    fi
23852  fi
23853
23854  # Now new_path has a complete unix path to the binary
23855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23856    # Keep paths in /bin as-is, but remove trailing .exe if any
23857    new_path="${new_path/%.exe/}"
23858    # Do not save /bin paths to all_fixpath_prefixes!
23859  else
23860    # Not in mixed or Windows style, start by that.
23861    new_path=`cmd //c echo $new_path`
23862
23863  input_path="$new_path"
23864  # Check if we need to convert this using DOS-style short mode. If the path
23865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23866  # take no chances and rewrite it.
23867  # Note: m4 eats our [], so we need to use [ and ] instead.
23868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23869  if test "x$has_forbidden_chars" != x; then
23870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23872  fi
23873
23874    # Output is in $new_path
23875
23876  windows_path="$new_path"
23877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23878    unix_path=`$CYGPATH -u "$windows_path"`
23879    new_path="$unix_path"
23880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23882    new_path="$unix_path"
23883  fi
23884
23885    # remove trailing .exe if any
23886    new_path="${new_path/%.exe/}"
23887
23888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23890  fi
23891
23892  else
23893    # We're on a posix platform. Hooray! :)
23894    # First separate the path from the arguments. This will split at the first
23895    # space.
23896    complete="$DUMPBIN"
23897    path="${complete%% *}"
23898    tmp="$complete EOL"
23899    arguments="${tmp#* }"
23900
23901    # Cannot rely on the command "which" here since it doesn't always work.
23902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23903    if test -z "$is_absolute_path"; then
23904      # Path to executable is not absolute. Find it.
23905      IFS_save="$IFS"
23906      IFS=:
23907      for p in $PATH; do
23908        if test -f "$p/$path" && test -x "$p/$path"; then
23909          new_path="$p/$path"
23910          break
23911        fi
23912      done
23913      IFS="$IFS_save"
23914    else
23915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23916$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23917      new_path="$path"
23918    fi
23919
23920    if test "x$new_path" = x; then
23921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23922$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23923        has_space=`$ECHO "$complete" | $GREP " "`
23924        if test "x$has_space" != x; then
23925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23927        fi
23928        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23929      fi
23930  fi
23931
23932      # Now join together the path and the arguments once again
23933      if test "x$arguments" != xEOL; then
23934        new_complete="$new_path ${arguments% *}"
23935      else
23936        new_complete="$new_path"
23937      fi
23938
23939  if test "x$complete" != "x$new_complete"; then
23940      DUMPBIN="$new_complete"
23941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23942$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23943    fi
23944
23945
23946    COMPILER_TYPE=CL
23947    CCXXFLAGS="$CCXXFLAGS -nologo"
23948
23949fi
23950
23951
23952
23953ac_ext=c
23954ac_cpp='$CPP $CPPFLAGS'
23955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23957ac_compiler_gnu=$ac_cv_c_compiler_gnu
23958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23959$as_echo_n "checking how to run the C preprocessor... " >&6; }
23960# On Suns, sometimes $CPP names a directory.
23961if test -n "$CPP" && test -d "$CPP"; then
23962  CPP=
23963fi
23964if test -z "$CPP"; then
23965  if test "${ac_cv_prog_CPP+set}" = set; then :
23966  $as_echo_n "(cached) " >&6
23967else
23968      # Double quotes because CPP needs to be expanded
23969    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23970    do
23971      ac_preproc_ok=false
23972for ac_c_preproc_warn_flag in '' yes
23973do
23974  # Use a header file that comes with gcc, so configuring glibc
23975  # with a fresh cross-compiler works.
23976  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23977  # <limits.h> exists even on freestanding compilers.
23978  # On the NeXT, cc -E runs the code through the compiler's parser,
23979  # not just through cpp. "Syntax error" is here to catch this case.
23980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23981/* end confdefs.h.  */
23982#ifdef __STDC__
23983# include <limits.h>
23984#else
23985# include <assert.h>
23986#endif
23987		     Syntax error
23988_ACEOF
23989if ac_fn_c_try_cpp "$LINENO"; then :
23990
23991else
23992  # Broken: fails on valid input.
23993continue
23994fi
23995rm -f conftest.err conftest.i conftest.$ac_ext
23996
23997  # OK, works on sane cases.  Now check whether nonexistent headers
23998  # can be detected and how.
23999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24000/* end confdefs.h.  */
24001#include <ac_nonexistent.h>
24002_ACEOF
24003if ac_fn_c_try_cpp "$LINENO"; then :
24004  # Broken: success on invalid input.
24005continue
24006else
24007  # Passes both tests.
24008ac_preproc_ok=:
24009break
24010fi
24011rm -f conftest.err conftest.i conftest.$ac_ext
24012
24013done
24014# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24015rm -f conftest.i conftest.err conftest.$ac_ext
24016if $ac_preproc_ok; then :
24017  break
24018fi
24019
24020    done
24021    ac_cv_prog_CPP=$CPP
24022
24023fi
24024  CPP=$ac_cv_prog_CPP
24025else
24026  ac_cv_prog_CPP=$CPP
24027fi
24028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24029$as_echo "$CPP" >&6; }
24030ac_preproc_ok=false
24031for ac_c_preproc_warn_flag in '' yes
24032do
24033  # Use a header file that comes with gcc, so configuring glibc
24034  # with a fresh cross-compiler works.
24035  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24036  # <limits.h> exists even on freestanding compilers.
24037  # On the NeXT, cc -E runs the code through the compiler's parser,
24038  # not just through cpp. "Syntax error" is here to catch this case.
24039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24040/* end confdefs.h.  */
24041#ifdef __STDC__
24042# include <limits.h>
24043#else
24044# include <assert.h>
24045#endif
24046		     Syntax error
24047_ACEOF
24048if ac_fn_c_try_cpp "$LINENO"; then :
24049
24050else
24051  # Broken: fails on valid input.
24052continue
24053fi
24054rm -f conftest.err conftest.i conftest.$ac_ext
24055
24056  # OK, works on sane cases.  Now check whether nonexistent headers
24057  # can be detected and how.
24058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24059/* end confdefs.h.  */
24060#include <ac_nonexistent.h>
24061_ACEOF
24062if ac_fn_c_try_cpp "$LINENO"; then :
24063  # Broken: success on invalid input.
24064continue
24065else
24066  # Passes both tests.
24067ac_preproc_ok=:
24068break
24069fi
24070rm -f conftest.err conftest.i conftest.$ac_ext
24071
24072done
24073# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24074rm -f conftest.i conftest.err conftest.$ac_ext
24075if $ac_preproc_ok; then :
24076
24077else
24078  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24080as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24081See \`config.log' for more details" "$LINENO" 5; }
24082fi
24083
24084ac_ext=cpp
24085ac_cpp='$CXXCPP $CPPFLAGS'
24086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24089
24090
24091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24092
24093  # First separate the path from the arguments. This will split at the first
24094  # space.
24095  complete="$CPP"
24096  path="${complete%% *}"
24097  tmp="$complete EOL"
24098  arguments="${tmp#* }"
24099
24100  # Input might be given as Windows format, start by converting to
24101  # unix format.
24102  new_path=`$CYGPATH -u "$path"`
24103
24104  # Now try to locate executable using which
24105  new_path=`$WHICH "$new_path" 2> /dev/null`
24106  # bat and cmd files are not always considered executable in cygwin causing which
24107  # to not find them
24108  if test "x$new_path" = x \
24109           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24110           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24111    new_path=`$CYGPATH -u "$path"`
24112  fi
24113  if test "x$new_path" = x; then
24114    # Oops. Which didn't find the executable.
24115    # The splitting of arguments from the executable at a space might have been incorrect,
24116    # since paths with space are more likely in Windows. Give it another try with the whole
24117    # argument.
24118    path="$complete"
24119    arguments="EOL"
24120    new_path=`$CYGPATH -u "$path"`
24121    new_path=`$WHICH "$new_path" 2> /dev/null`
24122    # bat and cmd files are not always considered executable in cygwin causing which
24123    # to not find them
24124    if test "x$new_path" = x \
24125             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24126             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24127      new_path=`$CYGPATH -u "$path"`
24128    fi
24129    if test "x$new_path" = x; then
24130      # It's still not found. Now this is an unrecoverable error.
24131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24132$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24133      has_space=`$ECHO "$complete" | $GREP " "`
24134      if test "x$has_space" != x; then
24135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24137      fi
24138      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24139    fi
24140  fi
24141
24142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24145  # "foo.exe" is OK but "foo" is an error.
24146  #
24147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24148  # It is also a way to make sure we got the proper file name for the real test later on.
24149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24150  if test "x$test_shortpath" = x; then
24151    # Short path failed, file does not exist as specified.
24152    # Try adding .exe or .cmd
24153    if test -f "${new_path}.exe"; then
24154       input_to_shortpath="${new_path}.exe"
24155    elif test -f "${new_path}.cmd"; then
24156       input_to_shortpath="${new_path}.cmd"
24157    else
24158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24159$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24160      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24161$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24162      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24163    fi
24164  else
24165    input_to_shortpath="$new_path"
24166  fi
24167
24168  # Call helper function which possibly converts this using DOS-style short mode.
24169  # If so, the updated path is stored in $new_path.
24170  new_path="$input_to_shortpath"
24171
24172  input_path="$input_to_shortpath"
24173  # Check if we need to convert this using DOS-style short mode. If the path
24174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24175  # take no chances and rewrite it.
24176  # Note: m4 eats our [], so we need to use [ and ] instead.
24177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24178  if test "x$has_forbidden_chars" != x; then
24179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24183      # Going to short mode and back again did indeed matter. Since short mode is
24184      # case insensitive, let's make it lowercase to improve readability.
24185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24186      # Now convert it back to Unix-stile (cygpath)
24187      input_path=`$CYGPATH -u "$shortmode_path"`
24188      new_path="$input_path"
24189    fi
24190  fi
24191
24192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24193  if test "x$test_cygdrive_prefix" = x; then
24194    # As a simple fix, exclude /usr/bin since it's not a real path.
24195    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24197      # a path prefixed by /cygdrive for fixpath to work.
24198      new_path="$CYGWIN_ROOT_PATH$input_path"
24199    fi
24200  fi
24201
24202  # remove trailing .exe if any
24203  new_path="${new_path/%.exe/}"
24204
24205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24206
24207  # First separate the path from the arguments. This will split at the first
24208  # space.
24209  complete="$CPP"
24210  path="${complete%% *}"
24211  tmp="$complete EOL"
24212  arguments="${tmp#* }"
24213
24214  # Input might be given as Windows format, start by converting to
24215  # unix format.
24216  new_path="$path"
24217
24218  windows_path="$new_path"
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220    unix_path=`$CYGPATH -u "$windows_path"`
24221    new_path="$unix_path"
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24224    new_path="$unix_path"
24225  fi
24226
24227
24228  # Now try to locate executable using which
24229  new_path=`$WHICH "$new_path" 2> /dev/null`
24230
24231  if test "x$new_path" = x; then
24232    # Oops. Which didn't find the executable.
24233    # The splitting of arguments from the executable at a space might have been incorrect,
24234    # since paths with space are more likely in Windows. Give it another try with the whole
24235    # argument.
24236    path="$complete"
24237    arguments="EOL"
24238    new_path="$path"
24239
24240  windows_path="$new_path"
24241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24242    unix_path=`$CYGPATH -u "$windows_path"`
24243    new_path="$unix_path"
24244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24246    new_path="$unix_path"
24247  fi
24248
24249
24250    new_path=`$WHICH "$new_path" 2> /dev/null`
24251
24252    if test "x$new_path" = x; then
24253      # It's still not found. Now this is an unrecoverable error.
24254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24255$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24256      has_space=`$ECHO "$complete" | $GREP " "`
24257      if test "x$has_space" != x; then
24258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24260      fi
24261      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24262    fi
24263  fi
24264
24265  # Now new_path has a complete unix path to the binary
24266  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24267    # Keep paths in /bin as-is, but remove trailing .exe if any
24268    new_path="${new_path/%.exe/}"
24269    # Do not save /bin paths to all_fixpath_prefixes!
24270  else
24271    # Not in mixed or Windows style, start by that.
24272    new_path=`cmd //c echo $new_path`
24273
24274  input_path="$new_path"
24275  # Check if we need to convert this using DOS-style short mode. If the path
24276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24277  # take no chances and rewrite it.
24278  # Note: m4 eats our [], so we need to use [ and ] instead.
24279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24280  if test "x$has_forbidden_chars" != x; then
24281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24283  fi
24284
24285    # Output is in $new_path
24286
24287  windows_path="$new_path"
24288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24289    unix_path=`$CYGPATH -u "$windows_path"`
24290    new_path="$unix_path"
24291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24293    new_path="$unix_path"
24294  fi
24295
24296    # remove trailing .exe if any
24297    new_path="${new_path/%.exe/}"
24298
24299    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24300    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24301  fi
24302
24303  else
24304    # We're on a posix platform. Hooray! :)
24305    # First separate the path from the arguments. This will split at the first
24306    # space.
24307    complete="$CPP"
24308    path="${complete%% *}"
24309    tmp="$complete EOL"
24310    arguments="${tmp#* }"
24311
24312    # Cannot rely on the command "which" here since it doesn't always work.
24313    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24314    if test -z "$is_absolute_path"; then
24315      # Path to executable is not absolute. Find it.
24316      IFS_save="$IFS"
24317      IFS=:
24318      for p in $PATH; do
24319        if test -f "$p/$path" && test -x "$p/$path"; then
24320          new_path="$p/$path"
24321          break
24322        fi
24323      done
24324      IFS="$IFS_save"
24325    else
24326      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24327$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24328      new_path="$path"
24329    fi
24330
24331    if test "x$new_path" = x; then
24332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24333$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24334        has_space=`$ECHO "$complete" | $GREP " "`
24335        if test "x$has_space" != x; then
24336          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24338        fi
24339        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24340      fi
24341  fi
24342
24343      # Now join together the path and the arguments once again
24344      if test "x$arguments" != xEOL; then
24345        new_complete="$new_path ${arguments% *}"
24346      else
24347        new_complete="$new_path"
24348      fi
24349
24350  if test "x$complete" != "x$new_complete"; then
24351      CPP="$new_complete"
24352      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24353$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24354    fi
24355
24356
24357ac_ext=cpp
24358ac_cpp='$CXXCPP $CPPFLAGS'
24359ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24360ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24361ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24363$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24364if test -z "$CXXCPP"; then
24365  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24366  $as_echo_n "(cached) " >&6
24367else
24368      # Double quotes because CXXCPP needs to be expanded
24369    for CXXCPP in "$CXX -E" "/lib/cpp"
24370    do
24371      ac_preproc_ok=false
24372for ac_cxx_preproc_warn_flag in '' yes
24373do
24374  # Use a header file that comes with gcc, so configuring glibc
24375  # with a fresh cross-compiler works.
24376  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24377  # <limits.h> exists even on freestanding compilers.
24378  # On the NeXT, cc -E runs the code through the compiler's parser,
24379  # not just through cpp. "Syntax error" is here to catch this case.
24380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24381/* end confdefs.h.  */
24382#ifdef __STDC__
24383# include <limits.h>
24384#else
24385# include <assert.h>
24386#endif
24387		     Syntax error
24388_ACEOF
24389if ac_fn_cxx_try_cpp "$LINENO"; then :
24390
24391else
24392  # Broken: fails on valid input.
24393continue
24394fi
24395rm -f conftest.err conftest.i conftest.$ac_ext
24396
24397  # OK, works on sane cases.  Now check whether nonexistent headers
24398  # can be detected and how.
24399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24400/* end confdefs.h.  */
24401#include <ac_nonexistent.h>
24402_ACEOF
24403if ac_fn_cxx_try_cpp "$LINENO"; then :
24404  # Broken: success on invalid input.
24405continue
24406else
24407  # Passes both tests.
24408ac_preproc_ok=:
24409break
24410fi
24411rm -f conftest.err conftest.i conftest.$ac_ext
24412
24413done
24414# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24415rm -f conftest.i conftest.err conftest.$ac_ext
24416if $ac_preproc_ok; then :
24417  break
24418fi
24419
24420    done
24421    ac_cv_prog_CXXCPP=$CXXCPP
24422
24423fi
24424  CXXCPP=$ac_cv_prog_CXXCPP
24425else
24426  ac_cv_prog_CXXCPP=$CXXCPP
24427fi
24428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24429$as_echo "$CXXCPP" >&6; }
24430ac_preproc_ok=false
24431for ac_cxx_preproc_warn_flag in '' yes
24432do
24433  # Use a header file that comes with gcc, so configuring glibc
24434  # with a fresh cross-compiler works.
24435  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24436  # <limits.h> exists even on freestanding compilers.
24437  # On the NeXT, cc -E runs the code through the compiler's parser,
24438  # not just through cpp. "Syntax error" is here to catch this case.
24439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24440/* end confdefs.h.  */
24441#ifdef __STDC__
24442# include <limits.h>
24443#else
24444# include <assert.h>
24445#endif
24446		     Syntax error
24447_ACEOF
24448if ac_fn_cxx_try_cpp "$LINENO"; then :
24449
24450else
24451  # Broken: fails on valid input.
24452continue
24453fi
24454rm -f conftest.err conftest.i conftest.$ac_ext
24455
24456  # OK, works on sane cases.  Now check whether nonexistent headers
24457  # can be detected and how.
24458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24459/* end confdefs.h.  */
24460#include <ac_nonexistent.h>
24461_ACEOF
24462if ac_fn_cxx_try_cpp "$LINENO"; then :
24463  # Broken: success on invalid input.
24464continue
24465else
24466  # Passes both tests.
24467ac_preproc_ok=:
24468break
24469fi
24470rm -f conftest.err conftest.i conftest.$ac_ext
24471
24472done
24473# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24474rm -f conftest.i conftest.err conftest.$ac_ext
24475if $ac_preproc_ok; then :
24476
24477else
24478  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24480as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24481See \`config.log' for more details" "$LINENO" 5; }
24482fi
24483
24484ac_ext=cpp
24485ac_cpp='$CXXCPP $CPPFLAGS'
24486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24489
24490
24491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24492
24493  # First separate the path from the arguments. This will split at the first
24494  # space.
24495  complete="$CXXCPP"
24496  path="${complete%% *}"
24497  tmp="$complete EOL"
24498  arguments="${tmp#* }"
24499
24500  # Input might be given as Windows format, start by converting to
24501  # unix format.
24502  new_path=`$CYGPATH -u "$path"`
24503
24504  # Now try to locate executable using which
24505  new_path=`$WHICH "$new_path" 2> /dev/null`
24506  # bat and cmd files are not always considered executable in cygwin causing which
24507  # to not find them
24508  if test "x$new_path" = x \
24509           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24510           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24511    new_path=`$CYGPATH -u "$path"`
24512  fi
24513  if test "x$new_path" = x; then
24514    # Oops. Which didn't find the executable.
24515    # The splitting of arguments from the executable at a space might have been incorrect,
24516    # since paths with space are more likely in Windows. Give it another try with the whole
24517    # argument.
24518    path="$complete"
24519    arguments="EOL"
24520    new_path=`$CYGPATH -u "$path"`
24521    new_path=`$WHICH "$new_path" 2> /dev/null`
24522    # bat and cmd files are not always considered executable in cygwin causing which
24523    # to not find them
24524    if test "x$new_path" = x \
24525             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24526             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24527      new_path=`$CYGPATH -u "$path"`
24528    fi
24529    if test "x$new_path" = x; then
24530      # It's still not found. Now this is an unrecoverable error.
24531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24532$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24533      has_space=`$ECHO "$complete" | $GREP " "`
24534      if test "x$has_space" != x; then
24535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24537      fi
24538      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24539    fi
24540  fi
24541
24542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24545  # "foo.exe" is OK but "foo" is an error.
24546  #
24547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24548  # It is also a way to make sure we got the proper file name for the real test later on.
24549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24550  if test "x$test_shortpath" = x; then
24551    # Short path failed, file does not exist as specified.
24552    # Try adding .exe or .cmd
24553    if test -f "${new_path}.exe"; then
24554       input_to_shortpath="${new_path}.exe"
24555    elif test -f "${new_path}.cmd"; then
24556       input_to_shortpath="${new_path}.cmd"
24557    else
24558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24559$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24562      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24563    fi
24564  else
24565    input_to_shortpath="$new_path"
24566  fi
24567
24568  # Call helper function which possibly converts this using DOS-style short mode.
24569  # If so, the updated path is stored in $new_path.
24570  new_path="$input_to_shortpath"
24571
24572  input_path="$input_to_shortpath"
24573  # Check if we need to convert this using DOS-style short mode. If the path
24574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24575  # take no chances and rewrite it.
24576  # Note: m4 eats our [], so we need to use [ and ] instead.
24577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24578  if test "x$has_forbidden_chars" != x; then
24579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24583      # Going to short mode and back again did indeed matter. Since short mode is
24584      # case insensitive, let's make it lowercase to improve readability.
24585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24586      # Now convert it back to Unix-stile (cygpath)
24587      input_path=`$CYGPATH -u "$shortmode_path"`
24588      new_path="$input_path"
24589    fi
24590  fi
24591
24592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24593  if test "x$test_cygdrive_prefix" = x; then
24594    # As a simple fix, exclude /usr/bin since it's not a real path.
24595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24597      # a path prefixed by /cygdrive for fixpath to work.
24598      new_path="$CYGWIN_ROOT_PATH$input_path"
24599    fi
24600  fi
24601
24602  # remove trailing .exe if any
24603  new_path="${new_path/%.exe/}"
24604
24605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24606
24607  # First separate the path from the arguments. This will split at the first
24608  # space.
24609  complete="$CXXCPP"
24610  path="${complete%% *}"
24611  tmp="$complete EOL"
24612  arguments="${tmp#* }"
24613
24614  # Input might be given as Windows format, start by converting to
24615  # unix format.
24616  new_path="$path"
24617
24618  windows_path="$new_path"
24619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24620    unix_path=`$CYGPATH -u "$windows_path"`
24621    new_path="$unix_path"
24622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24624    new_path="$unix_path"
24625  fi
24626
24627
24628  # Now try to locate executable using which
24629  new_path=`$WHICH "$new_path" 2> /dev/null`
24630
24631  if test "x$new_path" = x; then
24632    # Oops. Which didn't find the executable.
24633    # The splitting of arguments from the executable at a space might have been incorrect,
24634    # since paths with space are more likely in Windows. Give it another try with the whole
24635    # argument.
24636    path="$complete"
24637    arguments="EOL"
24638    new_path="$path"
24639
24640  windows_path="$new_path"
24641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24642    unix_path=`$CYGPATH -u "$windows_path"`
24643    new_path="$unix_path"
24644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24646    new_path="$unix_path"
24647  fi
24648
24649
24650    new_path=`$WHICH "$new_path" 2> /dev/null`
24651
24652    if test "x$new_path" = x; then
24653      # It's still not found. Now this is an unrecoverable error.
24654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24655$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24656      has_space=`$ECHO "$complete" | $GREP " "`
24657      if test "x$has_space" != x; then
24658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24660      fi
24661      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24662    fi
24663  fi
24664
24665  # Now new_path has a complete unix path to the binary
24666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24667    # Keep paths in /bin as-is, but remove trailing .exe if any
24668    new_path="${new_path/%.exe/}"
24669    # Do not save /bin paths to all_fixpath_prefixes!
24670  else
24671    # Not in mixed or Windows style, start by that.
24672    new_path=`cmd //c echo $new_path`
24673
24674  input_path="$new_path"
24675  # Check if we need to convert this using DOS-style short mode. If the path
24676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24677  # take no chances and rewrite it.
24678  # Note: m4 eats our [], so we need to use [ and ] instead.
24679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24680  if test "x$has_forbidden_chars" != x; then
24681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24683  fi
24684
24685    # Output is in $new_path
24686
24687  windows_path="$new_path"
24688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24689    unix_path=`$CYGPATH -u "$windows_path"`
24690    new_path="$unix_path"
24691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24693    new_path="$unix_path"
24694  fi
24695
24696    # remove trailing .exe if any
24697    new_path="${new_path/%.exe/}"
24698
24699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24701  fi
24702
24703  else
24704    # We're on a posix platform. Hooray! :)
24705    # First separate the path from the arguments. This will split at the first
24706    # space.
24707    complete="$CXXCPP"
24708    path="${complete%% *}"
24709    tmp="$complete EOL"
24710    arguments="${tmp#* }"
24711
24712    # Cannot rely on the command "which" here since it doesn't always work.
24713    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24714    if test -z "$is_absolute_path"; then
24715      # Path to executable is not absolute. Find it.
24716      IFS_save="$IFS"
24717      IFS=:
24718      for p in $PATH; do
24719        if test -f "$p/$path" && test -x "$p/$path"; then
24720          new_path="$p/$path"
24721          break
24722        fi
24723      done
24724      IFS="$IFS_save"
24725    else
24726      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24727$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24728      new_path="$path"
24729    fi
24730
24731    if test "x$new_path" = x; then
24732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24733$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24734        has_space=`$ECHO "$complete" | $GREP " "`
24735        if test "x$has_space" != x; then
24736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24738        fi
24739        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24740      fi
24741  fi
24742
24743      # Now join together the path and the arguments once again
24744      if test "x$arguments" != xEOL; then
24745        new_complete="$new_path ${arguments% *}"
24746      else
24747        new_complete="$new_path"
24748      fi
24749
24750  if test "x$complete" != "x$new_complete"; then
24751      CXXCPP="$new_complete"
24752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24753$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24754    fi
24755
24756
24757if test "x$COMPILE_TYPE" != "xcross"; then
24758    # If we are not cross compiling, use the same compilers for
24759    # building the build platform executables. The cross-compilation
24760    # case needed to be done earlier, but this can only be done after
24761    # the native tools have been localized.
24762    BUILD_CC="$CC"
24763    BUILD_CXX="$CXX"
24764    BUILD_LD="$LD"
24765fi
24766
24767# for solaris we really need solaris tools, and not gnu equivalent
24768#   these seems to normally reside in /usr/ccs/bin so add that to path before
24769#   starting to probe
24770#
24771#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24772#         so that it can be overriden --with-tools-dir
24773if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24774    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24775fi
24776
24777# Find the right assembler.
24778if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24779    # Extract the first word of "as", so it can be a program name with args.
24780set dummy as; ac_word=$2
24781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24782$as_echo_n "checking for $ac_word... " >&6; }
24783if test "${ac_cv_path_AS+set}" = set; then :
24784  $as_echo_n "(cached) " >&6
24785else
24786  case $AS in
24787  [\\/]* | ?:[\\/]*)
24788  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24789  ;;
24790  *)
24791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24792for as_dir in $PATH
24793do
24794  IFS=$as_save_IFS
24795  test -z "$as_dir" && as_dir=.
24796    for ac_exec_ext in '' $ac_executable_extensions; do
24797  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24798    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24800    break 2
24801  fi
24802done
24803  done
24804IFS=$as_save_IFS
24805
24806  ;;
24807esac
24808fi
24809AS=$ac_cv_path_AS
24810if test -n "$AS"; then
24811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24812$as_echo "$AS" >&6; }
24813else
24814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24815$as_echo "no" >&6; }
24816fi
24817
24818
24819
24820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24821
24822  # First separate the path from the arguments. This will split at the first
24823  # space.
24824  complete="$AS"
24825  path="${complete%% *}"
24826  tmp="$complete EOL"
24827  arguments="${tmp#* }"
24828
24829  # Input might be given as Windows format, start by converting to
24830  # unix format.
24831  new_path=`$CYGPATH -u "$path"`
24832
24833  # Now try to locate executable using which
24834  new_path=`$WHICH "$new_path" 2> /dev/null`
24835  # bat and cmd files are not always considered executable in cygwin causing which
24836  # to not find them
24837  if test "x$new_path" = x \
24838           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24839           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24840    new_path=`$CYGPATH -u "$path"`
24841  fi
24842  if test "x$new_path" = x; then
24843    # Oops. Which didn't find the executable.
24844    # The splitting of arguments from the executable at a space might have been incorrect,
24845    # since paths with space are more likely in Windows. Give it another try with the whole
24846    # argument.
24847    path="$complete"
24848    arguments="EOL"
24849    new_path=`$CYGPATH -u "$path"`
24850    new_path=`$WHICH "$new_path" 2> /dev/null`
24851    # bat and cmd files are not always considered executable in cygwin causing which
24852    # to not find them
24853    if test "x$new_path" = x \
24854             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24855             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24856      new_path=`$CYGPATH -u "$path"`
24857    fi
24858    if test "x$new_path" = x; then
24859      # It's still not found. Now this is an unrecoverable error.
24860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24861$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24862      has_space=`$ECHO "$complete" | $GREP " "`
24863      if test "x$has_space" != x; then
24864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24866      fi
24867      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24868    fi
24869  fi
24870
24871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24874  # "foo.exe" is OK but "foo" is an error.
24875  #
24876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24877  # It is also a way to make sure we got the proper file name for the real test later on.
24878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24879  if test "x$test_shortpath" = x; then
24880    # Short path failed, file does not exist as specified.
24881    # Try adding .exe or .cmd
24882    if test -f "${new_path}.exe"; then
24883       input_to_shortpath="${new_path}.exe"
24884    elif test -f "${new_path}.cmd"; then
24885       input_to_shortpath="${new_path}.cmd"
24886    else
24887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24888$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24891      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24892    fi
24893  else
24894    input_to_shortpath="$new_path"
24895  fi
24896
24897  # Call helper function which possibly converts this using DOS-style short mode.
24898  # If so, the updated path is stored in $new_path.
24899  new_path="$input_to_shortpath"
24900
24901  input_path="$input_to_shortpath"
24902  # Check if we need to convert this using DOS-style short mode. If the path
24903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24904  # take no chances and rewrite it.
24905  # Note: m4 eats our [], so we need to use [ and ] instead.
24906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24907  if test "x$has_forbidden_chars" != x; then
24908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24912      # Going to short mode and back again did indeed matter. Since short mode is
24913      # case insensitive, let's make it lowercase to improve readability.
24914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915      # Now convert it back to Unix-stile (cygpath)
24916      input_path=`$CYGPATH -u "$shortmode_path"`
24917      new_path="$input_path"
24918    fi
24919  fi
24920
24921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24922  if test "x$test_cygdrive_prefix" = x; then
24923    # As a simple fix, exclude /usr/bin since it's not a real path.
24924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24926      # a path prefixed by /cygdrive for fixpath to work.
24927      new_path="$CYGWIN_ROOT_PATH$input_path"
24928    fi
24929  fi
24930
24931  # remove trailing .exe if any
24932  new_path="${new_path/%.exe/}"
24933
24934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24935
24936  # First separate the path from the arguments. This will split at the first
24937  # space.
24938  complete="$AS"
24939  path="${complete%% *}"
24940  tmp="$complete EOL"
24941  arguments="${tmp#* }"
24942
24943  # Input might be given as Windows format, start by converting to
24944  # unix format.
24945  new_path="$path"
24946
24947  windows_path="$new_path"
24948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24949    unix_path=`$CYGPATH -u "$windows_path"`
24950    new_path="$unix_path"
24951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24953    new_path="$unix_path"
24954  fi
24955
24956
24957  # Now try to locate executable using which
24958  new_path=`$WHICH "$new_path" 2> /dev/null`
24959
24960  if test "x$new_path" = x; then
24961    # Oops. Which didn't find the executable.
24962    # The splitting of arguments from the executable at a space might have been incorrect,
24963    # since paths with space are more likely in Windows. Give it another try with the whole
24964    # argument.
24965    path="$complete"
24966    arguments="EOL"
24967    new_path="$path"
24968
24969  windows_path="$new_path"
24970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24971    unix_path=`$CYGPATH -u "$windows_path"`
24972    new_path="$unix_path"
24973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24975    new_path="$unix_path"
24976  fi
24977
24978
24979    new_path=`$WHICH "$new_path" 2> /dev/null`
24980
24981    if test "x$new_path" = x; then
24982      # It's still not found. Now this is an unrecoverable error.
24983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24984$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24985      has_space=`$ECHO "$complete" | $GREP " "`
24986      if test "x$has_space" != x; then
24987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24989      fi
24990      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24991    fi
24992  fi
24993
24994  # Now new_path has a complete unix path to the binary
24995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24996    # Keep paths in /bin as-is, but remove trailing .exe if any
24997    new_path="${new_path/%.exe/}"
24998    # Do not save /bin paths to all_fixpath_prefixes!
24999  else
25000    # Not in mixed or Windows style, start by that.
25001    new_path=`cmd //c echo $new_path`
25002
25003  input_path="$new_path"
25004  # Check if we need to convert this using DOS-style short mode. If the path
25005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25006  # take no chances and rewrite it.
25007  # Note: m4 eats our [], so we need to use [ and ] instead.
25008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25009  if test "x$has_forbidden_chars" != x; then
25010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25012  fi
25013
25014    # Output is in $new_path
25015
25016  windows_path="$new_path"
25017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25018    unix_path=`$CYGPATH -u "$windows_path"`
25019    new_path="$unix_path"
25020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25022    new_path="$unix_path"
25023  fi
25024
25025    # remove trailing .exe if any
25026    new_path="${new_path/%.exe/}"
25027
25028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25030  fi
25031
25032  else
25033    # We're on a posix platform. Hooray! :)
25034    # First separate the path from the arguments. This will split at the first
25035    # space.
25036    complete="$AS"
25037    path="${complete%% *}"
25038    tmp="$complete EOL"
25039    arguments="${tmp#* }"
25040
25041    # Cannot rely on the command "which" here since it doesn't always work.
25042    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25043    if test -z "$is_absolute_path"; then
25044      # Path to executable is not absolute. Find it.
25045      IFS_save="$IFS"
25046      IFS=:
25047      for p in $PATH; do
25048        if test -f "$p/$path" && test -x "$p/$path"; then
25049          new_path="$p/$path"
25050          break
25051        fi
25052      done
25053      IFS="$IFS_save"
25054    else
25055      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25056$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25057      new_path="$path"
25058    fi
25059
25060    if test "x$new_path" = x; then
25061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25062$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25063        has_space=`$ECHO "$complete" | $GREP " "`
25064        if test "x$has_space" != x; then
25065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25067        fi
25068        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25069      fi
25070  fi
25071
25072      # Now join together the path and the arguments once again
25073      if test "x$arguments" != xEOL; then
25074        new_complete="$new_path ${arguments% *}"
25075      else
25076        new_complete="$new_path"
25077      fi
25078
25079  if test "x$complete" != "x$new_complete"; then
25080      AS="$new_complete"
25081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25082$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25083    fi
25084
25085else
25086    AS="$CC -c"
25087fi
25088
25089
25090if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25091    for ac_prog in gnm nm
25092do
25093  # Extract the first word of "$ac_prog", so it can be a program name with args.
25094set dummy $ac_prog; ac_word=$2
25095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25096$as_echo_n "checking for $ac_word... " >&6; }
25097if test "${ac_cv_path_NM+set}" = set; then :
25098  $as_echo_n "(cached) " >&6
25099else
25100  case $NM in
25101  [\\/]* | ?:[\\/]*)
25102  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25103  ;;
25104  *)
25105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25106for as_dir in $PATH
25107do
25108  IFS=$as_save_IFS
25109  test -z "$as_dir" && as_dir=.
25110    for ac_exec_ext in '' $ac_executable_extensions; do
25111  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25112    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25114    break 2
25115  fi
25116done
25117  done
25118IFS=$as_save_IFS
25119
25120  ;;
25121esac
25122fi
25123NM=$ac_cv_path_NM
25124if test -n "$NM"; then
25125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25126$as_echo "$NM" >&6; }
25127else
25128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25129$as_echo "no" >&6; }
25130fi
25131
25132
25133  test -n "$NM" && break
25134done
25135
25136
25137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25138
25139  # First separate the path from the arguments. This will split at the first
25140  # space.
25141  complete="$NM"
25142  path="${complete%% *}"
25143  tmp="$complete EOL"
25144  arguments="${tmp#* }"
25145
25146  # Input might be given as Windows format, start by converting to
25147  # unix format.
25148  new_path=`$CYGPATH -u "$path"`
25149
25150  # Now try to locate executable using which
25151  new_path=`$WHICH "$new_path" 2> /dev/null`
25152  # bat and cmd files are not always considered executable in cygwin causing which
25153  # to not find them
25154  if test "x$new_path" = x \
25155           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25156           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25157    new_path=`$CYGPATH -u "$path"`
25158  fi
25159  if test "x$new_path" = x; then
25160    # Oops. Which didn't find the executable.
25161    # The splitting of arguments from the executable at a space might have been incorrect,
25162    # since paths with space are more likely in Windows. Give it another try with the whole
25163    # argument.
25164    path="$complete"
25165    arguments="EOL"
25166    new_path=`$CYGPATH -u "$path"`
25167    new_path=`$WHICH "$new_path" 2> /dev/null`
25168    # bat and cmd files are not always considered executable in cygwin causing which
25169    # to not find them
25170    if test "x$new_path" = x \
25171             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25172             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25173      new_path=`$CYGPATH -u "$path"`
25174    fi
25175    if test "x$new_path" = x; then
25176      # It's still not found. Now this is an unrecoverable error.
25177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25178$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25179      has_space=`$ECHO "$complete" | $GREP " "`
25180      if test "x$has_space" != x; then
25181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25183      fi
25184      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25185    fi
25186  fi
25187
25188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25191  # "foo.exe" is OK but "foo" is an error.
25192  #
25193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25194  # It is also a way to make sure we got the proper file name for the real test later on.
25195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25196  if test "x$test_shortpath" = x; then
25197    # Short path failed, file does not exist as specified.
25198    # Try adding .exe or .cmd
25199    if test -f "${new_path}.exe"; then
25200       input_to_shortpath="${new_path}.exe"
25201    elif test -f "${new_path}.cmd"; then
25202       input_to_shortpath="${new_path}.cmd"
25203    else
25204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25205$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25208      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25209    fi
25210  else
25211    input_to_shortpath="$new_path"
25212  fi
25213
25214  # Call helper function which possibly converts this using DOS-style short mode.
25215  # If so, the updated path is stored in $new_path.
25216  new_path="$input_to_shortpath"
25217
25218  input_path="$input_to_shortpath"
25219  # Check if we need to convert this using DOS-style short mode. If the path
25220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25221  # take no chances and rewrite it.
25222  # Note: m4 eats our [], so we need to use [ and ] instead.
25223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25224  if test "x$has_forbidden_chars" != x; then
25225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25229      # Going to short mode and back again did indeed matter. Since short mode is
25230      # case insensitive, let's make it lowercase to improve readability.
25231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25232      # Now convert it back to Unix-stile (cygpath)
25233      input_path=`$CYGPATH -u "$shortmode_path"`
25234      new_path="$input_path"
25235    fi
25236  fi
25237
25238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25239  if test "x$test_cygdrive_prefix" = x; then
25240    # As a simple fix, exclude /usr/bin since it's not a real path.
25241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25243      # a path prefixed by /cygdrive for fixpath to work.
25244      new_path="$CYGWIN_ROOT_PATH$input_path"
25245    fi
25246  fi
25247
25248  # remove trailing .exe if any
25249  new_path="${new_path/%.exe/}"
25250
25251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25252
25253  # First separate the path from the arguments. This will split at the first
25254  # space.
25255  complete="$NM"
25256  path="${complete%% *}"
25257  tmp="$complete EOL"
25258  arguments="${tmp#* }"
25259
25260  # Input might be given as Windows format, start by converting to
25261  # unix format.
25262  new_path="$path"
25263
25264  windows_path="$new_path"
25265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25266    unix_path=`$CYGPATH -u "$windows_path"`
25267    new_path="$unix_path"
25268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25270    new_path="$unix_path"
25271  fi
25272
25273
25274  # Now try to locate executable using which
25275  new_path=`$WHICH "$new_path" 2> /dev/null`
25276
25277  if test "x$new_path" = x; then
25278    # Oops. Which didn't find the executable.
25279    # The splitting of arguments from the executable at a space might have been incorrect,
25280    # since paths with space are more likely in Windows. Give it another try with the whole
25281    # argument.
25282    path="$complete"
25283    arguments="EOL"
25284    new_path="$path"
25285
25286  windows_path="$new_path"
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288    unix_path=`$CYGPATH -u "$windows_path"`
25289    new_path="$unix_path"
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25292    new_path="$unix_path"
25293  fi
25294
25295
25296    new_path=`$WHICH "$new_path" 2> /dev/null`
25297
25298    if test "x$new_path" = x; then
25299      # It's still not found. Now this is an unrecoverable error.
25300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25301$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25302      has_space=`$ECHO "$complete" | $GREP " "`
25303      if test "x$has_space" != x; then
25304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25306      fi
25307      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25308    fi
25309  fi
25310
25311  # Now new_path has a complete unix path to the binary
25312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25313    # Keep paths in /bin as-is, but remove trailing .exe if any
25314    new_path="${new_path/%.exe/}"
25315    # Do not save /bin paths to all_fixpath_prefixes!
25316  else
25317    # Not in mixed or Windows style, start by that.
25318    new_path=`cmd //c echo $new_path`
25319
25320  input_path="$new_path"
25321  # Check if we need to convert this using DOS-style short mode. If the path
25322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25323  # take no chances and rewrite it.
25324  # Note: m4 eats our [], so we need to use [ and ] instead.
25325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25326  if test "x$has_forbidden_chars" != x; then
25327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25329  fi
25330
25331    # Output is in $new_path
25332
25333  windows_path="$new_path"
25334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25335    unix_path=`$CYGPATH -u "$windows_path"`
25336    new_path="$unix_path"
25337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25339    new_path="$unix_path"
25340  fi
25341
25342    # remove trailing .exe if any
25343    new_path="${new_path/%.exe/}"
25344
25345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25347  fi
25348
25349  else
25350    # We're on a posix platform. Hooray! :)
25351    # First separate the path from the arguments. This will split at the first
25352    # space.
25353    complete="$NM"
25354    path="${complete%% *}"
25355    tmp="$complete EOL"
25356    arguments="${tmp#* }"
25357
25358    # Cannot rely on the command "which" here since it doesn't always work.
25359    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25360    if test -z "$is_absolute_path"; then
25361      # Path to executable is not absolute. Find it.
25362      IFS_save="$IFS"
25363      IFS=:
25364      for p in $PATH; do
25365        if test -f "$p/$path" && test -x "$p/$path"; then
25366          new_path="$p/$path"
25367          break
25368        fi
25369      done
25370      IFS="$IFS_save"
25371    else
25372      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25373$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25374      new_path="$path"
25375    fi
25376
25377    if test "x$new_path" = x; then
25378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25379$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25380        has_space=`$ECHO "$complete" | $GREP " "`
25381        if test "x$has_space" != x; then
25382          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25383$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25384        fi
25385        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25386      fi
25387  fi
25388
25389      # Now join together the path and the arguments once again
25390      if test "x$arguments" != xEOL; then
25391        new_complete="$new_path ${arguments% *}"
25392      else
25393        new_complete="$new_path"
25394      fi
25395
25396  if test "x$complete" != "x$new_complete"; then
25397      NM="$new_complete"
25398      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25399$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25400    fi
25401
25402    # Extract the first word of "strip", so it can be a program name with args.
25403set dummy strip; ac_word=$2
25404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25405$as_echo_n "checking for $ac_word... " >&6; }
25406if test "${ac_cv_path_STRIP+set}" = set; then :
25407  $as_echo_n "(cached) " >&6
25408else
25409  case $STRIP in
25410  [\\/]* | ?:[\\/]*)
25411  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25412  ;;
25413  *)
25414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25415for as_dir in $PATH
25416do
25417  IFS=$as_save_IFS
25418  test -z "$as_dir" && as_dir=.
25419    for ac_exec_ext in '' $ac_executable_extensions; do
25420  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25421    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25423    break 2
25424  fi
25425done
25426  done
25427IFS=$as_save_IFS
25428
25429  ;;
25430esac
25431fi
25432STRIP=$ac_cv_path_STRIP
25433if test -n "$STRIP"; then
25434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25435$as_echo "$STRIP" >&6; }
25436else
25437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25438$as_echo "no" >&6; }
25439fi
25440
25441
25442
25443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25444
25445  # First separate the path from the arguments. This will split at the first
25446  # space.
25447  complete="$STRIP"
25448  path="${complete%% *}"
25449  tmp="$complete EOL"
25450  arguments="${tmp#* }"
25451
25452  # Input might be given as Windows format, start by converting to
25453  # unix format.
25454  new_path=`$CYGPATH -u "$path"`
25455
25456  # Now try to locate executable using which
25457  new_path=`$WHICH "$new_path" 2> /dev/null`
25458  # bat and cmd files are not always considered executable in cygwin causing which
25459  # to not find them
25460  if test "x$new_path" = x \
25461           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25462           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25463    new_path=`$CYGPATH -u "$path"`
25464  fi
25465  if test "x$new_path" = x; then
25466    # Oops. Which didn't find the executable.
25467    # The splitting of arguments from the executable at a space might have been incorrect,
25468    # since paths with space are more likely in Windows. Give it another try with the whole
25469    # argument.
25470    path="$complete"
25471    arguments="EOL"
25472    new_path=`$CYGPATH -u "$path"`
25473    new_path=`$WHICH "$new_path" 2> /dev/null`
25474    # bat and cmd files are not always considered executable in cygwin causing which
25475    # to not find them
25476    if test "x$new_path" = x \
25477             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25478             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25479      new_path=`$CYGPATH -u "$path"`
25480    fi
25481    if test "x$new_path" = x; then
25482      # It's still not found. Now this is an unrecoverable error.
25483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25484$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25485      has_space=`$ECHO "$complete" | $GREP " "`
25486      if test "x$has_space" != x; then
25487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25489      fi
25490      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25491    fi
25492  fi
25493
25494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25497  # "foo.exe" is OK but "foo" is an error.
25498  #
25499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25500  # It is also a way to make sure we got the proper file name for the real test later on.
25501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25502  if test "x$test_shortpath" = x; then
25503    # Short path failed, file does not exist as specified.
25504    # Try adding .exe or .cmd
25505    if test -f "${new_path}.exe"; then
25506       input_to_shortpath="${new_path}.exe"
25507    elif test -f "${new_path}.cmd"; then
25508       input_to_shortpath="${new_path}.cmd"
25509    else
25510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25511$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25512      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25513$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25514      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25515    fi
25516  else
25517    input_to_shortpath="$new_path"
25518  fi
25519
25520  # Call helper function which possibly converts this using DOS-style short mode.
25521  # If so, the updated path is stored in $new_path.
25522  new_path="$input_to_shortpath"
25523
25524  input_path="$input_to_shortpath"
25525  # Check if we need to convert this using DOS-style short mode. If the path
25526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25527  # take no chances and rewrite it.
25528  # Note: m4 eats our [], so we need to use [ and ] instead.
25529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25530  if test "x$has_forbidden_chars" != x; then
25531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25535      # Going to short mode and back again did indeed matter. Since short mode is
25536      # case insensitive, let's make it lowercase to improve readability.
25537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25538      # Now convert it back to Unix-stile (cygpath)
25539      input_path=`$CYGPATH -u "$shortmode_path"`
25540      new_path="$input_path"
25541    fi
25542  fi
25543
25544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25545  if test "x$test_cygdrive_prefix" = x; then
25546    # As a simple fix, exclude /usr/bin since it's not a real path.
25547    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25549      # a path prefixed by /cygdrive for fixpath to work.
25550      new_path="$CYGWIN_ROOT_PATH$input_path"
25551    fi
25552  fi
25553
25554  # remove trailing .exe if any
25555  new_path="${new_path/%.exe/}"
25556
25557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25558
25559  # First separate the path from the arguments. This will split at the first
25560  # space.
25561  complete="$STRIP"
25562  path="${complete%% *}"
25563  tmp="$complete EOL"
25564  arguments="${tmp#* }"
25565
25566  # Input might be given as Windows format, start by converting to
25567  # unix format.
25568  new_path="$path"
25569
25570  windows_path="$new_path"
25571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25572    unix_path=`$CYGPATH -u "$windows_path"`
25573    new_path="$unix_path"
25574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25576    new_path="$unix_path"
25577  fi
25578
25579
25580  # Now try to locate executable using which
25581  new_path=`$WHICH "$new_path" 2> /dev/null`
25582
25583  if test "x$new_path" = x; then
25584    # Oops. Which didn't find the executable.
25585    # The splitting of arguments from the executable at a space might have been incorrect,
25586    # since paths with space are more likely in Windows. Give it another try with the whole
25587    # argument.
25588    path="$complete"
25589    arguments="EOL"
25590    new_path="$path"
25591
25592  windows_path="$new_path"
25593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25594    unix_path=`$CYGPATH -u "$windows_path"`
25595    new_path="$unix_path"
25596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25598    new_path="$unix_path"
25599  fi
25600
25601
25602    new_path=`$WHICH "$new_path" 2> /dev/null`
25603
25604    if test "x$new_path" = x; then
25605      # It's still not found. Now this is an unrecoverable error.
25606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25607$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25608      has_space=`$ECHO "$complete" | $GREP " "`
25609      if test "x$has_space" != x; then
25610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25612      fi
25613      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25614    fi
25615  fi
25616
25617  # Now new_path has a complete unix path to the binary
25618  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25619    # Keep paths in /bin as-is, but remove trailing .exe if any
25620    new_path="${new_path/%.exe/}"
25621    # Do not save /bin paths to all_fixpath_prefixes!
25622  else
25623    # Not in mixed or Windows style, start by that.
25624    new_path=`cmd //c echo $new_path`
25625
25626  input_path="$new_path"
25627  # Check if we need to convert this using DOS-style short mode. If the path
25628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25629  # take no chances and rewrite it.
25630  # Note: m4 eats our [], so we need to use [ and ] instead.
25631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25632  if test "x$has_forbidden_chars" != x; then
25633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25635  fi
25636
25637    # Output is in $new_path
25638
25639  windows_path="$new_path"
25640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25641    unix_path=`$CYGPATH -u "$windows_path"`
25642    new_path="$unix_path"
25643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25645    new_path="$unix_path"
25646  fi
25647
25648    # remove trailing .exe if any
25649    new_path="${new_path/%.exe/}"
25650
25651    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25652    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25653  fi
25654
25655  else
25656    # We're on a posix platform. Hooray! :)
25657    # First separate the path from the arguments. This will split at the first
25658    # space.
25659    complete="$STRIP"
25660    path="${complete%% *}"
25661    tmp="$complete EOL"
25662    arguments="${tmp#* }"
25663
25664    # Cannot rely on the command "which" here since it doesn't always work.
25665    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25666    if test -z "$is_absolute_path"; then
25667      # Path to executable is not absolute. Find it.
25668      IFS_save="$IFS"
25669      IFS=:
25670      for p in $PATH; do
25671        if test -f "$p/$path" && test -x "$p/$path"; then
25672          new_path="$p/$path"
25673          break
25674        fi
25675      done
25676      IFS="$IFS_save"
25677    else
25678      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25679$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25680      new_path="$path"
25681    fi
25682
25683    if test "x$new_path" = x; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25685$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25686        has_space=`$ECHO "$complete" | $GREP " "`
25687        if test "x$has_space" != x; then
25688          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25689$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25690        fi
25691        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25692      fi
25693  fi
25694
25695      # Now join together the path and the arguments once again
25696      if test "x$arguments" != xEOL; then
25697        new_complete="$new_path ${arguments% *}"
25698      else
25699        new_complete="$new_path"
25700      fi
25701
25702  if test "x$complete" != "x$new_complete"; then
25703      STRIP="$new_complete"
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25705$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25706    fi
25707
25708    # Extract the first word of "mcs", so it can be a program name with args.
25709set dummy mcs; ac_word=$2
25710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25711$as_echo_n "checking for $ac_word... " >&6; }
25712if test "${ac_cv_path_MCS+set}" = set; then :
25713  $as_echo_n "(cached) " >&6
25714else
25715  case $MCS in
25716  [\\/]* | ?:[\\/]*)
25717  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25718  ;;
25719  *)
25720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25721for as_dir in $PATH
25722do
25723  IFS=$as_save_IFS
25724  test -z "$as_dir" && as_dir=.
25725    for ac_exec_ext in '' $ac_executable_extensions; do
25726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25727    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25729    break 2
25730  fi
25731done
25732  done
25733IFS=$as_save_IFS
25734
25735  ;;
25736esac
25737fi
25738MCS=$ac_cv_path_MCS
25739if test -n "$MCS"; then
25740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25741$as_echo "$MCS" >&6; }
25742else
25743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25744$as_echo "no" >&6; }
25745fi
25746
25747
25748
25749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25750
25751  # First separate the path from the arguments. This will split at the first
25752  # space.
25753  complete="$MCS"
25754  path="${complete%% *}"
25755  tmp="$complete EOL"
25756  arguments="${tmp#* }"
25757
25758  # Input might be given as Windows format, start by converting to
25759  # unix format.
25760  new_path=`$CYGPATH -u "$path"`
25761
25762  # Now try to locate executable using which
25763  new_path=`$WHICH "$new_path" 2> /dev/null`
25764  # bat and cmd files are not always considered executable in cygwin causing which
25765  # to not find them
25766  if test "x$new_path" = x \
25767           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25768           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25769    new_path=`$CYGPATH -u "$path"`
25770  fi
25771  if test "x$new_path" = x; then
25772    # Oops. Which didn't find the executable.
25773    # The splitting of arguments from the executable at a space might have been incorrect,
25774    # since paths with space are more likely in Windows. Give it another try with the whole
25775    # argument.
25776    path="$complete"
25777    arguments="EOL"
25778    new_path=`$CYGPATH -u "$path"`
25779    new_path=`$WHICH "$new_path" 2> /dev/null`
25780    # bat and cmd files are not always considered executable in cygwin causing which
25781    # to not find them
25782    if test "x$new_path" = x \
25783             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25784             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25785      new_path=`$CYGPATH -u "$path"`
25786    fi
25787    if test "x$new_path" = x; then
25788      # It's still not found. Now this is an unrecoverable error.
25789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25790$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25791      has_space=`$ECHO "$complete" | $GREP " "`
25792      if test "x$has_space" != x; then
25793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25795      fi
25796      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25797    fi
25798  fi
25799
25800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25803  # "foo.exe" is OK but "foo" is an error.
25804  #
25805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25806  # It is also a way to make sure we got the proper file name for the real test later on.
25807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25808  if test "x$test_shortpath" = x; then
25809    # Short path failed, file does not exist as specified.
25810    # Try adding .exe or .cmd
25811    if test -f "${new_path}.exe"; then
25812       input_to_shortpath="${new_path}.exe"
25813    elif test -f "${new_path}.cmd"; then
25814       input_to_shortpath="${new_path}.cmd"
25815    else
25816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25817$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25820      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25821    fi
25822  else
25823    input_to_shortpath="$new_path"
25824  fi
25825
25826  # Call helper function which possibly converts this using DOS-style short mode.
25827  # If so, the updated path is stored in $new_path.
25828  new_path="$input_to_shortpath"
25829
25830  input_path="$input_to_shortpath"
25831  # Check if we need to convert this using DOS-style short mode. If the path
25832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25833  # take no chances and rewrite it.
25834  # Note: m4 eats our [], so we need to use [ and ] instead.
25835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25836  if test "x$has_forbidden_chars" != x; then
25837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25841      # Going to short mode and back again did indeed matter. Since short mode is
25842      # case insensitive, let's make it lowercase to improve readability.
25843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25844      # Now convert it back to Unix-stile (cygpath)
25845      input_path=`$CYGPATH -u "$shortmode_path"`
25846      new_path="$input_path"
25847    fi
25848  fi
25849
25850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25851  if test "x$test_cygdrive_prefix" = x; then
25852    # As a simple fix, exclude /usr/bin since it's not a real path.
25853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25855      # a path prefixed by /cygdrive for fixpath to work.
25856      new_path="$CYGWIN_ROOT_PATH$input_path"
25857    fi
25858  fi
25859
25860  # remove trailing .exe if any
25861  new_path="${new_path/%.exe/}"
25862
25863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25864
25865  # First separate the path from the arguments. This will split at the first
25866  # space.
25867  complete="$MCS"
25868  path="${complete%% *}"
25869  tmp="$complete EOL"
25870  arguments="${tmp#* }"
25871
25872  # Input might be given as Windows format, start by converting to
25873  # unix format.
25874  new_path="$path"
25875
25876  windows_path="$new_path"
25877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878    unix_path=`$CYGPATH -u "$windows_path"`
25879    new_path="$unix_path"
25880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25882    new_path="$unix_path"
25883  fi
25884
25885
25886  # Now try to locate executable using which
25887  new_path=`$WHICH "$new_path" 2> /dev/null`
25888
25889  if test "x$new_path" = x; then
25890    # Oops. Which didn't find the executable.
25891    # The splitting of arguments from the executable at a space might have been incorrect,
25892    # since paths with space are more likely in Windows. Give it another try with the whole
25893    # argument.
25894    path="$complete"
25895    arguments="EOL"
25896    new_path="$path"
25897
25898  windows_path="$new_path"
25899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25900    unix_path=`$CYGPATH -u "$windows_path"`
25901    new_path="$unix_path"
25902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25904    new_path="$unix_path"
25905  fi
25906
25907
25908    new_path=`$WHICH "$new_path" 2> /dev/null`
25909
25910    if test "x$new_path" = x; then
25911      # It's still not found. Now this is an unrecoverable error.
25912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25913$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25914      has_space=`$ECHO "$complete" | $GREP " "`
25915      if test "x$has_space" != x; then
25916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25918      fi
25919      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25920    fi
25921  fi
25922
25923  # Now new_path has a complete unix path to the binary
25924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25925    # Keep paths in /bin as-is, but remove trailing .exe if any
25926    new_path="${new_path/%.exe/}"
25927    # Do not save /bin paths to all_fixpath_prefixes!
25928  else
25929    # Not in mixed or Windows style, start by that.
25930    new_path=`cmd //c echo $new_path`
25931
25932  input_path="$new_path"
25933  # Check if we need to convert this using DOS-style short mode. If the path
25934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25935  # take no chances and rewrite it.
25936  # Note: m4 eats our [], so we need to use [ and ] instead.
25937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25938  if test "x$has_forbidden_chars" != x; then
25939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25941  fi
25942
25943    # Output is in $new_path
25944
25945  windows_path="$new_path"
25946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25947    unix_path=`$CYGPATH -u "$windows_path"`
25948    new_path="$unix_path"
25949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25951    new_path="$unix_path"
25952  fi
25953
25954    # remove trailing .exe if any
25955    new_path="${new_path/%.exe/}"
25956
25957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25959  fi
25960
25961  else
25962    # We're on a posix platform. Hooray! :)
25963    # First separate the path from the arguments. This will split at the first
25964    # space.
25965    complete="$MCS"
25966    path="${complete%% *}"
25967    tmp="$complete EOL"
25968    arguments="${tmp#* }"
25969
25970    # Cannot rely on the command "which" here since it doesn't always work.
25971    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25972    if test -z "$is_absolute_path"; then
25973      # Path to executable is not absolute. Find it.
25974      IFS_save="$IFS"
25975      IFS=:
25976      for p in $PATH; do
25977        if test -f "$p/$path" && test -x "$p/$path"; then
25978          new_path="$p/$path"
25979          break
25980        fi
25981      done
25982      IFS="$IFS_save"
25983    else
25984      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25985$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25986      new_path="$path"
25987    fi
25988
25989    if test "x$new_path" = x; then
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25991$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25992        has_space=`$ECHO "$complete" | $GREP " "`
25993        if test "x$has_space" != x; then
25994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25996        fi
25997        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25998      fi
25999  fi
26000
26001      # Now join together the path and the arguments once again
26002      if test "x$arguments" != xEOL; then
26003        new_complete="$new_path ${arguments% *}"
26004      else
26005        new_complete="$new_path"
26006      fi
26007
26008  if test "x$complete" != "x$new_complete"; then
26009      MCS="$new_complete"
26010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26011$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26012    fi
26013
26014elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26015    if test -n "$ac_tool_prefix"; then
26016  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26017set dummy ${ac_tool_prefix}nm; ac_word=$2
26018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26019$as_echo_n "checking for $ac_word... " >&6; }
26020if test "${ac_cv_prog_NM+set}" = set; then :
26021  $as_echo_n "(cached) " >&6
26022else
26023  if test -n "$NM"; then
26024  ac_cv_prog_NM="$NM" # Let the user override the test.
26025else
26026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26027for as_dir in $PATH
26028do
26029  IFS=$as_save_IFS
26030  test -z "$as_dir" && as_dir=.
26031    for ac_exec_ext in '' $ac_executable_extensions; do
26032  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26033    ac_cv_prog_NM="${ac_tool_prefix}nm"
26034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26035    break 2
26036  fi
26037done
26038  done
26039IFS=$as_save_IFS
26040
26041fi
26042fi
26043NM=$ac_cv_prog_NM
26044if test -n "$NM"; then
26045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26046$as_echo "$NM" >&6; }
26047else
26048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26049$as_echo "no" >&6; }
26050fi
26051
26052
26053fi
26054if test -z "$ac_cv_prog_NM"; then
26055  ac_ct_NM=$NM
26056  # Extract the first word of "nm", so it can be a program name with args.
26057set dummy nm; ac_word=$2
26058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26059$as_echo_n "checking for $ac_word... " >&6; }
26060if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26061  $as_echo_n "(cached) " >&6
26062else
26063  if test -n "$ac_ct_NM"; then
26064  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26065else
26066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26067for as_dir in $PATH
26068do
26069  IFS=$as_save_IFS
26070  test -z "$as_dir" && as_dir=.
26071    for ac_exec_ext in '' $ac_executable_extensions; do
26072  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26073    ac_cv_prog_ac_ct_NM="nm"
26074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26075    break 2
26076  fi
26077done
26078  done
26079IFS=$as_save_IFS
26080
26081fi
26082fi
26083ac_ct_NM=$ac_cv_prog_ac_ct_NM
26084if test -n "$ac_ct_NM"; then
26085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26086$as_echo "$ac_ct_NM" >&6; }
26087else
26088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26089$as_echo "no" >&6; }
26090fi
26091
26092  if test "x$ac_ct_NM" = x; then
26093    NM=""
26094  else
26095    case $cross_compiling:$ac_tool_warned in
26096yes:)
26097{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26098$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26099ac_tool_warned=yes ;;
26100esac
26101    NM=$ac_ct_NM
26102  fi
26103else
26104  NM="$ac_cv_prog_NM"
26105fi
26106
26107
26108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26109
26110  # First separate the path from the arguments. This will split at the first
26111  # space.
26112  complete="$NM"
26113  path="${complete%% *}"
26114  tmp="$complete EOL"
26115  arguments="${tmp#* }"
26116
26117  # Input might be given as Windows format, start by converting to
26118  # unix format.
26119  new_path=`$CYGPATH -u "$path"`
26120
26121  # Now try to locate executable using which
26122  new_path=`$WHICH "$new_path" 2> /dev/null`
26123  # bat and cmd files are not always considered executable in cygwin causing which
26124  # to not find them
26125  if test "x$new_path" = x \
26126           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26127           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26128    new_path=`$CYGPATH -u "$path"`
26129  fi
26130  if test "x$new_path" = x; then
26131    # Oops. Which didn't find the executable.
26132    # The splitting of arguments from the executable at a space might have been incorrect,
26133    # since paths with space are more likely in Windows. Give it another try with the whole
26134    # argument.
26135    path="$complete"
26136    arguments="EOL"
26137    new_path=`$CYGPATH -u "$path"`
26138    new_path=`$WHICH "$new_path" 2> /dev/null`
26139    # bat and cmd files are not always considered executable in cygwin causing which
26140    # to not find them
26141    if test "x$new_path" = x \
26142             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26143             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26144      new_path=`$CYGPATH -u "$path"`
26145    fi
26146    if test "x$new_path" = x; then
26147      # It's still not found. Now this is an unrecoverable error.
26148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26149$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26150      has_space=`$ECHO "$complete" | $GREP " "`
26151      if test "x$has_space" != x; then
26152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26154      fi
26155      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26156    fi
26157  fi
26158
26159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26162  # "foo.exe" is OK but "foo" is an error.
26163  #
26164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26165  # It is also a way to make sure we got the proper file name for the real test later on.
26166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26167  if test "x$test_shortpath" = x; then
26168    # Short path failed, file does not exist as specified.
26169    # Try adding .exe or .cmd
26170    if test -f "${new_path}.exe"; then
26171       input_to_shortpath="${new_path}.exe"
26172    elif test -f "${new_path}.cmd"; then
26173       input_to_shortpath="${new_path}.cmd"
26174    else
26175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26176$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26179      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26180    fi
26181  else
26182    input_to_shortpath="$new_path"
26183  fi
26184
26185  # Call helper function which possibly converts this using DOS-style short mode.
26186  # If so, the updated path is stored in $new_path.
26187  new_path="$input_to_shortpath"
26188
26189  input_path="$input_to_shortpath"
26190  # Check if we need to convert this using DOS-style short mode. If the path
26191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26192  # take no chances and rewrite it.
26193  # Note: m4 eats our [], so we need to use [ and ] instead.
26194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26195  if test "x$has_forbidden_chars" != x; then
26196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26200      # Going to short mode and back again did indeed matter. Since short mode is
26201      # case insensitive, let's make it lowercase to improve readability.
26202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26203      # Now convert it back to Unix-stile (cygpath)
26204      input_path=`$CYGPATH -u "$shortmode_path"`
26205      new_path="$input_path"
26206    fi
26207  fi
26208
26209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26210  if test "x$test_cygdrive_prefix" = x; then
26211    # As a simple fix, exclude /usr/bin since it's not a real path.
26212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26214      # a path prefixed by /cygdrive for fixpath to work.
26215      new_path="$CYGWIN_ROOT_PATH$input_path"
26216    fi
26217  fi
26218
26219  # remove trailing .exe if any
26220  new_path="${new_path/%.exe/}"
26221
26222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26223
26224  # First separate the path from the arguments. This will split at the first
26225  # space.
26226  complete="$NM"
26227  path="${complete%% *}"
26228  tmp="$complete EOL"
26229  arguments="${tmp#* }"
26230
26231  # Input might be given as Windows format, start by converting to
26232  # unix format.
26233  new_path="$path"
26234
26235  windows_path="$new_path"
26236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26237    unix_path=`$CYGPATH -u "$windows_path"`
26238    new_path="$unix_path"
26239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26241    new_path="$unix_path"
26242  fi
26243
26244
26245  # Now try to locate executable using which
26246  new_path=`$WHICH "$new_path" 2> /dev/null`
26247
26248  if test "x$new_path" = x; then
26249    # Oops. Which didn't find the executable.
26250    # The splitting of arguments from the executable at a space might have been incorrect,
26251    # since paths with space are more likely in Windows. Give it another try with the whole
26252    # argument.
26253    path="$complete"
26254    arguments="EOL"
26255    new_path="$path"
26256
26257  windows_path="$new_path"
26258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26259    unix_path=`$CYGPATH -u "$windows_path"`
26260    new_path="$unix_path"
26261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26263    new_path="$unix_path"
26264  fi
26265
26266
26267    new_path=`$WHICH "$new_path" 2> /dev/null`
26268
26269    if test "x$new_path" = x; then
26270      # It's still not found. Now this is an unrecoverable error.
26271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26272$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26273      has_space=`$ECHO "$complete" | $GREP " "`
26274      if test "x$has_space" != x; then
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26277      fi
26278      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26279    fi
26280  fi
26281
26282  # Now new_path has a complete unix path to the binary
26283  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26284    # Keep paths in /bin as-is, but remove trailing .exe if any
26285    new_path="${new_path/%.exe/}"
26286    # Do not save /bin paths to all_fixpath_prefixes!
26287  else
26288    # Not in mixed or Windows style, start by that.
26289    new_path=`cmd //c echo $new_path`
26290
26291  input_path="$new_path"
26292  # Check if we need to convert this using DOS-style short mode. If the path
26293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26294  # take no chances and rewrite it.
26295  # Note: m4 eats our [], so we need to use [ and ] instead.
26296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26297  if test "x$has_forbidden_chars" != x; then
26298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26300  fi
26301
26302    # Output is in $new_path
26303
26304  windows_path="$new_path"
26305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26306    unix_path=`$CYGPATH -u "$windows_path"`
26307    new_path="$unix_path"
26308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26310    new_path="$unix_path"
26311  fi
26312
26313    # remove trailing .exe if any
26314    new_path="${new_path/%.exe/}"
26315
26316    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26317    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26318  fi
26319
26320  else
26321    # We're on a posix platform. Hooray! :)
26322    # First separate the path from the arguments. This will split at the first
26323    # space.
26324    complete="$NM"
26325    path="${complete%% *}"
26326    tmp="$complete EOL"
26327    arguments="${tmp#* }"
26328
26329    # Cannot rely on the command "which" here since it doesn't always work.
26330    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26331    if test -z "$is_absolute_path"; then
26332      # Path to executable is not absolute. Find it.
26333      IFS_save="$IFS"
26334      IFS=:
26335      for p in $PATH; do
26336        if test -f "$p/$path" && test -x "$p/$path"; then
26337          new_path="$p/$path"
26338          break
26339        fi
26340      done
26341      IFS="$IFS_save"
26342    else
26343      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26344$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26345      new_path="$path"
26346    fi
26347
26348    if test "x$new_path" = x; then
26349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26350$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26351        has_space=`$ECHO "$complete" | $GREP " "`
26352        if test "x$has_space" != x; then
26353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26355        fi
26356        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26357      fi
26358  fi
26359
26360      # Now join together the path and the arguments once again
26361      if test "x$arguments" != xEOL; then
26362        new_complete="$new_path ${arguments% *}"
26363      else
26364        new_complete="$new_path"
26365      fi
26366
26367  if test "x$complete" != "x$new_complete"; then
26368      NM="$new_complete"
26369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26370$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26371    fi
26372
26373    if test -n "$ac_tool_prefix"; then
26374  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26375set dummy ${ac_tool_prefix}strip; ac_word=$2
26376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26377$as_echo_n "checking for $ac_word... " >&6; }
26378if test "${ac_cv_prog_STRIP+set}" = set; then :
26379  $as_echo_n "(cached) " >&6
26380else
26381  if test -n "$STRIP"; then
26382  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26383else
26384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26385for as_dir in $PATH
26386do
26387  IFS=$as_save_IFS
26388  test -z "$as_dir" && as_dir=.
26389    for ac_exec_ext in '' $ac_executable_extensions; do
26390  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26391    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26393    break 2
26394  fi
26395done
26396  done
26397IFS=$as_save_IFS
26398
26399fi
26400fi
26401STRIP=$ac_cv_prog_STRIP
26402if test -n "$STRIP"; then
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26404$as_echo "$STRIP" >&6; }
26405else
26406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26407$as_echo "no" >&6; }
26408fi
26409
26410
26411fi
26412if test -z "$ac_cv_prog_STRIP"; then
26413  ac_ct_STRIP=$STRIP
26414  # Extract the first word of "strip", so it can be a program name with args.
26415set dummy strip; ac_word=$2
26416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26417$as_echo_n "checking for $ac_word... " >&6; }
26418if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26419  $as_echo_n "(cached) " >&6
26420else
26421  if test -n "$ac_ct_STRIP"; then
26422  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26423else
26424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26425for as_dir in $PATH
26426do
26427  IFS=$as_save_IFS
26428  test -z "$as_dir" && as_dir=.
26429    for ac_exec_ext in '' $ac_executable_extensions; do
26430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26431    ac_cv_prog_ac_ct_STRIP="strip"
26432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26433    break 2
26434  fi
26435done
26436  done
26437IFS=$as_save_IFS
26438
26439fi
26440fi
26441ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26442if test -n "$ac_ct_STRIP"; then
26443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26444$as_echo "$ac_ct_STRIP" >&6; }
26445else
26446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26447$as_echo "no" >&6; }
26448fi
26449
26450  if test "x$ac_ct_STRIP" = x; then
26451    STRIP=""
26452  else
26453    case $cross_compiling:$ac_tool_warned in
26454yes:)
26455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26457ac_tool_warned=yes ;;
26458esac
26459    STRIP=$ac_ct_STRIP
26460  fi
26461else
26462  STRIP="$ac_cv_prog_STRIP"
26463fi
26464
26465
26466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26467
26468  # First separate the path from the arguments. This will split at the first
26469  # space.
26470  complete="$STRIP"
26471  path="${complete%% *}"
26472  tmp="$complete EOL"
26473  arguments="${tmp#* }"
26474
26475  # Input might be given as Windows format, start by converting to
26476  # unix format.
26477  new_path=`$CYGPATH -u "$path"`
26478
26479  # Now try to locate executable using which
26480  new_path=`$WHICH "$new_path" 2> /dev/null`
26481  # bat and cmd files are not always considered executable in cygwin causing which
26482  # to not find them
26483  if test "x$new_path" = x \
26484           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26485           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26486    new_path=`$CYGPATH -u "$path"`
26487  fi
26488  if test "x$new_path" = x; then
26489    # Oops. Which didn't find the executable.
26490    # The splitting of arguments from the executable at a space might have been incorrect,
26491    # since paths with space are more likely in Windows. Give it another try with the whole
26492    # argument.
26493    path="$complete"
26494    arguments="EOL"
26495    new_path=`$CYGPATH -u "$path"`
26496    new_path=`$WHICH "$new_path" 2> /dev/null`
26497    # bat and cmd files are not always considered executable in cygwin causing which
26498    # to not find them
26499    if test "x$new_path" = x \
26500             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26501             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26502      new_path=`$CYGPATH -u "$path"`
26503    fi
26504    if test "x$new_path" = x; then
26505      # It's still not found. Now this is an unrecoverable error.
26506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26507$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26508      has_space=`$ECHO "$complete" | $GREP " "`
26509      if test "x$has_space" != x; then
26510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26512      fi
26513      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26514    fi
26515  fi
26516
26517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26520  # "foo.exe" is OK but "foo" is an error.
26521  #
26522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26523  # It is also a way to make sure we got the proper file name for the real test later on.
26524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26525  if test "x$test_shortpath" = x; then
26526    # Short path failed, file does not exist as specified.
26527    # Try adding .exe or .cmd
26528    if test -f "${new_path}.exe"; then
26529       input_to_shortpath="${new_path}.exe"
26530    elif test -f "${new_path}.cmd"; then
26531       input_to_shortpath="${new_path}.cmd"
26532    else
26533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26534$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26535      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26536$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26537      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26538    fi
26539  else
26540    input_to_shortpath="$new_path"
26541  fi
26542
26543  # Call helper function which possibly converts this using DOS-style short mode.
26544  # If so, the updated path is stored in $new_path.
26545  new_path="$input_to_shortpath"
26546
26547  input_path="$input_to_shortpath"
26548  # Check if we need to convert this using DOS-style short mode. If the path
26549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26550  # take no chances and rewrite it.
26551  # Note: m4 eats our [], so we need to use [ and ] instead.
26552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26553  if test "x$has_forbidden_chars" != x; then
26554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26558      # Going to short mode and back again did indeed matter. Since short mode is
26559      # case insensitive, let's make it lowercase to improve readability.
26560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26561      # Now convert it back to Unix-stile (cygpath)
26562      input_path=`$CYGPATH -u "$shortmode_path"`
26563      new_path="$input_path"
26564    fi
26565  fi
26566
26567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26568  if test "x$test_cygdrive_prefix" = x; then
26569    # As a simple fix, exclude /usr/bin since it's not a real path.
26570    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26572      # a path prefixed by /cygdrive for fixpath to work.
26573      new_path="$CYGWIN_ROOT_PATH$input_path"
26574    fi
26575  fi
26576
26577  # remove trailing .exe if any
26578  new_path="${new_path/%.exe/}"
26579
26580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26581
26582  # First separate the path from the arguments. This will split at the first
26583  # space.
26584  complete="$STRIP"
26585  path="${complete%% *}"
26586  tmp="$complete EOL"
26587  arguments="${tmp#* }"
26588
26589  # Input might be given as Windows format, start by converting to
26590  # unix format.
26591  new_path="$path"
26592
26593  windows_path="$new_path"
26594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26595    unix_path=`$CYGPATH -u "$windows_path"`
26596    new_path="$unix_path"
26597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26599    new_path="$unix_path"
26600  fi
26601
26602
26603  # Now try to locate executable using which
26604  new_path=`$WHICH "$new_path" 2> /dev/null`
26605
26606  if test "x$new_path" = x; then
26607    # Oops. Which didn't find the executable.
26608    # The splitting of arguments from the executable at a space might have been incorrect,
26609    # since paths with space are more likely in Windows. Give it another try with the whole
26610    # argument.
26611    path="$complete"
26612    arguments="EOL"
26613    new_path="$path"
26614
26615  windows_path="$new_path"
26616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26617    unix_path=`$CYGPATH -u "$windows_path"`
26618    new_path="$unix_path"
26619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26621    new_path="$unix_path"
26622  fi
26623
26624
26625    new_path=`$WHICH "$new_path" 2> /dev/null`
26626
26627    if test "x$new_path" = x; then
26628      # It's still not found. Now this is an unrecoverable error.
26629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26630$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26631      has_space=`$ECHO "$complete" | $GREP " "`
26632      if test "x$has_space" != x; then
26633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26635      fi
26636      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26637    fi
26638  fi
26639
26640  # Now new_path has a complete unix path to the binary
26641  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26642    # Keep paths in /bin as-is, but remove trailing .exe if any
26643    new_path="${new_path/%.exe/}"
26644    # Do not save /bin paths to all_fixpath_prefixes!
26645  else
26646    # Not in mixed or Windows style, start by that.
26647    new_path=`cmd //c echo $new_path`
26648
26649  input_path="$new_path"
26650  # Check if we need to convert this using DOS-style short mode. If the path
26651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26652  # take no chances and rewrite it.
26653  # Note: m4 eats our [], so we need to use [ and ] instead.
26654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26655  if test "x$has_forbidden_chars" != x; then
26656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26658  fi
26659
26660    # Output is in $new_path
26661
26662  windows_path="$new_path"
26663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26664    unix_path=`$CYGPATH -u "$windows_path"`
26665    new_path="$unix_path"
26666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26668    new_path="$unix_path"
26669  fi
26670
26671    # remove trailing .exe if any
26672    new_path="${new_path/%.exe/}"
26673
26674    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26675    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26676  fi
26677
26678  else
26679    # We're on a posix platform. Hooray! :)
26680    # First separate the path from the arguments. This will split at the first
26681    # space.
26682    complete="$STRIP"
26683    path="${complete%% *}"
26684    tmp="$complete EOL"
26685    arguments="${tmp#* }"
26686
26687    # Cannot rely on the command "which" here since it doesn't always work.
26688    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26689    if test -z "$is_absolute_path"; then
26690      # Path to executable is not absolute. Find it.
26691      IFS_save="$IFS"
26692      IFS=:
26693      for p in $PATH; do
26694        if test -f "$p/$path" && test -x "$p/$path"; then
26695          new_path="$p/$path"
26696          break
26697        fi
26698      done
26699      IFS="$IFS_save"
26700    else
26701      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26702$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26703      new_path="$path"
26704    fi
26705
26706    if test "x$new_path" = x; then
26707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26708$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26709        has_space=`$ECHO "$complete" | $GREP " "`
26710        if test "x$has_space" != x; then
26711          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26712$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26713        fi
26714        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26715      fi
26716  fi
26717
26718      # Now join together the path and the arguments once again
26719      if test "x$arguments" != xEOL; then
26720        new_complete="$new_path ${arguments% *}"
26721      else
26722        new_complete="$new_path"
26723      fi
26724
26725  if test "x$complete" != "x$new_complete"; then
26726      STRIP="$new_complete"
26727      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26728$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26729    fi
26730
26731fi
26732
26733# objcopy is used for moving debug symbols to separate files when
26734# full debug symbols are enabled.
26735if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26736    if test -n "$ac_tool_prefix"; then
26737  for ac_prog in gobjcopy objcopy
26738  do
26739    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26742$as_echo_n "checking for $ac_word... " >&6; }
26743if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26744  $as_echo_n "(cached) " >&6
26745else
26746  if test -n "$OBJCOPY"; then
26747  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26748else
26749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26750for as_dir in $PATH
26751do
26752  IFS=$as_save_IFS
26753  test -z "$as_dir" && as_dir=.
26754    for ac_exec_ext in '' $ac_executable_extensions; do
26755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26756    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26758    break 2
26759  fi
26760done
26761  done
26762IFS=$as_save_IFS
26763
26764fi
26765fi
26766OBJCOPY=$ac_cv_prog_OBJCOPY
26767if test -n "$OBJCOPY"; then
26768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26769$as_echo "$OBJCOPY" >&6; }
26770else
26771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26772$as_echo "no" >&6; }
26773fi
26774
26775
26776    test -n "$OBJCOPY" && break
26777  done
26778fi
26779if test -z "$OBJCOPY"; then
26780  ac_ct_OBJCOPY=$OBJCOPY
26781  for ac_prog in gobjcopy objcopy
26782do
26783  # Extract the first word of "$ac_prog", so it can be a program name with args.
26784set dummy $ac_prog; ac_word=$2
26785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26786$as_echo_n "checking for $ac_word... " >&6; }
26787if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26788  $as_echo_n "(cached) " >&6
26789else
26790  if test -n "$ac_ct_OBJCOPY"; then
26791  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26792else
26793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26794for as_dir in $PATH
26795do
26796  IFS=$as_save_IFS
26797  test -z "$as_dir" && as_dir=.
26798    for ac_exec_ext in '' $ac_executable_extensions; do
26799  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26800    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26802    break 2
26803  fi
26804done
26805  done
26806IFS=$as_save_IFS
26807
26808fi
26809fi
26810ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26811if test -n "$ac_ct_OBJCOPY"; then
26812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26813$as_echo "$ac_ct_OBJCOPY" >&6; }
26814else
26815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26816$as_echo "no" >&6; }
26817fi
26818
26819
26820  test -n "$ac_ct_OBJCOPY" && break
26821done
26822
26823  if test "x$ac_ct_OBJCOPY" = x; then
26824    OBJCOPY=""
26825  else
26826    case $cross_compiling:$ac_tool_warned in
26827yes:)
26828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26830ac_tool_warned=yes ;;
26831esac
26832    OBJCOPY=$ac_ct_OBJCOPY
26833  fi
26834fi
26835
26836    # Only call fixup if objcopy was found.
26837    if test -n "$OBJCOPY"; then
26838
26839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26840
26841  # First separate the path from the arguments. This will split at the first
26842  # space.
26843  complete="$OBJCOPY"
26844  path="${complete%% *}"
26845  tmp="$complete EOL"
26846  arguments="${tmp#* }"
26847
26848  # Input might be given as Windows format, start by converting to
26849  # unix format.
26850  new_path=`$CYGPATH -u "$path"`
26851
26852  # Now try to locate executable using which
26853  new_path=`$WHICH "$new_path" 2> /dev/null`
26854  # bat and cmd files are not always considered executable in cygwin causing which
26855  # to not find them
26856  if test "x$new_path" = x \
26857           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26858           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26859    new_path=`$CYGPATH -u "$path"`
26860  fi
26861  if test "x$new_path" = x; then
26862    # Oops. Which didn't find the executable.
26863    # The splitting of arguments from the executable at a space might have been incorrect,
26864    # since paths with space are more likely in Windows. Give it another try with the whole
26865    # argument.
26866    path="$complete"
26867    arguments="EOL"
26868    new_path=`$CYGPATH -u "$path"`
26869    new_path=`$WHICH "$new_path" 2> /dev/null`
26870    # bat and cmd files are not always considered executable in cygwin causing which
26871    # to not find them
26872    if test "x$new_path" = x \
26873             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26874             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26875      new_path=`$CYGPATH -u "$path"`
26876    fi
26877    if test "x$new_path" = x; then
26878      # It's still not found. Now this is an unrecoverable error.
26879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26880$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26881      has_space=`$ECHO "$complete" | $GREP " "`
26882      if test "x$has_space" != x; then
26883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26885      fi
26886      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26887    fi
26888  fi
26889
26890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26893  # "foo.exe" is OK but "foo" is an error.
26894  #
26895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26896  # It is also a way to make sure we got the proper file name for the real test later on.
26897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26898  if test "x$test_shortpath" = x; then
26899    # Short path failed, file does not exist as specified.
26900    # Try adding .exe or .cmd
26901    if test -f "${new_path}.exe"; then
26902       input_to_shortpath="${new_path}.exe"
26903    elif test -f "${new_path}.cmd"; then
26904       input_to_shortpath="${new_path}.cmd"
26905    else
26906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26907$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26910      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26911    fi
26912  else
26913    input_to_shortpath="$new_path"
26914  fi
26915
26916  # Call helper function which possibly converts this using DOS-style short mode.
26917  # If so, the updated path is stored in $new_path.
26918  new_path="$input_to_shortpath"
26919
26920  input_path="$input_to_shortpath"
26921  # Check if we need to convert this using DOS-style short mode. If the path
26922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26923  # take no chances and rewrite it.
26924  # Note: m4 eats our [], so we need to use [ and ] instead.
26925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26926  if test "x$has_forbidden_chars" != x; then
26927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26931      # Going to short mode and back again did indeed matter. Since short mode is
26932      # case insensitive, let's make it lowercase to improve readability.
26933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26934      # Now convert it back to Unix-stile (cygpath)
26935      input_path=`$CYGPATH -u "$shortmode_path"`
26936      new_path="$input_path"
26937    fi
26938  fi
26939
26940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26941  if test "x$test_cygdrive_prefix" = x; then
26942    # As a simple fix, exclude /usr/bin since it's not a real path.
26943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26945      # a path prefixed by /cygdrive for fixpath to work.
26946      new_path="$CYGWIN_ROOT_PATH$input_path"
26947    fi
26948  fi
26949
26950  # remove trailing .exe if any
26951  new_path="${new_path/%.exe/}"
26952
26953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26954
26955  # First separate the path from the arguments. This will split at the first
26956  # space.
26957  complete="$OBJCOPY"
26958  path="${complete%% *}"
26959  tmp="$complete EOL"
26960  arguments="${tmp#* }"
26961
26962  # Input might be given as Windows format, start by converting to
26963  # unix format.
26964  new_path="$path"
26965
26966  windows_path="$new_path"
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968    unix_path=`$CYGPATH -u "$windows_path"`
26969    new_path="$unix_path"
26970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26972    new_path="$unix_path"
26973  fi
26974
26975
26976  # Now try to locate executable using which
26977  new_path=`$WHICH "$new_path" 2> /dev/null`
26978
26979  if test "x$new_path" = x; then
26980    # Oops. Which didn't find the executable.
26981    # The splitting of arguments from the executable at a space might have been incorrect,
26982    # since paths with space are more likely in Windows. Give it another try with the whole
26983    # argument.
26984    path="$complete"
26985    arguments="EOL"
26986    new_path="$path"
26987
26988  windows_path="$new_path"
26989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26990    unix_path=`$CYGPATH -u "$windows_path"`
26991    new_path="$unix_path"
26992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26994    new_path="$unix_path"
26995  fi
26996
26997
26998    new_path=`$WHICH "$new_path" 2> /dev/null`
26999
27000    if test "x$new_path" = x; then
27001      # It's still not found. Now this is an unrecoverable error.
27002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27003$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27004      has_space=`$ECHO "$complete" | $GREP " "`
27005      if test "x$has_space" != x; then
27006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27008      fi
27009      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27010    fi
27011  fi
27012
27013  # Now new_path has a complete unix path to the binary
27014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27015    # Keep paths in /bin as-is, but remove trailing .exe if any
27016    new_path="${new_path/%.exe/}"
27017    # Do not save /bin paths to all_fixpath_prefixes!
27018  else
27019    # Not in mixed or Windows style, start by that.
27020    new_path=`cmd //c echo $new_path`
27021
27022  input_path="$new_path"
27023  # Check if we need to convert this using DOS-style short mode. If the path
27024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27025  # take no chances and rewrite it.
27026  # Note: m4 eats our [], so we need to use [ and ] instead.
27027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27028  if test "x$has_forbidden_chars" != x; then
27029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27031  fi
27032
27033    # Output is in $new_path
27034
27035  windows_path="$new_path"
27036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27037    unix_path=`$CYGPATH -u "$windows_path"`
27038    new_path="$unix_path"
27039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27041    new_path="$unix_path"
27042  fi
27043
27044    # remove trailing .exe if any
27045    new_path="${new_path/%.exe/}"
27046
27047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27049  fi
27050
27051  else
27052    # We're on a posix platform. Hooray! :)
27053    # First separate the path from the arguments. This will split at the first
27054    # space.
27055    complete="$OBJCOPY"
27056    path="${complete%% *}"
27057    tmp="$complete EOL"
27058    arguments="${tmp#* }"
27059
27060    # Cannot rely on the command "which" here since it doesn't always work.
27061    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27062    if test -z "$is_absolute_path"; then
27063      # Path to executable is not absolute. Find it.
27064      IFS_save="$IFS"
27065      IFS=:
27066      for p in $PATH; do
27067        if test -f "$p/$path" && test -x "$p/$path"; then
27068          new_path="$p/$path"
27069          break
27070        fi
27071      done
27072      IFS="$IFS_save"
27073    else
27074      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27075$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27076      new_path="$path"
27077    fi
27078
27079    if test "x$new_path" = x; then
27080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27081$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27082        has_space=`$ECHO "$complete" | $GREP " "`
27083        if test "x$has_space" != x; then
27084          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27086        fi
27087        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27088      fi
27089  fi
27090
27091      # Now join together the path and the arguments once again
27092      if test "x$arguments" != xEOL; then
27093        new_complete="$new_path ${arguments% *}"
27094      else
27095        new_complete="$new_path"
27096      fi
27097
27098  if test "x$complete" != "x$new_complete"; then
27099      OBJCOPY="$new_complete"
27100      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27101$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27102    fi
27103
27104    fi
27105fi
27106
27107if test -n "$ac_tool_prefix"; then
27108  for ac_prog in gobjdump objdump
27109  do
27110    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27111set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27113$as_echo_n "checking for $ac_word... " >&6; }
27114if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27115  $as_echo_n "(cached) " >&6
27116else
27117  if test -n "$OBJDUMP"; then
27118  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27119else
27120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27121for as_dir in $PATH
27122do
27123  IFS=$as_save_IFS
27124  test -z "$as_dir" && as_dir=.
27125    for ac_exec_ext in '' $ac_executable_extensions; do
27126  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27127    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27129    break 2
27130  fi
27131done
27132  done
27133IFS=$as_save_IFS
27134
27135fi
27136fi
27137OBJDUMP=$ac_cv_prog_OBJDUMP
27138if test -n "$OBJDUMP"; then
27139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27140$as_echo "$OBJDUMP" >&6; }
27141else
27142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27143$as_echo "no" >&6; }
27144fi
27145
27146
27147    test -n "$OBJDUMP" && break
27148  done
27149fi
27150if test -z "$OBJDUMP"; then
27151  ac_ct_OBJDUMP=$OBJDUMP
27152  for ac_prog in gobjdump objdump
27153do
27154  # Extract the first word of "$ac_prog", so it can be a program name with args.
27155set dummy $ac_prog; ac_word=$2
27156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27157$as_echo_n "checking for $ac_word... " >&6; }
27158if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27159  $as_echo_n "(cached) " >&6
27160else
27161  if test -n "$ac_ct_OBJDUMP"; then
27162  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27163else
27164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27165for as_dir in $PATH
27166do
27167  IFS=$as_save_IFS
27168  test -z "$as_dir" && as_dir=.
27169    for ac_exec_ext in '' $ac_executable_extensions; do
27170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27171    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27173    break 2
27174  fi
27175done
27176  done
27177IFS=$as_save_IFS
27178
27179fi
27180fi
27181ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27182if test -n "$ac_ct_OBJDUMP"; then
27183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27184$as_echo "$ac_ct_OBJDUMP" >&6; }
27185else
27186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27187$as_echo "no" >&6; }
27188fi
27189
27190
27191  test -n "$ac_ct_OBJDUMP" && break
27192done
27193
27194  if test "x$ac_ct_OBJDUMP" = x; then
27195    OBJDUMP=""
27196  else
27197    case $cross_compiling:$ac_tool_warned in
27198yes:)
27199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27201ac_tool_warned=yes ;;
27202esac
27203    OBJDUMP=$ac_ct_OBJDUMP
27204  fi
27205fi
27206
27207if test "x$OBJDUMP" != x; then
27208  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27209
27210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27211
27212  # First separate the path from the arguments. This will split at the first
27213  # space.
27214  complete="$OBJDUMP"
27215  path="${complete%% *}"
27216  tmp="$complete EOL"
27217  arguments="${tmp#* }"
27218
27219  # Input might be given as Windows format, start by converting to
27220  # unix format.
27221  new_path=`$CYGPATH -u "$path"`
27222
27223  # Now try to locate executable using which
27224  new_path=`$WHICH "$new_path" 2> /dev/null`
27225  # bat and cmd files are not always considered executable in cygwin causing which
27226  # to not find them
27227  if test "x$new_path" = x \
27228           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27229           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27230    new_path=`$CYGPATH -u "$path"`
27231  fi
27232  if test "x$new_path" = x; then
27233    # Oops. Which didn't find the executable.
27234    # The splitting of arguments from the executable at a space might have been incorrect,
27235    # since paths with space are more likely in Windows. Give it another try with the whole
27236    # argument.
27237    path="$complete"
27238    arguments="EOL"
27239    new_path=`$CYGPATH -u "$path"`
27240    new_path=`$WHICH "$new_path" 2> /dev/null`
27241    # bat and cmd files are not always considered executable in cygwin causing which
27242    # to not find them
27243    if test "x$new_path" = x \
27244             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27245             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27246      new_path=`$CYGPATH -u "$path"`
27247    fi
27248    if test "x$new_path" = x; then
27249      # It's still not found. Now this is an unrecoverable error.
27250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27251$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27252      has_space=`$ECHO "$complete" | $GREP " "`
27253      if test "x$has_space" != x; then
27254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27256      fi
27257      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27258    fi
27259  fi
27260
27261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27264  # "foo.exe" is OK but "foo" is an error.
27265  #
27266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27267  # It is also a way to make sure we got the proper file name for the real test later on.
27268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27269  if test "x$test_shortpath" = x; then
27270    # Short path failed, file does not exist as specified.
27271    # Try adding .exe or .cmd
27272    if test -f "${new_path}.exe"; then
27273       input_to_shortpath="${new_path}.exe"
27274    elif test -f "${new_path}.cmd"; then
27275       input_to_shortpath="${new_path}.cmd"
27276    else
27277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27278$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27281      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27282    fi
27283  else
27284    input_to_shortpath="$new_path"
27285  fi
27286
27287  # Call helper function which possibly converts this using DOS-style short mode.
27288  # If so, the updated path is stored in $new_path.
27289  new_path="$input_to_shortpath"
27290
27291  input_path="$input_to_shortpath"
27292  # Check if we need to convert this using DOS-style short mode. If the path
27293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27294  # take no chances and rewrite it.
27295  # Note: m4 eats our [], so we need to use [ and ] instead.
27296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27297  if test "x$has_forbidden_chars" != x; then
27298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27302      # Going to short mode and back again did indeed matter. Since short mode is
27303      # case insensitive, let's make it lowercase to improve readability.
27304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27305      # Now convert it back to Unix-stile (cygpath)
27306      input_path=`$CYGPATH -u "$shortmode_path"`
27307      new_path="$input_path"
27308    fi
27309  fi
27310
27311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27312  if test "x$test_cygdrive_prefix" = x; then
27313    # As a simple fix, exclude /usr/bin since it's not a real path.
27314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27316      # a path prefixed by /cygdrive for fixpath to work.
27317      new_path="$CYGWIN_ROOT_PATH$input_path"
27318    fi
27319  fi
27320
27321  # remove trailing .exe if any
27322  new_path="${new_path/%.exe/}"
27323
27324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27325
27326  # First separate the path from the arguments. This will split at the first
27327  # space.
27328  complete="$OBJDUMP"
27329  path="${complete%% *}"
27330  tmp="$complete EOL"
27331  arguments="${tmp#* }"
27332
27333  # Input might be given as Windows format, start by converting to
27334  # unix format.
27335  new_path="$path"
27336
27337  windows_path="$new_path"
27338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27339    unix_path=`$CYGPATH -u "$windows_path"`
27340    new_path="$unix_path"
27341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27343    new_path="$unix_path"
27344  fi
27345
27346
27347  # Now try to locate executable using which
27348  new_path=`$WHICH "$new_path" 2> /dev/null`
27349
27350  if test "x$new_path" = x; then
27351    # Oops. Which didn't find the executable.
27352    # The splitting of arguments from the executable at a space might have been incorrect,
27353    # since paths with space are more likely in Windows. Give it another try with the whole
27354    # argument.
27355    path="$complete"
27356    arguments="EOL"
27357    new_path="$path"
27358
27359  windows_path="$new_path"
27360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27361    unix_path=`$CYGPATH -u "$windows_path"`
27362    new_path="$unix_path"
27363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27365    new_path="$unix_path"
27366  fi
27367
27368
27369    new_path=`$WHICH "$new_path" 2> /dev/null`
27370
27371    if test "x$new_path" = x; then
27372      # It's still not found. Now this is an unrecoverable error.
27373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27374$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27375      has_space=`$ECHO "$complete" | $GREP " "`
27376      if test "x$has_space" != x; then
27377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27379      fi
27380      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27381    fi
27382  fi
27383
27384  # Now new_path has a complete unix path to the binary
27385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27386    # Keep paths in /bin as-is, but remove trailing .exe if any
27387    new_path="${new_path/%.exe/}"
27388    # Do not save /bin paths to all_fixpath_prefixes!
27389  else
27390    # Not in mixed or Windows style, start by that.
27391    new_path=`cmd //c echo $new_path`
27392
27393  input_path="$new_path"
27394  # Check if we need to convert this using DOS-style short mode. If the path
27395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27396  # take no chances and rewrite it.
27397  # Note: m4 eats our [], so we need to use [ and ] instead.
27398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27399  if test "x$has_forbidden_chars" != x; then
27400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27402  fi
27403
27404    # Output is in $new_path
27405
27406  windows_path="$new_path"
27407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27408    unix_path=`$CYGPATH -u "$windows_path"`
27409    new_path="$unix_path"
27410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27412    new_path="$unix_path"
27413  fi
27414
27415    # remove trailing .exe if any
27416    new_path="${new_path/%.exe/}"
27417
27418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27420  fi
27421
27422  else
27423    # We're on a posix platform. Hooray! :)
27424    # First separate the path from the arguments. This will split at the first
27425    # space.
27426    complete="$OBJDUMP"
27427    path="${complete%% *}"
27428    tmp="$complete EOL"
27429    arguments="${tmp#* }"
27430
27431    # Cannot rely on the command "which" here since it doesn't always work.
27432    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27433    if test -z "$is_absolute_path"; then
27434      # Path to executable is not absolute. Find it.
27435      IFS_save="$IFS"
27436      IFS=:
27437      for p in $PATH; do
27438        if test -f "$p/$path" && test -x "$p/$path"; then
27439          new_path="$p/$path"
27440          break
27441        fi
27442      done
27443      IFS="$IFS_save"
27444    else
27445      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27446$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27447      new_path="$path"
27448    fi
27449
27450    if test "x$new_path" = x; then
27451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27452$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27453        has_space=`$ECHO "$complete" | $GREP " "`
27454        if test "x$has_space" != x; then
27455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27457        fi
27458        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27459      fi
27460  fi
27461
27462      # Now join together the path and the arguments once again
27463      if test "x$arguments" != xEOL; then
27464        new_complete="$new_path ${arguments% *}"
27465      else
27466        new_complete="$new_path"
27467      fi
27468
27469  if test "x$complete" != "x$new_complete"; then
27470      OBJDUMP="$new_complete"
27471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27472$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27473    fi
27474
27475fi
27476
27477if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27478   # Extract the first word of "lipo", so it can be a program name with args.
27479set dummy lipo; ac_word=$2
27480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27481$as_echo_n "checking for $ac_word... " >&6; }
27482if test "${ac_cv_path_LIPO+set}" = set; then :
27483  $as_echo_n "(cached) " >&6
27484else
27485  case $LIPO in
27486  [\\/]* | ?:[\\/]*)
27487  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27488  ;;
27489  *)
27490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27491for as_dir in $PATH
27492do
27493  IFS=$as_save_IFS
27494  test -z "$as_dir" && as_dir=.
27495    for ac_exec_ext in '' $ac_executable_extensions; do
27496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27497    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27499    break 2
27500  fi
27501done
27502  done
27503IFS=$as_save_IFS
27504
27505  ;;
27506esac
27507fi
27508LIPO=$ac_cv_path_LIPO
27509if test -n "$LIPO"; then
27510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27511$as_echo "$LIPO" >&6; }
27512else
27513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27514$as_echo "no" >&6; }
27515fi
27516
27517
27518
27519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27520
27521  # First separate the path from the arguments. This will split at the first
27522  # space.
27523  complete="$LIPO"
27524  path="${complete%% *}"
27525  tmp="$complete EOL"
27526  arguments="${tmp#* }"
27527
27528  # Input might be given as Windows format, start by converting to
27529  # unix format.
27530  new_path=`$CYGPATH -u "$path"`
27531
27532  # Now try to locate executable using which
27533  new_path=`$WHICH "$new_path" 2> /dev/null`
27534  # bat and cmd files are not always considered executable in cygwin causing which
27535  # to not find them
27536  if test "x$new_path" = x \
27537           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27538           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27539    new_path=`$CYGPATH -u "$path"`
27540  fi
27541  if test "x$new_path" = x; then
27542    # Oops. Which didn't find the executable.
27543    # The splitting of arguments from the executable at a space might have been incorrect,
27544    # since paths with space are more likely in Windows. Give it another try with the whole
27545    # argument.
27546    path="$complete"
27547    arguments="EOL"
27548    new_path=`$CYGPATH -u "$path"`
27549    new_path=`$WHICH "$new_path" 2> /dev/null`
27550    # bat and cmd files are not always considered executable in cygwin causing which
27551    # to not find them
27552    if test "x$new_path" = x \
27553             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27554             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27555      new_path=`$CYGPATH -u "$path"`
27556    fi
27557    if test "x$new_path" = x; then
27558      # It's still not found. Now this is an unrecoverable error.
27559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27560$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27561      has_space=`$ECHO "$complete" | $GREP " "`
27562      if test "x$has_space" != x; then
27563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27565      fi
27566      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27567    fi
27568  fi
27569
27570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27573  # "foo.exe" is OK but "foo" is an error.
27574  #
27575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27576  # It is also a way to make sure we got the proper file name for the real test later on.
27577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27578  if test "x$test_shortpath" = x; then
27579    # Short path failed, file does not exist as specified.
27580    # Try adding .exe or .cmd
27581    if test -f "${new_path}.exe"; then
27582       input_to_shortpath="${new_path}.exe"
27583    elif test -f "${new_path}.cmd"; then
27584       input_to_shortpath="${new_path}.cmd"
27585    else
27586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27587$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27590      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27591    fi
27592  else
27593    input_to_shortpath="$new_path"
27594  fi
27595
27596  # Call helper function which possibly converts this using DOS-style short mode.
27597  # If so, the updated path is stored in $new_path.
27598  new_path="$input_to_shortpath"
27599
27600  input_path="$input_to_shortpath"
27601  # Check if we need to convert this using DOS-style short mode. If the path
27602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27603  # take no chances and rewrite it.
27604  # Note: m4 eats our [], so we need to use [ and ] instead.
27605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27606  if test "x$has_forbidden_chars" != x; then
27607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27611      # Going to short mode and back again did indeed matter. Since short mode is
27612      # case insensitive, let's make it lowercase to improve readability.
27613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27614      # Now convert it back to Unix-stile (cygpath)
27615      input_path=`$CYGPATH -u "$shortmode_path"`
27616      new_path="$input_path"
27617    fi
27618  fi
27619
27620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27621  if test "x$test_cygdrive_prefix" = x; then
27622    # As a simple fix, exclude /usr/bin since it's not a real path.
27623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27625      # a path prefixed by /cygdrive for fixpath to work.
27626      new_path="$CYGWIN_ROOT_PATH$input_path"
27627    fi
27628  fi
27629
27630  # remove trailing .exe if any
27631  new_path="${new_path/%.exe/}"
27632
27633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27634
27635  # First separate the path from the arguments. This will split at the first
27636  # space.
27637  complete="$LIPO"
27638  path="${complete%% *}"
27639  tmp="$complete EOL"
27640  arguments="${tmp#* }"
27641
27642  # Input might be given as Windows format, start by converting to
27643  # unix format.
27644  new_path="$path"
27645
27646  windows_path="$new_path"
27647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27648    unix_path=`$CYGPATH -u "$windows_path"`
27649    new_path="$unix_path"
27650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27652    new_path="$unix_path"
27653  fi
27654
27655
27656  # Now try to locate executable using which
27657  new_path=`$WHICH "$new_path" 2> /dev/null`
27658
27659  if test "x$new_path" = x; then
27660    # Oops. Which didn't find the executable.
27661    # The splitting of arguments from the executable at a space might have been incorrect,
27662    # since paths with space are more likely in Windows. Give it another try with the whole
27663    # argument.
27664    path="$complete"
27665    arguments="EOL"
27666    new_path="$path"
27667
27668  windows_path="$new_path"
27669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27670    unix_path=`$CYGPATH -u "$windows_path"`
27671    new_path="$unix_path"
27672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27674    new_path="$unix_path"
27675  fi
27676
27677
27678    new_path=`$WHICH "$new_path" 2> /dev/null`
27679
27680    if test "x$new_path" = x; then
27681      # It's still not found. Now this is an unrecoverable error.
27682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27683$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27684      has_space=`$ECHO "$complete" | $GREP " "`
27685      if test "x$has_space" != x; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27688      fi
27689      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27690    fi
27691  fi
27692
27693  # Now new_path has a complete unix path to the binary
27694  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27695    # Keep paths in /bin as-is, but remove trailing .exe if any
27696    new_path="${new_path/%.exe/}"
27697    # Do not save /bin paths to all_fixpath_prefixes!
27698  else
27699    # Not in mixed or Windows style, start by that.
27700    new_path=`cmd //c echo $new_path`
27701
27702  input_path="$new_path"
27703  # Check if we need to convert this using DOS-style short mode. If the path
27704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27705  # take no chances and rewrite it.
27706  # Note: m4 eats our [], so we need to use [ and ] instead.
27707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27708  if test "x$has_forbidden_chars" != x; then
27709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27711  fi
27712
27713    # Output is in $new_path
27714
27715  windows_path="$new_path"
27716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717    unix_path=`$CYGPATH -u "$windows_path"`
27718    new_path="$unix_path"
27719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27721    new_path="$unix_path"
27722  fi
27723
27724    # remove trailing .exe if any
27725    new_path="${new_path/%.exe/}"
27726
27727    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27728    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27729  fi
27730
27731  else
27732    # We're on a posix platform. Hooray! :)
27733    # First separate the path from the arguments. This will split at the first
27734    # space.
27735    complete="$LIPO"
27736    path="${complete%% *}"
27737    tmp="$complete EOL"
27738    arguments="${tmp#* }"
27739
27740    # Cannot rely on the command "which" here since it doesn't always work.
27741    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27742    if test -z "$is_absolute_path"; then
27743      # Path to executable is not absolute. Find it.
27744      IFS_save="$IFS"
27745      IFS=:
27746      for p in $PATH; do
27747        if test -f "$p/$path" && test -x "$p/$path"; then
27748          new_path="$p/$path"
27749          break
27750        fi
27751      done
27752      IFS="$IFS_save"
27753    else
27754      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27755$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27756      new_path="$path"
27757    fi
27758
27759    if test "x$new_path" = x; then
27760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27761$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27762        has_space=`$ECHO "$complete" | $GREP " "`
27763        if test "x$has_space" != x; then
27764          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27766        fi
27767        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27768      fi
27769  fi
27770
27771      # Now join together the path and the arguments once again
27772      if test "x$arguments" != xEOL; then
27773        new_complete="$new_path ${arguments% *}"
27774      else
27775        new_complete="$new_path"
27776      fi
27777
27778  if test "x$complete" != "x$new_complete"; then
27779      LIPO="$new_complete"
27780      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27781$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27782    fi
27783
27784fi
27785
27786# Restore old path without tools dir
27787PATH="$OLD_PATH"
27788
27789
27790# FIXME: Currently we must test this after paths but before flags. Fix!
27791
27792# And we can test some aspects on the target using configure macros.
27793
27794
27795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27796$as_echo_n "checking for ANSI C header files... " >&6; }
27797if test "${ac_cv_header_stdc+set}" = set; then :
27798  $as_echo_n "(cached) " >&6
27799else
27800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27801/* end confdefs.h.  */
27802#include <stdlib.h>
27803#include <stdarg.h>
27804#include <string.h>
27805#include <float.h>
27806
27807int
27808main ()
27809{
27810
27811  ;
27812  return 0;
27813}
27814_ACEOF
27815if ac_fn_cxx_try_compile "$LINENO"; then :
27816  ac_cv_header_stdc=yes
27817else
27818  ac_cv_header_stdc=no
27819fi
27820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27821
27822if test $ac_cv_header_stdc = yes; then
27823  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27825/* end confdefs.h.  */
27826#include <string.h>
27827
27828_ACEOF
27829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27830  $EGREP "memchr" >/dev/null 2>&1; then :
27831
27832else
27833  ac_cv_header_stdc=no
27834fi
27835rm -f conftest*
27836
27837fi
27838
27839if test $ac_cv_header_stdc = yes; then
27840  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27842/* end confdefs.h.  */
27843#include <stdlib.h>
27844
27845_ACEOF
27846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27847  $EGREP "free" >/dev/null 2>&1; then :
27848
27849else
27850  ac_cv_header_stdc=no
27851fi
27852rm -f conftest*
27853
27854fi
27855
27856if test $ac_cv_header_stdc = yes; then
27857  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27858  if test "$cross_compiling" = yes; then :
27859  :
27860else
27861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27862/* end confdefs.h.  */
27863#include <ctype.h>
27864#include <stdlib.h>
27865#if ((' ' & 0x0FF) == 0x020)
27866# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27867# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27868#else
27869# define ISLOWER(c) \
27870		   (('a' <= (c) && (c) <= 'i') \
27871		     || ('j' <= (c) && (c) <= 'r') \
27872		     || ('s' <= (c) && (c) <= 'z'))
27873# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27874#endif
27875
27876#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27877int
27878main ()
27879{
27880  int i;
27881  for (i = 0; i < 256; i++)
27882    if (XOR (islower (i), ISLOWER (i))
27883	|| toupper (i) != TOUPPER (i))
27884      return 2;
27885  return 0;
27886}
27887_ACEOF
27888if ac_fn_cxx_try_run "$LINENO"; then :
27889
27890else
27891  ac_cv_header_stdc=no
27892fi
27893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27894  conftest.$ac_objext conftest.beam conftest.$ac_ext
27895fi
27896
27897fi
27898fi
27899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27900$as_echo "$ac_cv_header_stdc" >&6; }
27901if test $ac_cv_header_stdc = yes; then
27902
27903$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27904
27905fi
27906
27907# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27908for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27909		  inttypes.h stdint.h unistd.h
27910do :
27911  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27912ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27913"
27914if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27915  cat >>confdefs.h <<_ACEOF
27916#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27917_ACEOF
27918
27919fi
27920
27921done
27922
27923
27924
27925###############################################################################
27926#
27927# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27928# (The JVM can use 32 or 64 bit Java pointers but that decision
27929# is made at runtime.)
27930#
27931if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27932  # Always specify -m flags on Solaris
27933
27934  # keep track of c/cxx flags that we added outselves...
27935  #   to prevent emitting warning...
27936  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27937  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27938  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27939
27940  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27941  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27942  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27943
27944  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27945  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27946  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27947
27948elif test "x$COMPILE_TYPE" = xreduced; then
27949  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27950    # Specify -m if running reduced on other Posix platforms
27951
27952  # keep track of c/cxx flags that we added outselves...
27953  #   to prevent emitting warning...
27954  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27955  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27956  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27957
27958  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27959  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27960  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27961
27962  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27963  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27964  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27965
27966  fi
27967fi
27968
27969# Make compilation sanity check
27970for ac_header in stdio.h
27971do :
27972  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27973if test "x$ac_cv_header_stdio_h" = x""yes; then :
27974  cat >>confdefs.h <<_ACEOF
27975#define HAVE_STDIO_H 1
27976_ACEOF
27977
27978else
27979
27980  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27981$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27982  if test "x$COMPILE_TYPE" = xreduced; then
27983    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27984$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27985  elif test "x$COMPILE_TYPE" = xcross; then
27986    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27987$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27988  fi
27989  as_fn_error $? "Cannot continue." "$LINENO" 5
27990
27991fi
27992
27993done
27994
27995
27996# The cast to long int works around a bug in the HP C Compiler
27997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27999# This bug is HP SR number 8606223364.
28000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28001$as_echo_n "checking size of int *... " >&6; }
28002if test "${ac_cv_sizeof_int_p+set}" = set; then :
28003  $as_echo_n "(cached) " >&6
28004else
28005  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28006
28007else
28008  if test "$ac_cv_type_int_p" = yes; then
28009     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28011as_fn_error 77 "cannot compute sizeof (int *)
28012See \`config.log' for more details" "$LINENO" 5; }
28013   else
28014     ac_cv_sizeof_int_p=0
28015   fi
28016fi
28017
28018fi
28019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28020$as_echo "$ac_cv_sizeof_int_p" >&6; }
28021
28022
28023
28024cat >>confdefs.h <<_ACEOF
28025#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28026_ACEOF
28027
28028
28029
28030if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28031  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28032  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28033fi
28034
28035if test "x$SIZEOF_INT_P" = x; then
28036    # The test failed, lets stick to the assumed value.
28037    { $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
28038$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28039else
28040    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28041
28042    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28043        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
28044    fi
28045fi
28046
28047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28048$as_echo_n "checking for target address size... " >&6; }
28049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28050$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28051
28052
28053###############################################################################
28054#
28055# Is the target little of big endian?
28056#
28057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28058$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28059if test "${ac_cv_c_bigendian+set}" = set; then :
28060  $as_echo_n "(cached) " >&6
28061else
28062  ac_cv_c_bigendian=unknown
28063    # See if we're dealing with a universal compiler.
28064    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28065/* end confdefs.h.  */
28066#ifndef __APPLE_CC__
28067	       not a universal capable compiler
28068	     #endif
28069	     typedef int dummy;
28070
28071_ACEOF
28072if ac_fn_cxx_try_compile "$LINENO"; then :
28073
28074	# Check for potential -arch flags.  It is not universal unless
28075	# there are at least two -arch flags with different values.
28076	ac_arch=
28077	ac_prev=
28078	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28079	 if test -n "$ac_prev"; then
28080	   case $ac_word in
28081	     i?86 | x86_64 | ppc | ppc64)
28082	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28083		 ac_arch=$ac_word
28084	       else
28085		 ac_cv_c_bigendian=universal
28086		 break
28087	       fi
28088	       ;;
28089	   esac
28090	   ac_prev=
28091	 elif test "x$ac_word" = "x-arch"; then
28092	   ac_prev=arch
28093	 fi
28094       done
28095fi
28096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28097    if test $ac_cv_c_bigendian = unknown; then
28098      # See if sys/param.h defines the BYTE_ORDER macro.
28099      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28100/* end confdefs.h.  */
28101#include <sys/types.h>
28102	     #include <sys/param.h>
28103
28104int
28105main ()
28106{
28107#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28108		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28109		     && LITTLE_ENDIAN)
28110	      bogus endian macros
28111	     #endif
28112
28113  ;
28114  return 0;
28115}
28116_ACEOF
28117if ac_fn_cxx_try_compile "$LINENO"; then :
28118  # It does; now see whether it defined to BIG_ENDIAN or not.
28119	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28120/* end confdefs.h.  */
28121#include <sys/types.h>
28122		#include <sys/param.h>
28123
28124int
28125main ()
28126{
28127#if BYTE_ORDER != BIG_ENDIAN
28128		 not big endian
28129		#endif
28130
28131  ;
28132  return 0;
28133}
28134_ACEOF
28135if ac_fn_cxx_try_compile "$LINENO"; then :
28136  ac_cv_c_bigendian=yes
28137else
28138  ac_cv_c_bigendian=no
28139fi
28140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28141fi
28142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28143    fi
28144    if test $ac_cv_c_bigendian = unknown; then
28145      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28146      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28147/* end confdefs.h.  */
28148#include <limits.h>
28149
28150int
28151main ()
28152{
28153#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28154	      bogus endian macros
28155	     #endif
28156
28157  ;
28158  return 0;
28159}
28160_ACEOF
28161if ac_fn_cxx_try_compile "$LINENO"; then :
28162  # It does; now see whether it defined to _BIG_ENDIAN or not.
28163	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28164/* end confdefs.h.  */
28165#include <limits.h>
28166
28167int
28168main ()
28169{
28170#ifndef _BIG_ENDIAN
28171		 not big endian
28172		#endif
28173
28174  ;
28175  return 0;
28176}
28177_ACEOF
28178if ac_fn_cxx_try_compile "$LINENO"; then :
28179  ac_cv_c_bigendian=yes
28180else
28181  ac_cv_c_bigendian=no
28182fi
28183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28184fi
28185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28186    fi
28187    if test $ac_cv_c_bigendian = unknown; then
28188      # Compile a test program.
28189      if test "$cross_compiling" = yes; then :
28190  # Try to guess by grepping values from an object file.
28191	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28192/* end confdefs.h.  */
28193short int ascii_mm[] =
28194		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28195		short int ascii_ii[] =
28196		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28197		int use_ascii (int i) {
28198		  return ascii_mm[i] + ascii_ii[i];
28199		}
28200		short int ebcdic_ii[] =
28201		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28202		short int ebcdic_mm[] =
28203		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28204		int use_ebcdic (int i) {
28205		  return ebcdic_mm[i] + ebcdic_ii[i];
28206		}
28207		extern int foo;
28208
28209int
28210main ()
28211{
28212return use_ascii (foo) == use_ebcdic (foo);
28213  ;
28214  return 0;
28215}
28216_ACEOF
28217if ac_fn_cxx_try_compile "$LINENO"; then :
28218  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28219	      ac_cv_c_bigendian=yes
28220	    fi
28221	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28222	      if test "$ac_cv_c_bigendian" = unknown; then
28223		ac_cv_c_bigendian=no
28224	      else
28225		# finding both strings is unlikely to happen, but who knows?
28226		ac_cv_c_bigendian=unknown
28227	      fi
28228	    fi
28229fi
28230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28231else
28232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28233/* end confdefs.h.  */
28234$ac_includes_default
28235int
28236main ()
28237{
28238
28239	     /* Are we little or big endian?  From Harbison&Steele.  */
28240	     union
28241	     {
28242	       long int l;
28243	       char c[sizeof (long int)];
28244	     } u;
28245	     u.l = 1;
28246	     return u.c[sizeof (long int) - 1] == 1;
28247
28248  ;
28249  return 0;
28250}
28251_ACEOF
28252if ac_fn_cxx_try_run "$LINENO"; then :
28253  ac_cv_c_bigendian=no
28254else
28255  ac_cv_c_bigendian=yes
28256fi
28257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28258  conftest.$ac_objext conftest.beam conftest.$ac_ext
28259fi
28260
28261    fi
28262fi
28263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28264$as_echo "$ac_cv_c_bigendian" >&6; }
28265 case $ac_cv_c_bigendian in #(
28266   yes)
28267     ENDIAN="big";; #(
28268   no)
28269     ENDIAN="little" ;; #(
28270   universal)
28271     ENDIAN="universal_endianness"
28272     ;; #(
28273   *)
28274     ENDIAN="unknown" ;;
28275 esac
28276
28277
28278if test "x$ENDIAN" = xuniversal_endianness; then
28279    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28280fi
28281if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28282    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
28283fi
28284
28285
28286# Configure flags for the tools
28287
28288
28289###############################################################################
28290#
28291# How to compile shared libraries.
28292#
28293
28294if test "x$GCC" = xyes; then
28295    COMPILER_NAME=gcc
28296    PICFLAG="-fPIC"
28297    LIBRARY_PREFIX=lib
28298    SHARED_LIBRARY='lib$1.so'
28299    STATIC_LIBRARY='lib$1.a'
28300    SHARED_LIBRARY_FLAGS="-shared"
28301    SHARED_LIBRARY_SUFFIX='.so'
28302    STATIC_LIBRARY_SUFFIX='.a'
28303    OBJ_SUFFIX='.o'
28304    EXE_SUFFIX=''
28305    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28306    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28307    C_FLAG_REORDER=''
28308    CXX_FLAG_REORDER=''
28309    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28310    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28311    LD="$CC"
28312    LDEXE="$CC"
28313    LDCXX="$CXX"
28314    LDEXECXX="$CXX"
28315    POST_STRIP_CMD="$STRIP -g"
28316
28317    # Linking is different on MacOSX
28318    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28319        # Might change in the future to clang.
28320        COMPILER_NAME=gcc
28321        SHARED_LIBRARY='lib$1.dylib'
28322        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28323        SHARED_LIBRARY_SUFFIX='.dylib'
28324        EXE_SUFFIX=''
28325        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28326        SET_SHARED_LIBRARY_MAPFILE=''
28327        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28328        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28329        POST_STRIP_CMD="$STRIP -S"
28330    fi
28331else
28332    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28333        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28334        COMPILER_NAME=ossc
28335        PICFLAG="-KPIC"
28336        LIBRARY_PREFIX=lib
28337        SHARED_LIBRARY='lib$1.so'
28338        STATIC_LIBRARY='lib$1.a'
28339        SHARED_LIBRARY_FLAGS="-G"
28340        SHARED_LIBRARY_SUFFIX='.so'
28341        STATIC_LIBRARY_SUFFIX='.a'
28342        OBJ_SUFFIX='.o'
28343        EXE_SUFFIX=''
28344        SET_SHARED_LIBRARY_NAME=''
28345        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28346	C_FLAG_REORDER='-xF'
28347	CXX_FLAG_REORDER='-xF'
28348        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28349        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28350        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28351        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28352        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28353        POST_STRIP_CMD="$STRIP -x"
28354        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28355    fi
28356    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28357        # If it is not gcc, then assume it is the MS Visual Studio compiler
28358        COMPILER_NAME=cl
28359        PICFLAG=""
28360        LIBRARY_PREFIX=
28361        SHARED_LIBRARY='$1.dll'
28362        STATIC_LIBRARY='$1.lib'
28363        SHARED_LIBRARY_FLAGS="-LD"
28364        SHARED_LIBRARY_SUFFIX='.dll'
28365        STATIC_LIBRARY_SUFFIX='.lib'
28366        OBJ_SUFFIX='.obj'
28367        EXE_SUFFIX='.exe'
28368        SET_SHARED_LIBRARY_NAME=''
28369        SET_SHARED_LIBRARY_MAPFILE=''
28370        SET_SHARED_LIBRARY_ORIGIN=''
28371        SET_EXECUTABLE_ORIGIN=''
28372    fi
28373fi
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392# The (cross) compiler is now configured, we can now test capabilities
28393# of the target platform.
28394
28395
28396
28397###############################################################################
28398#
28399# Setup the opt flags for different compilers
28400# and different operating systems.
28401#
28402
28403#
28404# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28405#
28406if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28407    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28408    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28409    CFLAGS="$CFLAGS -mstackrealign"
28410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28411$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28412    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28413/* end confdefs.h.  */
28414int main() { return 0; }
28415_ACEOF
28416if ac_fn_cxx_try_link "$LINENO"; then :
28417
28418		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28419$as_echo "yes" >&6; }
28420
28421else
28422
28423		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28424$as_echo "no" >&6; }
28425	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28426
28427fi
28428rm -f core conftest.err conftest.$ac_objext \
28429    conftest$ac_exeext conftest.$ac_ext
28430fi
28431
28432C_FLAG_DEPS="-MMD -MF"
28433CXX_FLAG_DEPS="-MMD -MF"
28434
28435case $COMPILER_TYPE in
28436  CC )
28437    D_FLAG="-g"
28438    case $COMPILER_NAME in
28439      gcc )
28440      	case $OPENJDK_TARGET_OS in
28441	  macosx )
28442	    # On MacOSX we optimize for size, something
28443	    # we should do for all platforms?
28444	    C_O_FLAG_HI="-Os"
28445	    C_O_FLAG_NORM="-Os"
28446	    C_O_FLAG_NONE=""
28447	    ;;
28448	  *)
28449	    C_O_FLAG_HI="-O3"
28450	    C_O_FLAG_NORM="-O2"
28451	    C_O_FLAG_NONE="-O0"
28452	    CFLAGS_DEBUG_SYMBOLS="-g"
28453	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28454	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28455	       CFLAGS_DEBUG_SYMBOLS="-g1"
28456	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28457	    fi
28458	    ;;
28459	esac
28460        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28461        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28462        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28463        ;;
28464      ossc )
28465        #
28466        # Forte has different names for this with their C++ compiler...
28467        #
28468        C_FLAG_DEPS="-xMMD -xMF"
28469        CXX_FLAG_DEPS="-xMMD -xMF"
28470
28471        # Extra options used with HIGHEST
28472        #
28473        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28474        #          done with care, there are some assumptions below that need to
28475        #          be understood about the use of pointers, and IEEE behavior.
28476        #
28477        # Use non-standard floating point mode (not IEEE 754)
28478        CC_HIGHEST="$CC_HIGHEST -fns"
28479        # Do some simplification of floating point arithmetic (not IEEE 754)
28480        CC_HIGHEST="$CC_HIGHEST -fsimple"
28481        # Use single precision floating point with 'float'
28482        CC_HIGHEST="$CC_HIGHEST -fsingle"
28483        # Assume memory references via basic pointer types do not alias
28484        #   (Source with excessing pointer casting and data access with mixed
28485        #    pointer types are not recommended)
28486        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28487        # Use intrinsic or inline versions for math/std functions
28488        #   (If you expect perfect errno behavior, do not use this)
28489        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28490        # Loop data dependency optimizations (need -xO3 or higher)
28491        CC_HIGHEST="$CC_HIGHEST -xdepend"
28492        # Pointer parameters to functions do not overlap
28493        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28494        #    If you pass in multiple pointers to the same data, do not use this)
28495        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28496        # Inline some library routines
28497        #   (If you expect perfect errno behavior, do not use this)
28498        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28499        # Use optimized math routines
28500        #   (If you expect perfect errno behavior, do not use this)
28501        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28502        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28503
28504        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28505          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28506          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28507        fi
28508
28509        case $OPENJDK_TARGET_CPU_ARCH in
28510          x86)
28511            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28512            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28513            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28514            C_O_FLAG_NONE="-xregs=no%frameptr"
28515            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28516            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28517            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28518            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28519            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28520               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28521               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28522            fi
28523            ;;
28524          sparc)
28525            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28526            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28527            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28528            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28529            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28530            C_O_FLAG_NONE=""
28531            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28532            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28533            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28534            CXX_O_FLAG_NONE=""
28535            ;;
28536        esac
28537
28538    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28539    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28540    esac
28541    ;;
28542  CL )
28543    D_FLAG=
28544    C_O_FLAG_HIGHEST="-O2"
28545    C_O_FLAG_HI="-O1"
28546    C_O_FLAG_NORM="-O1"
28547    C_O_FLAG_NONE="-Od"
28548    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28549    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28550    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28551    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28552    ;;
28553esac
28554
28555if test -z "$C_O_FLAG_HIGHEST"; then
28556   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28557fi
28558
28559if test -z "$CXX_O_FLAG_HIGHEST"; then
28560   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28561fi
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28577   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28578$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28579fi
28580
28581if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28582   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28583$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28584fi
28585
28586if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28587   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28588$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28589fi
28590
28591
28592# Check whether --with-extra-cflags was given.
28593if test "${with_extra_cflags+set}" = set; then :
28594  withval=$with_extra_cflags;
28595fi
28596
28597
28598
28599# Check whether --with-extra-cxxflags was given.
28600if test "${with_extra_cxxflags+set}" = set; then :
28601  withval=$with_extra_cxxflags;
28602fi
28603
28604
28605
28606# Check whether --with-extra-ldflags was given.
28607if test "${with_extra_ldflags+set}" = set; then :
28608  withval=$with_extra_ldflags;
28609fi
28610
28611
28612CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28613CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28614LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28615
28616# Hotspot needs these set in their legacy form
28617LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28618LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28619LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28620
28621
28622
28623
28624
28625###############################################################################
28626#
28627# Now setup the CFLAGS and LDFLAGS for the JDK build.
28628# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28629#
28630case $COMPILER_NAME in
28631      gcc )
28632      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28633                          -pipe \
28634                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28635	  case $OPENJDK_TARGET_CPU_ARCH in
28636	  arm )
28637            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28638	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28639	  ;;
28640	  ppc )
28641            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28642	  ;;
28643	  * )
28644	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28645	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28646          ;;
28647	  esac
28648          ;;
28649      ossc )
28650          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28651          case $OPENJDK_TARGET_CPU_ARCH in
28652          x86 )
28653            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28654       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28655          ;;
28656          esac
28657
28658      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28659      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28660
28661          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28662          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28663          ;;
28664      cl )
28665          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28666               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28667	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28668	       -DWIN32 -DIAL"
28669          case $OPENJDK_TARGET_CPU in
28670              x86 )
28671                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28672                  ;;
28673              x86_64 )
28674                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28675                  ;;
28676          esac
28677          ;;
28678esac
28679
28680###############################################################################
28681
28682CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28683
28684# The package path is used only on macosx?
28685PACKAGE_PATH=/opt/local
28686
28687
28688if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28689    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28690    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28691    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28692    #   Note: -Dmacro         is the same as    #define macro 1
28693    #         -Dmacro=	    is the same as    #define macro
28694    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28695        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28696    else
28697        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28698    fi
28699else
28700    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28701fi
28702if test "x$OPENJDK_TARGET_OS" = xlinux; then
28703    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28704fi
28705if test "x$OPENJDK_TARGET_OS" = xwindows; then
28706    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28707fi
28708if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28709    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28710fi
28711if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28712    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28713    # Setting these parameters makes it an error to link to macosx APIs that are
28714    # newer than the given OS version and makes the linked binaries compatible even
28715    # if built on a newer version of the OS.
28716    # The expected format is X.Y.Z
28717    MACOSX_VERSION_MIN=10.7.0
28718
28719    # The macro takes the version with no dots, ex: 1070
28720    # Let the flags variables get resolved in make for easier override on make
28721    # command line.
28722    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28723    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28724fi
28725if test "x$OPENJDK_TARGET_OS" = xbsd; then
28726    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28727fi
28728if test "x$DEBUG_LEVEL" = xrelease; then
28729    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28730    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28731        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28732    fi
28733else
28734    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28735fi
28736
28737CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28738CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28739
28740CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28741        -I${JDK_OUTPUTDIR}/include \
28742        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28743        -I${JDK_TOPDIR}/src/share/javavm/export \
28744        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28745        -I${JDK_TOPDIR}/src/share/native/common \
28746        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28747
28748# The shared libraries are compiled using the picflag.
28749CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28750CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28751
28752# Executable flags
28753CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28754CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28755
28756# Now this is odd. The JDK native libraries have to link against libjvm.so
28757# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28758# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28759# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28760# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28761# libraries will link to whatever is in memory. Yuck.
28762#
28763# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28764if test "x$COMPILER_NAME" = xcl; then
28765    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28766    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28767        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28768    fi
28769    # TODO: make -debug optional "--disable-full-debug-symbols"
28770    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28771    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28772    LDFLAGS_JDKLIB_SUFFIX=""
28773    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28774        LDFLAGS_STACK_SIZE=1048576
28775    else
28776        LDFLAGS_STACK_SIZE=327680
28777    fi
28778    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28779else
28780    if test "x$COMPILER_NAME" = xgcc; then
28781        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28782        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28783        if test -n "$HAS_GNU_HASH"; then
28784            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28785        fi
28786        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28787          # And since we now know that the linker is gnu, then add -z defs, to forbid
28788          # undefined symbols in object files.
28789          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28790          if test "x$DEBUG_LEVEL" = "xrelease"; then
28791              # When building release libraries, tell the linker optimize them.
28792              # Should this be supplied to the OSS linker as well?
28793              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28794          fi
28795        fi
28796    fi
28797    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28798                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28799
28800    # On some platforms (mac) the linker warns about non existing -L dirs.
28801    # Add server first if available. Linking aginst client does not always produce the same results.
28802    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28803    # Default to server for other variants.
28804    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28805        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28806    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28807        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28808    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28809        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28810    else
28811        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28812    fi
28813
28814    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28815    if test "x$COMPILER_NAME" = xossc; then
28816        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28817    fi
28818
28819    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28820    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28821        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28822    fi
28823fi
28824
28825# Adjust flags according to debug level.
28826case $DEBUG_LEVEL in
28827      fastdebug )
28828              CFLAGS="$CFLAGS $D_FLAG"
28829              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28830              ;;
28831      slowdebug )
28832              CFLAGS="$CFLAGS $D_FLAG"
28833	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28834	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28835	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28836	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28837              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28838              ;;
28839esac
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855# Setup debug symbols (need objcopy from the toolchain for that)
28856
28857#
28858# ENABLE_DEBUG_SYMBOLS
28859# This must be done after the toolchain is setup, since we're looking at objcopy.
28860#
28861# Check whether --enable-debug-symbols was given.
28862if test "${enable_debug_symbols+set}" = set; then :
28863  enableval=$enable_debug_symbols;
28864fi
28865
28866
28867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28868$as_echo_n "checking if we should generate debug symbols... " >&6; }
28869
28870if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28871   # explicit enabling of enable-debug-symbols and can't find objcopy
28872   #   this is an error
28873   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28874fi
28875
28876if test "x$enable_debug_symbols" = "xyes"; then
28877  ENABLE_DEBUG_SYMBOLS=true
28878elif test "x$enable_debug_symbols" = "xno"; then
28879  ENABLE_DEBUG_SYMBOLS=false
28880else
28881  # default on macosx is false
28882  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28883    ENABLE_DEBUG_SYMBOLS=false
28884  # Default is on if objcopy is found, otherwise off
28885  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28886    ENABLE_DEBUG_SYMBOLS=true
28887  else
28888    ENABLE_DEBUG_SYMBOLS=false
28889  fi
28890fi
28891
28892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28893$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28894
28895#
28896# ZIP_DEBUGINFO_FILES
28897#
28898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28899$as_echo_n "checking if we should zip debug-info files... " >&6; }
28900# Check whether --enable-zip-debug-info was given.
28901if test "${enable_zip_debug_info+set}" = set; then :
28902  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
28903else
28904  enable_zip_debug_info="yes"
28905fi
28906
28907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28908$as_echo "${enable_zip_debug_info}" >&6; }
28909
28910if test "x${enable_zip_debug_info}" = "xno"; then
28911   ZIP_DEBUGINFO_FILES=false
28912else
28913   ZIP_DEBUGINFO_FILES=true
28914fi
28915
28916
28917
28918
28919
28920
28921
28922###############################################################################
28923#
28924# Check dependencies for external and internal libraries.
28925#
28926###############################################################################
28927
28928
28929
28930###############################################################################
28931#
28932# OS specific settings that we never will need to probe.
28933#
28934if test "x$OPENJDK_TARGET_OS" = xlinux; then
28935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28936$as_echo_n "checking what is not needed on Linux?... " >&6; }
28937    PULSE_NOT_NEEDED=yes
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28939$as_echo "pulse" >&6; }
28940fi
28941
28942if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28944$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28945    ALSA_NOT_NEEDED=yes
28946    PULSE_NOT_NEEDED=yes
28947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28948$as_echo "alsa pulse" >&6; }
28949fi
28950
28951if test "x$OPENJDK_TARGET_OS" = xwindows; then
28952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28953$as_echo_n "checking what is not needed on Windows?... " >&6; }
28954    CUPS_NOT_NEEDED=yes
28955    ALSA_NOT_NEEDED=yes
28956    PULSE_NOT_NEEDED=yes
28957    X11_NOT_NEEDED=yes
28958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28959$as_echo "alsa cups pulse x11" >&6; }
28960fi
28961
28962if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28964$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28965    ALSA_NOT_NEEDED=yes
28966    PULSE_NOT_NEEDED=yes
28967    X11_NOT_NEEDED=yes
28968    FREETYPE2_NOT_NEEDED=yes
28969    # If the java runtime framework is disabled, then we need X11.
28970    # This will be adjusted below.
28971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28972$as_echo "alsa pulse x11" >&6; }
28973fi
28974
28975if test "x$OPENJDK_TARGET_OS" = xbsd; then
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28977$as_echo_n "checking what is not needed on bsd?... " >&6; }
28978    ALSA_NOT_NEEDED=yes
28979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28980$as_echo "alsa" >&6; }
28981fi
28982
28983if test "x$OPENJDK" = "xfalse"; then
28984    FREETYPE2_NOT_NEEDED=yes
28985fi
28986
28987if test "x$SUPPORT_HEADFUL" = xno; then
28988    X11_NOT_NEEDED=yes
28989fi
28990
28991###############################################################################
28992#
28993# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28994# that uses this API.
28995#
28996# Check whether --enable-macosx-runtime-support was given.
28997if test "${enable_macosx_runtime_support+set}" = set; then :
28998  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28999else
29000  MACOSX_RUNTIME_SUPPORT="no"
29001fi
29002
29003
29004USE_MACOSX_RUNTIME_SUPPORT=no
29005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29006$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29007if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29008    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29009        MACOSX_RUNTIME_SUPPORT=yes
29010        USE_MACOSX_RUNTIME_SUPPORT=yes
29011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29012$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29013    else
29014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29015$as_echo "yes, but explicitly disabled." >&6; }
29016    fi
29017else
29018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29019$as_echo "no" >&6; }
29020fi
29021
29022if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29024$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29025    X11_NOT_NEEDED=
29026    FREETYPE2_NOT_NEEDED=
29027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29028$as_echo "alsa pulse" >&6; }
29029fi
29030
29031
29032
29033
29034###############################################################################
29035#
29036# Check for X Windows
29037#
29038
29039# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29040# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29041# --x-libraries for the sysroot, if that seems to be correct.
29042if test "x$SYS_ROOT" != "x/"; then
29043  if test "x$x_includes" = xNONE; then
29044    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29045      x_includes="$SYS_ROOT/usr/X11R6/include"
29046    fi
29047  fi
29048  if test "x$x_libraries" = xNONE; then
29049    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29050      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29051    fi
29052  fi
29053fi
29054
29055# Now let autoconf do it's magic
29056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29057$as_echo_n "checking for X... " >&6; }
29058
29059
29060# Check whether --with-x was given.
29061if test "${with_x+set}" = set; then :
29062  withval=$with_x;
29063fi
29064
29065# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29066if test "x$with_x" = xno; then
29067  # The user explicitly disabled X.
29068  have_x=disabled
29069else
29070  case $x_includes,$x_libraries in #(
29071    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29072    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29073  $as_echo_n "(cached) " >&6
29074else
29075  # One or both of the vars are not set, and there is no cached value.
29076ac_x_includes=no ac_x_libraries=no
29077rm -f -r conftest.dir
29078if mkdir conftest.dir; then
29079  cd conftest.dir
29080  cat >Imakefile <<'_ACEOF'
29081incroot:
29082	@echo incroot='${INCROOT}'
29083usrlibdir:
29084	@echo usrlibdir='${USRLIBDIR}'
29085libdir:
29086	@echo libdir='${LIBDIR}'
29087_ACEOF
29088  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29089    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29090    for ac_var in incroot usrlibdir libdir; do
29091      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29092    done
29093    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29094    for ac_extension in a so sl dylib la dll; do
29095      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29096	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29097	ac_im_usrlibdir=$ac_im_libdir; break
29098      fi
29099    done
29100    # Screen out bogus values from the imake configuration.  They are
29101    # bogus both because they are the default anyway, and because
29102    # using them would break gcc on systems where it needs fixed includes.
29103    case $ac_im_incroot in
29104	/usr/include) ac_x_includes= ;;
29105	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29106    esac
29107    case $ac_im_usrlibdir in
29108	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29109	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29110    esac
29111  fi
29112  cd ..
29113  rm -f -r conftest.dir
29114fi
29115
29116# Standard set of common directories for X headers.
29117# Check X11 before X11Rn because it is often a symlink to the current release.
29118ac_x_header_dirs='
29119/usr/X11/include
29120/usr/X11R7/include
29121/usr/X11R6/include
29122/usr/X11R5/include
29123/usr/X11R4/include
29124
29125/usr/include/X11
29126/usr/include/X11R7
29127/usr/include/X11R6
29128/usr/include/X11R5
29129/usr/include/X11R4
29130
29131/usr/local/X11/include
29132/usr/local/X11R7/include
29133/usr/local/X11R6/include
29134/usr/local/X11R5/include
29135/usr/local/X11R4/include
29136
29137/usr/local/include/X11
29138/usr/local/include/X11R7
29139/usr/local/include/X11R6
29140/usr/local/include/X11R5
29141/usr/local/include/X11R4
29142
29143/usr/X386/include
29144/usr/x386/include
29145/usr/XFree86/include/X11
29146
29147/usr/include
29148/usr/local/include
29149/usr/unsupported/include
29150/usr/athena/include
29151/usr/local/x11r5/include
29152/usr/lpp/Xamples/include
29153
29154/usr/openwin/include
29155/usr/openwin/share/include'
29156
29157if test "$ac_x_includes" = no; then
29158  # Guess where to find include files, by looking for Xlib.h.
29159  # First, try using that file with no special directory specified.
29160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29161/* end confdefs.h.  */
29162#include <X11/Xlib.h>
29163_ACEOF
29164if ac_fn_cxx_try_cpp "$LINENO"; then :
29165  # We can compile using X headers with no special include directory.
29166ac_x_includes=
29167else
29168  for ac_dir in $ac_x_header_dirs; do
29169  if test -r "$ac_dir/X11/Xlib.h"; then
29170    ac_x_includes=$ac_dir
29171    break
29172  fi
29173done
29174fi
29175rm -f conftest.err conftest.i conftest.$ac_ext
29176fi # $ac_x_includes = no
29177
29178if test "$ac_x_libraries" = no; then
29179  # Check for the libraries.
29180  # See if we find them without any special options.
29181  # Don't add to $LIBS permanently.
29182  ac_save_LIBS=$LIBS
29183  LIBS="-lX11 $LIBS"
29184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29185/* end confdefs.h.  */
29186#include <X11/Xlib.h>
29187int
29188main ()
29189{
29190XrmInitialize ()
29191  ;
29192  return 0;
29193}
29194_ACEOF
29195if ac_fn_cxx_try_link "$LINENO"; then :
29196  LIBS=$ac_save_LIBS
29197# We can link X programs with no special library path.
29198ac_x_libraries=
29199else
29200  LIBS=$ac_save_LIBS
29201for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29202do
29203  # Don't even attempt the hair of trying to link an X program!
29204  for ac_extension in a so sl dylib la dll; do
29205    if test -r "$ac_dir/libX11.$ac_extension"; then
29206      ac_x_libraries=$ac_dir
29207      break 2
29208    fi
29209  done
29210done
29211fi
29212rm -f core conftest.err conftest.$ac_objext \
29213    conftest$ac_exeext conftest.$ac_ext
29214fi # $ac_x_libraries = no
29215
29216case $ac_x_includes,$ac_x_libraries in #(
29217  no,* | *,no | *\'*)
29218    # Didn't find X, or a directory has "'" in its name.
29219    ac_cv_have_x="have_x=no";; #(
29220  *)
29221    # Record where we found X for the cache.
29222    ac_cv_have_x="have_x=yes\
29223	ac_x_includes='$ac_x_includes'\
29224	ac_x_libraries='$ac_x_libraries'"
29225esac
29226fi
29227;; #(
29228    *) have_x=yes;;
29229  esac
29230  eval "$ac_cv_have_x"
29231fi # $with_x != no
29232
29233if test "$have_x" != yes; then
29234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29235$as_echo "$have_x" >&6; }
29236  no_x=yes
29237else
29238  # If each of the values was on the command line, it overrides each guess.
29239  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29240  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29241  # Update the cache value to reflect the command line values.
29242  ac_cv_have_x="have_x=yes\
29243	ac_x_includes='$x_includes'\
29244	ac_x_libraries='$x_libraries'"
29245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29246$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29247fi
29248
29249if test "$no_x" = yes; then
29250  # Not all programs may use this symbol, but it does not hurt to define it.
29251
29252$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29253
29254  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29255else
29256  if test -n "$x_includes"; then
29257    X_CFLAGS="$X_CFLAGS -I$x_includes"
29258  fi
29259
29260  # It would also be nice to do this for all -L options, not just this one.
29261  if test -n "$x_libraries"; then
29262    X_LIBS="$X_LIBS -L$x_libraries"
29263    # For Solaris; some versions of Sun CC require a space after -R and
29264    # others require no space.  Words are not sufficient . . . .
29265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29266$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29267    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29268    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29269    ac_cxx_werror_flag=yes
29270    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29271/* end confdefs.h.  */
29272
29273int
29274main ()
29275{
29276
29277  ;
29278  return 0;
29279}
29280_ACEOF
29281if ac_fn_cxx_try_link "$LINENO"; then :
29282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29283$as_echo "no" >&6; }
29284       X_LIBS="$X_LIBS -R$x_libraries"
29285else
29286  LIBS="$ac_xsave_LIBS -R $x_libraries"
29287       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29288/* end confdefs.h.  */
29289
29290int
29291main ()
29292{
29293
29294  ;
29295  return 0;
29296}
29297_ACEOF
29298if ac_fn_cxx_try_link "$LINENO"; then :
29299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29300$as_echo "yes" >&6; }
29301	  X_LIBS="$X_LIBS -R $x_libraries"
29302else
29303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29304$as_echo "neither works" >&6; }
29305fi
29306rm -f core conftest.err conftest.$ac_objext \
29307    conftest$ac_exeext conftest.$ac_ext
29308fi
29309rm -f core conftest.err conftest.$ac_objext \
29310    conftest$ac_exeext conftest.$ac_ext
29311    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29312    LIBS=$ac_xsave_LIBS
29313  fi
29314
29315  # Check for system-dependent libraries X programs must link with.
29316  # Do this before checking for the system-independent R6 libraries
29317  # (-lICE), since we may need -lsocket or whatever for X linking.
29318
29319  if test "$ISC" = yes; then
29320    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29321  else
29322    # Martyn Johnson says this is needed for Ultrix, if the X
29323    # libraries were built with DECnet support.  And Karl Berry says
29324    # the Alpha needs dnet_stub (dnet does not exist).
29325    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29326    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29327/* end confdefs.h.  */
29328
29329/* Override any GCC internal prototype to avoid an error.
29330   Use char because int might match the return type of a GCC
29331   builtin and then its argument prototype would still apply.  */
29332#ifdef __cplusplus
29333extern "C"
29334#endif
29335char XOpenDisplay ();
29336int
29337main ()
29338{
29339return XOpenDisplay ();
29340  ;
29341  return 0;
29342}
29343_ACEOF
29344if ac_fn_cxx_try_link "$LINENO"; then :
29345
29346else
29347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29348$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29349if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29350  $as_echo_n "(cached) " >&6
29351else
29352  ac_check_lib_save_LIBS=$LIBS
29353LIBS="-ldnet  $LIBS"
29354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29355/* end confdefs.h.  */
29356
29357/* Override any GCC internal prototype to avoid an error.
29358   Use char because int might match the return type of a GCC
29359   builtin and then its argument prototype would still apply.  */
29360#ifdef __cplusplus
29361extern "C"
29362#endif
29363char dnet_ntoa ();
29364int
29365main ()
29366{
29367return dnet_ntoa ();
29368  ;
29369  return 0;
29370}
29371_ACEOF
29372if ac_fn_cxx_try_link "$LINENO"; then :
29373  ac_cv_lib_dnet_dnet_ntoa=yes
29374else
29375  ac_cv_lib_dnet_dnet_ntoa=no
29376fi
29377rm -f core conftest.err conftest.$ac_objext \
29378    conftest$ac_exeext conftest.$ac_ext
29379LIBS=$ac_check_lib_save_LIBS
29380fi
29381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29382$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29383if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29384  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29385fi
29386
29387    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29389$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29390if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
29391  $as_echo_n "(cached) " >&6
29392else
29393  ac_check_lib_save_LIBS=$LIBS
29394LIBS="-ldnet_stub  $LIBS"
29395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29396/* end confdefs.h.  */
29397
29398/* Override any GCC internal prototype to avoid an error.
29399   Use char because int might match the return type of a GCC
29400   builtin and then its argument prototype would still apply.  */
29401#ifdef __cplusplus
29402extern "C"
29403#endif
29404char dnet_ntoa ();
29405int
29406main ()
29407{
29408return dnet_ntoa ();
29409  ;
29410  return 0;
29411}
29412_ACEOF
29413if ac_fn_cxx_try_link "$LINENO"; then :
29414  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29415else
29416  ac_cv_lib_dnet_stub_dnet_ntoa=no
29417fi
29418rm -f core conftest.err conftest.$ac_objext \
29419    conftest$ac_exeext conftest.$ac_ext
29420LIBS=$ac_check_lib_save_LIBS
29421fi
29422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29423$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29424if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
29425  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29426fi
29427
29428    fi
29429fi
29430rm -f core conftest.err conftest.$ac_objext \
29431    conftest$ac_exeext conftest.$ac_ext
29432    LIBS="$ac_xsave_LIBS"
29433
29434    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29435    # to get the SysV transport functions.
29436    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29437    # needs -lnsl.
29438    # The nsl library prevents programs from opening the X display
29439    # on Irix 5.2, according to T.E. Dickey.
29440    # The functions gethostbyname, getservbyname, and inet_addr are
29441    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29442    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29443if test "x$ac_cv_func_gethostbyname" = x""yes; then :
29444
29445fi
29446
29447    if test $ac_cv_func_gethostbyname = no; then
29448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29449$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29450if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
29451  $as_echo_n "(cached) " >&6
29452else
29453  ac_check_lib_save_LIBS=$LIBS
29454LIBS="-lnsl  $LIBS"
29455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29456/* end confdefs.h.  */
29457
29458/* Override any GCC internal prototype to avoid an error.
29459   Use char because int might match the return type of a GCC
29460   builtin and then its argument prototype would still apply.  */
29461#ifdef __cplusplus
29462extern "C"
29463#endif
29464char gethostbyname ();
29465int
29466main ()
29467{
29468return gethostbyname ();
29469  ;
29470  return 0;
29471}
29472_ACEOF
29473if ac_fn_cxx_try_link "$LINENO"; then :
29474  ac_cv_lib_nsl_gethostbyname=yes
29475else
29476  ac_cv_lib_nsl_gethostbyname=no
29477fi
29478rm -f core conftest.err conftest.$ac_objext \
29479    conftest$ac_exeext conftest.$ac_ext
29480LIBS=$ac_check_lib_save_LIBS
29481fi
29482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29483$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29484if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29485  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29486fi
29487
29488      if test $ac_cv_lib_nsl_gethostbyname = no; then
29489	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29490$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29491if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29492  $as_echo_n "(cached) " >&6
29493else
29494  ac_check_lib_save_LIBS=$LIBS
29495LIBS="-lbsd  $LIBS"
29496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29497/* end confdefs.h.  */
29498
29499/* Override any GCC internal prototype to avoid an error.
29500   Use char because int might match the return type of a GCC
29501   builtin and then its argument prototype would still apply.  */
29502#ifdef __cplusplus
29503extern "C"
29504#endif
29505char gethostbyname ();
29506int
29507main ()
29508{
29509return gethostbyname ();
29510  ;
29511  return 0;
29512}
29513_ACEOF
29514if ac_fn_cxx_try_link "$LINENO"; then :
29515  ac_cv_lib_bsd_gethostbyname=yes
29516else
29517  ac_cv_lib_bsd_gethostbyname=no
29518fi
29519rm -f core conftest.err conftest.$ac_objext \
29520    conftest$ac_exeext conftest.$ac_ext
29521LIBS=$ac_check_lib_save_LIBS
29522fi
29523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29524$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29525if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29526  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29527fi
29528
29529      fi
29530    fi
29531
29532    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29533    # socket/setsockopt and other routines are undefined under SCO ODT
29534    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29535    # on later versions), says Simon Leinen: it contains gethostby*
29536    # variants that don't use the name server (or something).  -lsocket
29537    # must be given before -lnsl if both are needed.  We assume that
29538    # if connect needs -lnsl, so does gethostbyname.
29539    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29540if test "x$ac_cv_func_connect" = x""yes; then :
29541
29542fi
29543
29544    if test $ac_cv_func_connect = no; then
29545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29546$as_echo_n "checking for connect in -lsocket... " >&6; }
29547if test "${ac_cv_lib_socket_connect+set}" = set; then :
29548  $as_echo_n "(cached) " >&6
29549else
29550  ac_check_lib_save_LIBS=$LIBS
29551LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29553/* end confdefs.h.  */
29554
29555/* Override any GCC internal prototype to avoid an error.
29556   Use char because int might match the return type of a GCC
29557   builtin and then its argument prototype would still apply.  */
29558#ifdef __cplusplus
29559extern "C"
29560#endif
29561char connect ();
29562int
29563main ()
29564{
29565return connect ();
29566  ;
29567  return 0;
29568}
29569_ACEOF
29570if ac_fn_cxx_try_link "$LINENO"; then :
29571  ac_cv_lib_socket_connect=yes
29572else
29573  ac_cv_lib_socket_connect=no
29574fi
29575rm -f core conftest.err conftest.$ac_objext \
29576    conftest$ac_exeext conftest.$ac_ext
29577LIBS=$ac_check_lib_save_LIBS
29578fi
29579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29580$as_echo "$ac_cv_lib_socket_connect" >&6; }
29581if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29582  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29583fi
29584
29585    fi
29586
29587    # Guillermo Gomez says -lposix is necessary on A/UX.
29588    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29589if test "x$ac_cv_func_remove" = x""yes; then :
29590
29591fi
29592
29593    if test $ac_cv_func_remove = no; then
29594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29595$as_echo_n "checking for remove in -lposix... " >&6; }
29596if test "${ac_cv_lib_posix_remove+set}" = set; then :
29597  $as_echo_n "(cached) " >&6
29598else
29599  ac_check_lib_save_LIBS=$LIBS
29600LIBS="-lposix  $LIBS"
29601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29602/* end confdefs.h.  */
29603
29604/* Override any GCC internal prototype to avoid an error.
29605   Use char because int might match the return type of a GCC
29606   builtin and then its argument prototype would still apply.  */
29607#ifdef __cplusplus
29608extern "C"
29609#endif
29610char remove ();
29611int
29612main ()
29613{
29614return remove ();
29615  ;
29616  return 0;
29617}
29618_ACEOF
29619if ac_fn_cxx_try_link "$LINENO"; then :
29620  ac_cv_lib_posix_remove=yes
29621else
29622  ac_cv_lib_posix_remove=no
29623fi
29624rm -f core conftest.err conftest.$ac_objext \
29625    conftest$ac_exeext conftest.$ac_ext
29626LIBS=$ac_check_lib_save_LIBS
29627fi
29628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29629$as_echo "$ac_cv_lib_posix_remove" >&6; }
29630if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29631  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29632fi
29633
29634    fi
29635
29636    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29637    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29638if test "x$ac_cv_func_shmat" = x""yes; then :
29639
29640fi
29641
29642    if test $ac_cv_func_shmat = no; then
29643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29644$as_echo_n "checking for shmat in -lipc... " >&6; }
29645if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29646  $as_echo_n "(cached) " >&6
29647else
29648  ac_check_lib_save_LIBS=$LIBS
29649LIBS="-lipc  $LIBS"
29650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29651/* end confdefs.h.  */
29652
29653/* Override any GCC internal prototype to avoid an error.
29654   Use char because int might match the return type of a GCC
29655   builtin and then its argument prototype would still apply.  */
29656#ifdef __cplusplus
29657extern "C"
29658#endif
29659char shmat ();
29660int
29661main ()
29662{
29663return shmat ();
29664  ;
29665  return 0;
29666}
29667_ACEOF
29668if ac_fn_cxx_try_link "$LINENO"; then :
29669  ac_cv_lib_ipc_shmat=yes
29670else
29671  ac_cv_lib_ipc_shmat=no
29672fi
29673rm -f core conftest.err conftest.$ac_objext \
29674    conftest$ac_exeext conftest.$ac_ext
29675LIBS=$ac_check_lib_save_LIBS
29676fi
29677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29678$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29679if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29680  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29681fi
29682
29683    fi
29684  fi
29685
29686  # Check for libraries that X11R6 Xt/Xaw programs need.
29687  ac_save_LDFLAGS=$LDFLAGS
29688  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29689  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29690  # check for ICE first), but we must link in the order -lSM -lICE or
29691  # we get undefined symbols.  So assume we have SM if we have ICE.
29692  # These have to be linked with before -lX11, unlike the other
29693  # libraries we check for below, so use a different variable.
29694  # John Interrante, Karl Berry
29695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29696$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29697if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29698  $as_echo_n "(cached) " >&6
29699else
29700  ac_check_lib_save_LIBS=$LIBS
29701LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29703/* end confdefs.h.  */
29704
29705/* Override any GCC internal prototype to avoid an error.
29706   Use char because int might match the return type of a GCC
29707   builtin and then its argument prototype would still apply.  */
29708#ifdef __cplusplus
29709extern "C"
29710#endif
29711char IceConnectionNumber ();
29712int
29713main ()
29714{
29715return IceConnectionNumber ();
29716  ;
29717  return 0;
29718}
29719_ACEOF
29720if ac_fn_cxx_try_link "$LINENO"; then :
29721  ac_cv_lib_ICE_IceConnectionNumber=yes
29722else
29723  ac_cv_lib_ICE_IceConnectionNumber=no
29724fi
29725rm -f core conftest.err conftest.$ac_objext \
29726    conftest$ac_exeext conftest.$ac_ext
29727LIBS=$ac_check_lib_save_LIBS
29728fi
29729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29730$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29731if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29732  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29733fi
29734
29735  LDFLAGS=$ac_save_LDFLAGS
29736
29737fi
29738
29739
29740# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29741# this doesn't make sense so we remove it.
29742if test "x$COMPILE_TYPE" = xcross; then
29743  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29744fi
29745
29746if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29747
29748    # Print a helpful message on how to acquire the necessary build dependency.
29749    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29750    MISSING_DEPENDENCY=x11
29751    PKGHANDLER_COMMAND=
29752
29753    case $PKGHANDLER in
29754	apt-get)
29755                apt_help     $MISSING_DEPENDENCY ;;
29756    yum)
29757                yum_help     $MISSING_DEPENDENCY ;;
29758	port)
29759                port_help    $MISSING_DEPENDENCY ;;
29760	pkgutil)
29761                pkgutil_help $MISSING_DEPENDENCY ;;
29762	pkgadd)
29763                pkgadd_help  $MISSING_DEPENDENCY ;;
29764    * )
29765      break ;;
29766    esac
29767
29768    if test "x$PKGHANDLER_COMMAND" != x; then
29769        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29770    fi
29771
29772    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29773fi
29774
29775# Some of the old makefiles require a setting of OPENWIN_HOME
29776# Since the X11R6 directory has disappeared on later Linuxes,
29777# we need to probe for it.
29778if test "x$OPENJDK_TARGET_OS" = xlinux; then
29779    if test -d "$SYS_ROOT/usr/X11R6"; then
29780        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29781    fi
29782    if test -d "$SYS_ROOT/usr/include/X11"; then
29783        OPENWIN_HOME="$SYS_ROOT/usr"
29784    fi
29785fi
29786if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29787    OPENWIN_HOME="/usr/openwin"
29788fi
29789
29790
29791
29792#
29793# Weird Sol10 something check...TODO change to try compile
29794#
29795if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29796  if test "`uname -r`" = "5.10"; then
29797     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29798     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29799     fi
29800  fi
29801fi
29802
29803ac_ext=c
29804ac_cpp='$CPP $CPPFLAGS'
29805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29807ac_compiler_gnu=$ac_cv_c_compiler_gnu
29808
29809OLD_CFLAGS="$CFLAGS"
29810CFLAGS="$CFLAGS $X_CFLAGS"
29811
29812# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29813for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29814do :
29815  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29816ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29817                   # include <X11/Xutil.h>
29818
29819"
29820if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29821  cat >>confdefs.h <<_ACEOF
29822#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29823_ACEOF
29824 X11_A_OK=yes
29825else
29826  X11_A_OK=no; break
29827fi
29828
29829done
29830
29831
29832CFLAGS="$OLD_CFLAGS"
29833ac_ext=cpp
29834ac_cpp='$CXXCPP $CPPFLAGS'
29835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29838
29839
29840if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29841
29842    # Print a helpful message on how to acquire the necessary build dependency.
29843    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29844    MISSING_DEPENDENCY=x11
29845    PKGHANDLER_COMMAND=
29846
29847    case $PKGHANDLER in
29848	apt-get)
29849                apt_help     $MISSING_DEPENDENCY ;;
29850    yum)
29851                yum_help     $MISSING_DEPENDENCY ;;
29852	port)
29853                port_help    $MISSING_DEPENDENCY ;;
29854	pkgutil)
29855                pkgutil_help $MISSING_DEPENDENCY ;;
29856	pkgadd)
29857                pkgadd_help  $MISSING_DEPENDENCY ;;
29858    * )
29859      break ;;
29860    esac
29861
29862    if test "x$PKGHANDLER_COMMAND" != x; then
29863        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29864    fi
29865
29866    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29867fi
29868
29869
29870
29871
29872
29873
29874###############################################################################
29875#
29876# The common unix printing system cups is used to print from java.
29877#
29878
29879# Check whether --with-cups was given.
29880if test "${with_cups+set}" = set; then :
29881  withval=$with_cups;
29882fi
29883
29884
29885# Check whether --with-cups-include was given.
29886if test "${with_cups_include+set}" = set; then :
29887  withval=$with_cups_include;
29888fi
29889
29890
29891if test "x$CUPS_NOT_NEEDED" = xyes; then
29892	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29893		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29894$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29895	fi
29896	CUPS_CFLAGS=
29897else
29898	CUPS_FOUND=no
29899
29900	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29901	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29902	fi
29903
29904	if test "x${with_cups}" != x; then
29905	    CUPS_CFLAGS="-I${with_cups}/include"
29906	    CUPS_FOUND=yes
29907	fi
29908	if test "x${with_cups_include}" != x; then
29909	    CUPS_CFLAGS="-I${with_cups_include}"
29910	    CUPS_FOUND=yes
29911	fi
29912	if test "x$CUPS_FOUND" = xno; then
29913
29914
29915    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29916        # Source the builddeps file again, to make sure it uses the latest variables!
29917        . $builddepsfile
29918        # Look for a target and build machine specific resource!
29919        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29920        if test "x$resource" = x; then
29921            # Ok, lets instead look for a target specific resource
29922            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29923        fi
29924        if test "x$resource" = x; then
29925            # Ok, lets instead look for a build specific resource
29926            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29927        fi
29928        if test "x$resource" = x; then
29929            # Ok, lets instead look for a generic resource
29930            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29931            resource=${builddep_cups}
29932        fi
29933        if test "x$resource" != x; then
29934            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29935$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29936	    # If the resource in the builddeps.conf file is an existing directory,
29937	    # for example /java/linux/cups
29938	    if test -d ${resource}; then
29939	       depdir=${resource}
29940	    else
29941
29942# cups is for example mymodule
29943# $resource is for example libs/general/libmymod_1_2_3.zip
29944# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29945# $with_builddeps_dir is for example /localhome/builddeps
29946# depdir is the name of the variable into which we store the depdir, eg MYMOD
29947# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29948# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29949    filename=`basename $resource`
29950    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29951    filebase=${filename%%.*}
29952    extension=${filename#*.}
29953    installdir=$with_builddeps_dir/$filebase
29954    if test ! -f $installdir/$filename.unpacked; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29956$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29957        if test ! -d $installdir; then
29958            mkdir -p $installdir
29959        fi
29960        if test ! -d $installdir; then
29961            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29962        fi
29963        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29964        touch $tmpfile
29965        if test ! -f $tmpfile; then
29966            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29967        fi
29968
29969    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29970    # $tmpfile is the local file name for the downloaded file.
29971    VALID_TOOL=no
29972    if test "x$BDEPS_FTP" = xwget; then
29973       VALID_TOOL=yes
29974       wget -O $tmpfile $with_builddeps_server/$resource
29975    fi
29976    if test "x$BDEPS_FTP" = xlftp; then
29977       VALID_TOOL=yes
29978       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29979    fi
29980    if test "x$BDEPS_FTP" = xftp; then
29981        VALID_TOOL=yes
29982        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29983        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29984        FTPUSERPWD=${FTPSERVER%%@*}
29985        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29986            FTPUSER=${userpwd%%:*}
29987            FTPPWD=${userpwd#*@}
29988            FTPSERVER=${FTPSERVER#*@}
29989        else
29990            FTPUSER=ftp
29991            FTPPWD=ftp
29992        fi
29993        # the "pass" command does not work on some
29994        # ftp clients (read ftp.exe) but if it works,
29995        # passive mode is better!
29996        (\
29997            echo "user $FTPUSER $FTPPWD"        ;\
29998            echo "pass"                         ;\
29999            echo "bin"                          ;\
30000            echo "get $FTPPATH $tmpfile"              ;\
30001        ) | ftp -in $FTPSERVER
30002    fi
30003    if test "x$VALID_TOOL" != xyes; then
30004       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30005    fi
30006
30007        mv $tmpfile $installdir/$filename
30008        if test ! -s $installdir/$filename; then
30009            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30010        fi
30011        case "$extension" in
30012            zip)  echo "Unzipping $installdir/$filename..."
30013               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30014            ;;
30015            tar.gz) echo "Untaring $installdir/$filename..."
30016               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30017            ;;
30018            tgz) echo "Untaring $installdir/$filename..."
30019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30020            ;;
30021            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30022            ;;
30023        esac
30024    fi
30025    if test -f $installdir/$filename.unpacked; then
30026        depdir=$installdir
30027    fi
30028
30029	    fi
30030            # Source the builddeps file again, because in the previous command, the depdir
30031            # was updated to point at the current build dependency install directory.
30032            . $builddepsfile
30033            # Now extract variables from the builddeps.conf files.
30034            theroot=${builddep_cups_ROOT}
30035            thecflags=${builddep_cups_CFLAGS}
30036            thelibs=${builddep_cups_LIBS}
30037            if test "x$depdir" = x; then
30038                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30039            fi
30040            CUPS=$depdir
30041            if test "x$theroot" != x; then
30042               CUPS="$theroot"
30043            fi
30044            if test "x$thecflags" != x; then
30045               CUPS_CFLAGS="$thecflags"
30046            fi
30047            if test "x$thelibs" != x; then
30048               CUPS_LIBS="$thelibs"
30049            fi
30050            CUPS_FOUND=yes
30051
30052        fi
30053
30054    fi
30055
30056	fi
30057	if test "x$CUPS_FOUND" = xno; then
30058	    # Are the cups headers installed in the default /usr/include location?
30059	    for ac_header in cups/cups.h cups/ppd.h
30060do :
30061  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30062ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30063if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30064  cat >>confdefs.h <<_ACEOF
30065#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30066_ACEOF
30067 CUPS_FOUND=yes
30068	                      CUPS_CFLAGS=
30069	                      DEFAULT_CUPS=yes
30070fi
30071
30072done
30073
30074	fi
30075	if test "x$CUPS_FOUND" = xno; then
30076	    # Getting nervous now? Lets poke around for standard Solaris third-party
30077	    # package installation locations.
30078	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30079$as_echo_n "checking for cups headers... " >&6; }
30080	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30081	       # An SFW package seems to be installed!
30082	       CUPS_FOUND=yes
30083	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30084	    elif test -s /opt/csw/include/cups/cups.h; then
30085	       # A CSW package seems to be installed!
30086	       CUPS_FOUND=yes
30087	       CUPS_CFLAGS="-I/opt/csw/include"
30088	    fi
30089	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30090$as_echo "$CUPS_FOUND" >&6; }
30091	fi
30092	if test "x$CUPS_FOUND" = xno; then
30093
30094    # Print a helpful message on how to acquire the necessary build dependency.
30095    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30096    MISSING_DEPENDENCY=cups
30097    PKGHANDLER_COMMAND=
30098
30099    case $PKGHANDLER in
30100	apt-get)
30101                apt_help     $MISSING_DEPENDENCY ;;
30102    yum)
30103                yum_help     $MISSING_DEPENDENCY ;;
30104	port)
30105                port_help    $MISSING_DEPENDENCY ;;
30106	pkgutil)
30107                pkgutil_help $MISSING_DEPENDENCY ;;
30108	pkgadd)
30109                pkgadd_help  $MISSING_DEPENDENCY ;;
30110    * )
30111      break ;;
30112    esac
30113
30114    if test "x$PKGHANDLER_COMMAND" != x; then
30115        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30116    fi
30117
30118	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30119	fi
30120fi
30121
30122
30123
30124
30125
30126
30127###############################################################################
30128#
30129# The ubiquitous freetype2 library is used to render fonts.
30130#
30131
30132# Check whether --with-freetype was given.
30133if test "${with_freetype+set}" = set; then :
30134  withval=$with_freetype;
30135fi
30136
30137
30138# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30139USING_SYSTEM_FT_LIB=false
30140
30141if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30142	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30143		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30144$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30145	fi
30146	FREETYPE2_CFLAGS=
30147	FREETYPE2_LIBS=
30148        FREETYPE2_LIB_PATH=
30149else
30150	FREETYPE2_FOUND=no
30151
30152	if test "x$with_freetype" != x; then
30153
30154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30155
30156  # Input might be given as Windows format, start by converting to
30157  # unix format.
30158  path="$with_freetype"
30159  new_path=`$CYGPATH -u "$path"`
30160
30161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30164  # "foo.exe" is OK but "foo" is an error.
30165  #
30166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30167  # It is also a way to make sure we got the proper file name for the real test later on.
30168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30169  if test "x$test_shortpath" = x; then
30170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30171$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30172    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30173  fi
30174
30175  # Call helper function which possibly converts this using DOS-style short mode.
30176  # If so, the updated path is stored in $new_path.
30177
30178  input_path="$new_path"
30179  # Check if we need to convert this using DOS-style short mode. If the path
30180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30181  # take no chances and rewrite it.
30182  # Note: m4 eats our [], so we need to use [ and ] instead.
30183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30184  if test "x$has_forbidden_chars" != x; then
30185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30189      # Going to short mode and back again did indeed matter. Since short mode is
30190      # case insensitive, let's make it lowercase to improve readability.
30191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30192      # Now convert it back to Unix-stile (cygpath)
30193      input_path=`$CYGPATH -u "$shortmode_path"`
30194      new_path="$input_path"
30195    fi
30196  fi
30197
30198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30199  if test "x$test_cygdrive_prefix" = x; then
30200    # As a simple fix, exclude /usr/bin since it's not a real path.
30201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30203      # a path prefixed by /cygdrive for fixpath to work.
30204      new_path="$CYGWIN_ROOT_PATH$input_path"
30205    fi
30206  fi
30207
30208
30209  if test "x$path" != "x$new_path"; then
30210    with_freetype="$new_path"
30211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30212$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30213  fi
30214
30215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30216
30217  path="$with_freetype"
30218  has_colon=`$ECHO $path | $GREP ^.:`
30219  new_path="$path"
30220  if test "x$has_colon" = x; then
30221    # Not in mixed or Windows style, start by that.
30222    new_path=`cmd //c echo $path`
30223  fi
30224
30225
30226  input_path="$new_path"
30227  # Check if we need to convert this using DOS-style short mode. If the path
30228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30229  # take no chances and rewrite it.
30230  # Note: m4 eats our [], so we need to use [ and ] instead.
30231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30232  if test "x$has_forbidden_chars" != x; then
30233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30235  fi
30236
30237
30238  windows_path="$new_path"
30239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30240    unix_path=`$CYGPATH -u "$windows_path"`
30241    new_path="$unix_path"
30242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30244    new_path="$unix_path"
30245  fi
30246
30247  if test "x$path" != "x$new_path"; then
30248    with_freetype="$new_path"
30249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30250$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30251  fi
30252
30253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30255
30256  else
30257    # We're on a posix platform. Hooray! :)
30258    path="$with_freetype"
30259
30260    if test ! -f "$path" && test ! -d "$path"; then
30261      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30262    fi
30263
30264    has_space=`$ECHO "$path" | $GREP " "`
30265    if test "x$has_space" != x; then
30266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30267$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30268      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30269    fi
30270  fi
30271
30272	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30273            FREETYPE2_LIB_PATH="$with_freetype/lib"
30274            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30275                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30276                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30277            fi
30278            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30279                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30280            fi
30281	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30282            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30283                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30284            fi
30285 	    FREETYPE2_FOUND=yes
30286   	    if test "x$FREETYPE2_FOUND" = xyes; then
30287	        # Verify that the directories exist
30288                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30289		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30290		fi
30291	        # List the contents of the lib.
30292		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30293                if test "x$FREETYPELIB" = x; then
30294		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30295		fi
30296	        # Check one h-file
30297                if ! test -s "$with_freetype/include/ft2build.h"; then
30298		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30299		fi
30300            fi
30301        fi
30302	if test "x$FREETYPE2_FOUND" = xno; then
30303
30304
30305    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30306        # Source the builddeps file again, to make sure it uses the latest variables!
30307        . $builddepsfile
30308        # Look for a target and build machine specific resource!
30309        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30310        if test "x$resource" = x; then
30311            # Ok, lets instead look for a target specific resource
30312            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30313        fi
30314        if test "x$resource" = x; then
30315            # Ok, lets instead look for a build specific resource
30316            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30317        fi
30318        if test "x$resource" = x; then
30319            # Ok, lets instead look for a generic resource
30320            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30321            resource=${builddep_freetype2}
30322        fi
30323        if test "x$resource" != x; then
30324            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30325$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30326	    # If the resource in the builddeps.conf file is an existing directory,
30327	    # for example /java/linux/cups
30328	    if test -d ${resource}; then
30329	       depdir=${resource}
30330	    else
30331
30332# freetype2 is for example mymodule
30333# $resource is for example libs/general/libmymod_1_2_3.zip
30334# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30335# $with_builddeps_dir is for example /localhome/builddeps
30336# depdir is the name of the variable into which we store the depdir, eg MYMOD
30337# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30338# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30339    filename=`basename $resource`
30340    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30341    filebase=${filename%%.*}
30342    extension=${filename#*.}
30343    installdir=$with_builddeps_dir/$filebase
30344    if test ! -f $installdir/$filename.unpacked; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30346$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30347        if test ! -d $installdir; then
30348            mkdir -p $installdir
30349        fi
30350        if test ! -d $installdir; then
30351            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30352        fi
30353        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30354        touch $tmpfile
30355        if test ! -f $tmpfile; then
30356            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30357        fi
30358
30359    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30360    # $tmpfile is the local file name for the downloaded file.
30361    VALID_TOOL=no
30362    if test "x$BDEPS_FTP" = xwget; then
30363       VALID_TOOL=yes
30364       wget -O $tmpfile $with_builddeps_server/$resource
30365    fi
30366    if test "x$BDEPS_FTP" = xlftp; then
30367       VALID_TOOL=yes
30368       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30369    fi
30370    if test "x$BDEPS_FTP" = xftp; then
30371        VALID_TOOL=yes
30372        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30373        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30374        FTPUSERPWD=${FTPSERVER%%@*}
30375        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30376            FTPUSER=${userpwd%%:*}
30377            FTPPWD=${userpwd#*@}
30378            FTPSERVER=${FTPSERVER#*@}
30379        else
30380            FTPUSER=ftp
30381            FTPPWD=ftp
30382        fi
30383        # the "pass" command does not work on some
30384        # ftp clients (read ftp.exe) but if it works,
30385        # passive mode is better!
30386        (\
30387            echo "user $FTPUSER $FTPPWD"        ;\
30388            echo "pass"                         ;\
30389            echo "bin"                          ;\
30390            echo "get $FTPPATH $tmpfile"              ;\
30391        ) | ftp -in $FTPSERVER
30392    fi
30393    if test "x$VALID_TOOL" != xyes; then
30394       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30395    fi
30396
30397        mv $tmpfile $installdir/$filename
30398        if test ! -s $installdir/$filename; then
30399            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30400        fi
30401        case "$extension" in
30402            zip)  echo "Unzipping $installdir/$filename..."
30403               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30404            ;;
30405            tar.gz) echo "Untaring $installdir/$filename..."
30406               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30407            ;;
30408            tgz) echo "Untaring $installdir/$filename..."
30409               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30410            ;;
30411            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30412            ;;
30413        esac
30414    fi
30415    if test -f $installdir/$filename.unpacked; then
30416        depdir=$installdir
30417    fi
30418
30419	    fi
30420            # Source the builddeps file again, because in the previous command, the depdir
30421            # was updated to point at the current build dependency install directory.
30422            . $builddepsfile
30423            # Now extract variables from the builddeps.conf files.
30424            theroot=${builddep_freetype2_ROOT}
30425            thecflags=${builddep_freetype2_CFLAGS}
30426            thelibs=${builddep_freetype2_LIBS}
30427            if test "x$depdir" = x; then
30428                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30429            fi
30430            FREETYPE2=$depdir
30431            if test "x$theroot" != x; then
30432               FREETYPE2="$theroot"
30433            fi
30434            if test "x$thecflags" != x; then
30435               FREETYPE2_CFLAGS="$thecflags"
30436            fi
30437            if test "x$thelibs" != x; then
30438               FREETYPE2_LIBS="$thelibs"
30439            fi
30440            FREETYPE2_FOUND=yes
30441            else FREETYPE2_FOUND=no
30442
30443        fi
30444        else FREETYPE2_FOUND=no
30445
30446    fi
30447
30448            USING_SYSTEM_FT_LIB=true
30449	fi
30450	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30451            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30452
30453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30454
30455  # Input might be given as Windows format, start by converting to
30456  # unix format.
30457  path="$FREETYPELOCATION"
30458  new_path=`$CYGPATH -u "$path"`
30459
30460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30463  # "foo.exe" is OK but "foo" is an error.
30464  #
30465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30466  # It is also a way to make sure we got the proper file name for the real test later on.
30467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30468  if test "x$test_shortpath" = x; then
30469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30470$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30471    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30472  fi
30473
30474  # Call helper function which possibly converts this using DOS-style short mode.
30475  # If so, the updated path is stored in $new_path.
30476
30477  input_path="$new_path"
30478  # Check if we need to convert this using DOS-style short mode. If the path
30479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30480  # take no chances and rewrite it.
30481  # Note: m4 eats our [], so we need to use [ and ] instead.
30482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30483  if test "x$has_forbidden_chars" != x; then
30484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30488      # Going to short mode and back again did indeed matter. Since short mode is
30489      # case insensitive, let's make it lowercase to improve readability.
30490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30491      # Now convert it back to Unix-stile (cygpath)
30492      input_path=`$CYGPATH -u "$shortmode_path"`
30493      new_path="$input_path"
30494    fi
30495  fi
30496
30497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30498  if test "x$test_cygdrive_prefix" = x; then
30499    # As a simple fix, exclude /usr/bin since it's not a real path.
30500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30502      # a path prefixed by /cygdrive for fixpath to work.
30503      new_path="$CYGWIN_ROOT_PATH$input_path"
30504    fi
30505  fi
30506
30507
30508  if test "x$path" != "x$new_path"; then
30509    FREETYPELOCATION="$new_path"
30510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30511$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30512  fi
30513
30514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30515
30516  path="$FREETYPELOCATION"
30517  has_colon=`$ECHO $path | $GREP ^.:`
30518  new_path="$path"
30519  if test "x$has_colon" = x; then
30520    # Not in mixed or Windows style, start by that.
30521    new_path=`cmd //c echo $path`
30522  fi
30523
30524
30525  input_path="$new_path"
30526  # Check if we need to convert this using DOS-style short mode. If the path
30527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30528  # take no chances and rewrite it.
30529  # Note: m4 eats our [], so we need to use [ and ] instead.
30530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30531  if test "x$has_forbidden_chars" != x; then
30532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30534  fi
30535
30536
30537  windows_path="$new_path"
30538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30539    unix_path=`$CYGPATH -u "$windows_path"`
30540    new_path="$unix_path"
30541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30543    new_path="$unix_path"
30544  fi
30545
30546  if test "x$path" != "x$new_path"; then
30547    FREETYPELOCATION="$new_path"
30548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30549$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30550  fi
30551
30552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30554
30555  else
30556    # We're on a posix platform. Hooray! :)
30557    path="$FREETYPELOCATION"
30558
30559    if test ! -f "$path" && test ! -d "$path"; then
30560      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30561    fi
30562
30563    has_space=`$ECHO "$path" | $GREP " "`
30564    if test "x$has_space" != x; then
30565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30566$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30567      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30568    fi
30569  fi
30570
30571	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30572$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30573	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30574	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30575	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30576 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30577                if ! test -s "$FREETYPE2_LIBS"; then
30578		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30579		fi
30580                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30581		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30582		fi
30583                USING_SYSTEM_FT_LIB=true
30584                FREETYPE2_FOUND=yes
30585	    fi
30586	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30587$as_echo "$FREETYPE2_FOUND" >&6; }
30588        fi
30589	if test "x$FREETYPE2_FOUND" = xno; then
30590
30591pkg_failed=no
30592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30593$as_echo_n "checking for FREETYPE2... " >&6; }
30594
30595if test -n "$FREETYPE2_CFLAGS"; then
30596    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30597 elif test -n "$PKG_CONFIG"; then
30598    if test -n "$PKG_CONFIG" && \
30599    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30600  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30601  ac_status=$?
30602  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30603  test $ac_status = 0; }; then
30604  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30605else
30606  pkg_failed=yes
30607fi
30608 else
30609    pkg_failed=untried
30610fi
30611if test -n "$FREETYPE2_LIBS"; then
30612    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30613 elif test -n "$PKG_CONFIG"; then
30614    if test -n "$PKG_CONFIG" && \
30615    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30616  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30617  ac_status=$?
30618  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30619  test $ac_status = 0; }; then
30620  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30621else
30622  pkg_failed=yes
30623fi
30624 else
30625    pkg_failed=untried
30626fi
30627
30628
30629
30630if test $pkg_failed = yes; then
30631
30632if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30633        _pkg_short_errors_supported=yes
30634else
30635        _pkg_short_errors_supported=no
30636fi
30637        if test $_pkg_short_errors_supported = yes; then
30638	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30639        else
30640	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30641        fi
30642	# Put the nasty error message in config.log where it belongs
30643	echo "$FREETYPE2_PKG_ERRORS" >&5
30644
30645	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30646$as_echo "no" >&6; }
30647                FREETYPE2_FOUND=no
30648elif test $pkg_failed = untried; then
30649	FREETYPE2_FOUND=no
30650else
30651	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30652	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30654$as_echo "yes" >&6; }
30655	FREETYPE2_FOUND=yes
30656fi
30657            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30658            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30659            USING_SYSTEM_FT_LIB=true
30660            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30661            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30662              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30663            fi
30664	fi
30665	if test "x$FREETYPE2_FOUND" = xno; then
30666	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30667$as_echo_n "checking for freetype in some standard locations... " >&6; }
30668
30669	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30670	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30671	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30672	    fi
30673	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30674	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30675	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30676	    fi
30677
30678	    PREV_CXXCFLAGS="$CXXFLAGS"
30679	    PREV_LDFLAGS="$LDFLAGS"
30680	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30681	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30682	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30683/* end confdefs.h.  */
30684#include<ft2build.h>
30685	                    #include FT_FREETYPE_H
30686	                   int main() { return 0; }
30687
30688_ACEOF
30689if ac_fn_cxx_try_link "$LINENO"; then :
30690
30691	                      # Yes, the default cflags and libs did the trick.
30692	                      FREETYPE2_FOUND=yes
30693	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30694	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30695
30696else
30697
30698	                      FREETYPE2_FOUND=no
30699
30700fi
30701rm -f core conftest.err conftest.$ac_objext \
30702    conftest$ac_exeext conftest.$ac_ext
30703            CXXCFLAGS="$PREV_CXXFLAGS"
30704	    LDFLAGS="$PREV_LDFLAGS"
30705	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30706$as_echo "$FREETYPE2_FOUND" >&6; }
30707            USING_SYSTEM_FT_LIB=true
30708	fi
30709	if test "x$FREETYPE2_FOUND" = xno; then
30710
30711    # Print a helpful message on how to acquire the necessary build dependency.
30712    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30713    MISSING_DEPENDENCY=freetype2
30714    PKGHANDLER_COMMAND=
30715
30716    case $PKGHANDLER in
30717	apt-get)
30718                apt_help     $MISSING_DEPENDENCY ;;
30719    yum)
30720                yum_help     $MISSING_DEPENDENCY ;;
30721	port)
30722                port_help    $MISSING_DEPENDENCY ;;
30723	pkgutil)
30724                pkgutil_help $MISSING_DEPENDENCY ;;
30725	pkgadd)
30726                pkgadd_help  $MISSING_DEPENDENCY ;;
30727    * )
30728      break ;;
30729    esac
30730
30731    if test "x$PKGHANDLER_COMMAND" != x; then
30732        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30733    fi
30734
30735		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30736	fi
30737
30738        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30739            # AC_CHECK_LIB does not support use of cl.exe
30740            PREV_LDFLAGS="$LDFLAGS"
30741            LDFLAGS="$FREETYPE2_LIBS"
30742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30743$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30744if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30745  $as_echo_n "(cached) " >&6
30746else
30747  ac_check_lib_save_LIBS=$LIBS
30748LIBS="-lfreetype  $LIBS"
30749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750/* end confdefs.h.  */
30751
30752/* Override any GCC internal prototype to avoid an error.
30753   Use char because int might match the return type of a GCC
30754   builtin and then its argument prototype would still apply.  */
30755#ifdef __cplusplus
30756extern "C"
30757#endif
30758char FT_Init_FreeType ();
30759int
30760main ()
30761{
30762return FT_Init_FreeType ();
30763  ;
30764  return 0;
30765}
30766_ACEOF
30767if ac_fn_cxx_try_link "$LINENO"; then :
30768  ac_cv_lib_freetype_FT_Init_FreeType=yes
30769else
30770  ac_cv_lib_freetype_FT_Init_FreeType=no
30771fi
30772rm -f core conftest.err conftest.$ac_objext \
30773    conftest$ac_exeext conftest.$ac_ext
30774LIBS=$ac_check_lib_save_LIBS
30775fi
30776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30777$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30778if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30779  FREETYPE2_FOUND=true
30780else
30781  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30782fi
30783
30784            LDFLAGS="$PREV_LDFLAGS"
30785        fi
30786fi
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796###############################################################################
30797#
30798# Check for alsa headers and libraries. Used on Linux/GNU systems.
30799#
30800
30801# Check whether --with-alsa was given.
30802if test "${with_alsa+set}" = set; then :
30803  withval=$with_alsa;
30804fi
30805
30806
30807# Check whether --with-alsa-include was given.
30808if test "${with_alsa_include+set}" = set; then :
30809  withval=$with_alsa_include;
30810fi
30811
30812
30813# Check whether --with-alsa-lib was given.
30814if test "${with_alsa_lib+set}" = set; then :
30815  withval=$with_alsa_lib;
30816fi
30817
30818
30819if test "x$ALSA_NOT_NEEDED" = xyes; then
30820	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30821		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30822$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30823	fi
30824	ALSA_CFLAGS=
30825	ALSA_LIBS=
30826else
30827	ALSA_FOUND=no
30828
30829	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30830	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30831	fi
30832
30833	if test "x${with_alsa}" != x; then
30834	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30835	    ALSA_CFLAGS="-I${with_alsa}/include"
30836	    ALSA_FOUND=yes
30837	fi
30838	if test "x${with_alsa_include}" != x; then
30839	    ALSA_CFLAGS="-I${with_alsa_include}"
30840	    ALSA_FOUND=yes
30841	fi
30842	if test "x${with_alsa_lib}" != x; then
30843	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30844	    ALSA_FOUND=yes
30845	fi
30846	if test "x$ALSA_FOUND" = xno; then
30847
30848
30849    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30850        # Source the builddeps file again, to make sure it uses the latest variables!
30851        . $builddepsfile
30852        # Look for a target and build machine specific resource!
30853        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30854        if test "x$resource" = x; then
30855            # Ok, lets instead look for a target specific resource
30856            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30857        fi
30858        if test "x$resource" = x; then
30859            # Ok, lets instead look for a build specific resource
30860            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30861        fi
30862        if test "x$resource" = x; then
30863            # Ok, lets instead look for a generic resource
30864            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30865            resource=${builddep_alsa}
30866        fi
30867        if test "x$resource" != x; then
30868            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30869$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30870	    # If the resource in the builddeps.conf file is an existing directory,
30871	    # for example /java/linux/cups
30872	    if test -d ${resource}; then
30873	       depdir=${resource}
30874	    else
30875
30876# alsa is for example mymodule
30877# $resource is for example libs/general/libmymod_1_2_3.zip
30878# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30879# $with_builddeps_dir is for example /localhome/builddeps
30880# depdir is the name of the variable into which we store the depdir, eg MYMOD
30881# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30882# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30883    filename=`basename $resource`
30884    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30885    filebase=${filename%%.*}
30886    extension=${filename#*.}
30887    installdir=$with_builddeps_dir/$filebase
30888    if test ! -f $installdir/$filename.unpacked; then
30889        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30890$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30891        if test ! -d $installdir; then
30892            mkdir -p $installdir
30893        fi
30894        if test ! -d $installdir; then
30895            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30896        fi
30897        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30898        touch $tmpfile
30899        if test ! -f $tmpfile; then
30900            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30901        fi
30902
30903    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30904    # $tmpfile is the local file name for the downloaded file.
30905    VALID_TOOL=no
30906    if test "x$BDEPS_FTP" = xwget; then
30907       VALID_TOOL=yes
30908       wget -O $tmpfile $with_builddeps_server/$resource
30909    fi
30910    if test "x$BDEPS_FTP" = xlftp; then
30911       VALID_TOOL=yes
30912       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30913    fi
30914    if test "x$BDEPS_FTP" = xftp; then
30915        VALID_TOOL=yes
30916        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30917        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30918        FTPUSERPWD=${FTPSERVER%%@*}
30919        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30920            FTPUSER=${userpwd%%:*}
30921            FTPPWD=${userpwd#*@}
30922            FTPSERVER=${FTPSERVER#*@}
30923        else
30924            FTPUSER=ftp
30925            FTPPWD=ftp
30926        fi
30927        # the "pass" command does not work on some
30928        # ftp clients (read ftp.exe) but if it works,
30929        # passive mode is better!
30930        (\
30931            echo "user $FTPUSER $FTPPWD"        ;\
30932            echo "pass"                         ;\
30933            echo "bin"                          ;\
30934            echo "get $FTPPATH $tmpfile"              ;\
30935        ) | ftp -in $FTPSERVER
30936    fi
30937    if test "x$VALID_TOOL" != xyes; then
30938       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30939    fi
30940
30941        mv $tmpfile $installdir/$filename
30942        if test ! -s $installdir/$filename; then
30943            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30944        fi
30945        case "$extension" in
30946            zip)  echo "Unzipping $installdir/$filename..."
30947               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30948            ;;
30949            tar.gz) echo "Untaring $installdir/$filename..."
30950               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30951            ;;
30952            tgz) echo "Untaring $installdir/$filename..."
30953               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30954            ;;
30955            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30956            ;;
30957        esac
30958    fi
30959    if test -f $installdir/$filename.unpacked; then
30960        depdir=$installdir
30961    fi
30962
30963	    fi
30964            # Source the builddeps file again, because in the previous command, the depdir
30965            # was updated to point at the current build dependency install directory.
30966            . $builddepsfile
30967            # Now extract variables from the builddeps.conf files.
30968            theroot=${builddep_alsa_ROOT}
30969            thecflags=${builddep_alsa_CFLAGS}
30970            thelibs=${builddep_alsa_LIBS}
30971            if test "x$depdir" = x; then
30972                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30973            fi
30974            ALSA=$depdir
30975            if test "x$theroot" != x; then
30976               ALSA="$theroot"
30977            fi
30978            if test "x$thecflags" != x; then
30979               ALSA_CFLAGS="$thecflags"
30980            fi
30981            if test "x$thelibs" != x; then
30982               ALSA_LIBS="$thelibs"
30983            fi
30984            ALSA_FOUND=yes
30985            else ALSA_FOUND=no
30986
30987        fi
30988        else ALSA_FOUND=no
30989
30990    fi
30991
30992	fi
30993	if test "x$ALSA_FOUND" = xno; then
30994
30995pkg_failed=no
30996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30997$as_echo_n "checking for ALSA... " >&6; }
30998
30999if test -n "$ALSA_CFLAGS"; then
31000    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31001 elif test -n "$PKG_CONFIG"; then
31002    if test -n "$PKG_CONFIG" && \
31003    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31004  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31005  ac_status=$?
31006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31007  test $ac_status = 0; }; then
31008  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31009else
31010  pkg_failed=yes
31011fi
31012 else
31013    pkg_failed=untried
31014fi
31015if test -n "$ALSA_LIBS"; then
31016    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31017 elif test -n "$PKG_CONFIG"; then
31018    if test -n "$PKG_CONFIG" && \
31019    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31020  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31021  ac_status=$?
31022  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31023  test $ac_status = 0; }; then
31024  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31025else
31026  pkg_failed=yes
31027fi
31028 else
31029    pkg_failed=untried
31030fi
31031
31032
31033
31034if test $pkg_failed = yes; then
31035
31036if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31037        _pkg_short_errors_supported=yes
31038else
31039        _pkg_short_errors_supported=no
31040fi
31041        if test $_pkg_short_errors_supported = yes; then
31042	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31043        else
31044	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31045        fi
31046	# Put the nasty error message in config.log where it belongs
31047	echo "$ALSA_PKG_ERRORS" >&5
31048
31049	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31050$as_echo "no" >&6; }
31051                ALSA_FOUND=no
31052elif test $pkg_failed = untried; then
31053	ALSA_FOUND=no
31054else
31055	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31056	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31058$as_echo "yes" >&6; }
31059	ALSA_FOUND=yes
31060fi
31061	fi
31062	if test "x$ALSA_FOUND" = xno; then
31063	    for ac_header in alsa/asoundlib.h
31064do :
31065  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31066if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31067  cat >>confdefs.h <<_ACEOF
31068#define HAVE_ALSA_ASOUNDLIB_H 1
31069_ACEOF
31070 ALSA_FOUND=yes
31071	                      ALSA_CFLAGS=-Iignoreme
31072	                      ALSA_LIBS=-lasound
31073	                      DEFAULT_ALSA=yes
31074else
31075  ALSA_FOUND=no
31076fi
31077
31078done
31079
31080	fi
31081	if test "x$ALSA_FOUND" = xno; then
31082
31083    # Print a helpful message on how to acquire the necessary build dependency.
31084    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31085    MISSING_DEPENDENCY=alsa
31086    PKGHANDLER_COMMAND=
31087
31088    case $PKGHANDLER in
31089	apt-get)
31090                apt_help     $MISSING_DEPENDENCY ;;
31091    yum)
31092                yum_help     $MISSING_DEPENDENCY ;;
31093	port)
31094                port_help    $MISSING_DEPENDENCY ;;
31095	pkgutil)
31096                pkgutil_help $MISSING_DEPENDENCY ;;
31097	pkgadd)
31098                pkgadd_help  $MISSING_DEPENDENCY ;;
31099    * )
31100      break ;;
31101    esac
31102
31103    if test "x$PKGHANDLER_COMMAND" != x; then
31104        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31105    fi
31106
31107	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31108	fi
31109fi
31110
31111
31112
31113
31114
31115
31116
31117###############################################################################
31118#
31119# Check for the jpeg library
31120#
31121
31122USE_EXTERNAL_LIBJPEG=true
31123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31124$as_echo_n "checking for main in -ljpeg... " >&6; }
31125if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31126  $as_echo_n "(cached) " >&6
31127else
31128  ac_check_lib_save_LIBS=$LIBS
31129LIBS="-ljpeg  $LIBS"
31130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31131/* end confdefs.h.  */
31132
31133
31134int
31135main ()
31136{
31137return main ();
31138  ;
31139  return 0;
31140}
31141_ACEOF
31142if ac_fn_cxx_try_link "$LINENO"; then :
31143  ac_cv_lib_jpeg_main=yes
31144else
31145  ac_cv_lib_jpeg_main=no
31146fi
31147rm -f core conftest.err conftest.$ac_objext \
31148    conftest$ac_exeext conftest.$ac_ext
31149LIBS=$ac_check_lib_save_LIBS
31150fi
31151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31152$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31153if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31154  cat >>confdefs.h <<_ACEOF
31155#define HAVE_LIBJPEG 1
31156_ACEOF
31157
31158  LIBS="-ljpeg $LIBS"
31159
31160else
31161   USE_EXTERNAL_LIBJPEG=false
31162               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31163$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31164
31165fi
31166
31167
31168
31169###############################################################################
31170#
31171# Check for the gif library
31172#
31173
31174USE_EXTERNAL_LIBJPEG=true
31175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
31176$as_echo_n "checking for main in -lgif... " >&6; }
31177if test "${ac_cv_lib_gif_main+set}" = set; then :
31178  $as_echo_n "(cached) " >&6
31179else
31180  ac_check_lib_save_LIBS=$LIBS
31181LIBS="-lgif  $LIBS"
31182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31183/* end confdefs.h.  */
31184
31185
31186int
31187main ()
31188{
31189return main ();
31190  ;
31191  return 0;
31192}
31193_ACEOF
31194if ac_fn_cxx_try_link "$LINENO"; then :
31195  ac_cv_lib_gif_main=yes
31196else
31197  ac_cv_lib_gif_main=no
31198fi
31199rm -f core conftest.err conftest.$ac_objext \
31200    conftest$ac_exeext conftest.$ac_ext
31201LIBS=$ac_check_lib_save_LIBS
31202fi
31203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
31204$as_echo "$ac_cv_lib_gif_main" >&6; }
31205if test "x$ac_cv_lib_gif_main" = x""yes; then :
31206  cat >>confdefs.h <<_ACEOF
31207#define HAVE_LIBGIF 1
31208_ACEOF
31209
31210  LIBS="-lgif $LIBS"
31211
31212else
31213   USE_EXTERNAL_LIBGIF=false
31214               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
31215$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
31216
31217fi
31218
31219
31220
31221###############################################################################
31222#
31223# Check for the zlib library
31224#
31225
31226
31227# Check whether --with-zlib was given.
31228if test "${with_zlib+set}" = set; then :
31229  withval=$with_zlib;
31230fi
31231
31232
31233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31234$as_echo_n "checking for compress in -lz... " >&6; }
31235if test "${ac_cv_lib_z_compress+set}" = set; then :
31236  $as_echo_n "(cached) " >&6
31237else
31238  ac_check_lib_save_LIBS=$LIBS
31239LIBS="-lz  $LIBS"
31240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31241/* end confdefs.h.  */
31242
31243/* Override any GCC internal prototype to avoid an error.
31244   Use char because int might match the return type of a GCC
31245   builtin and then its argument prototype would still apply.  */
31246#ifdef __cplusplus
31247extern "C"
31248#endif
31249char compress ();
31250int
31251main ()
31252{
31253return compress ();
31254  ;
31255  return 0;
31256}
31257_ACEOF
31258if ac_fn_cxx_try_link "$LINENO"; then :
31259  ac_cv_lib_z_compress=yes
31260else
31261  ac_cv_lib_z_compress=no
31262fi
31263rm -f core conftest.err conftest.$ac_objext \
31264    conftest$ac_exeext conftest.$ac_ext
31265LIBS=$ac_check_lib_save_LIBS
31266fi
31267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31268$as_echo "$ac_cv_lib_z_compress" >&6; }
31269if test "x$ac_cv_lib_z_compress" = x""yes; then :
31270   ZLIB_FOUND=yes
31271else
31272   ZLIB_FOUND=no
31273fi
31274
31275
31276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31277$as_echo_n "checking for which zlib to use... " >&6; }
31278
31279DEFAULT_ZLIB=bundled
31280if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31281#
31282# On macosx default is system...on others default is
31283#
31284    DEFAULT_ZLIB=system
31285fi
31286
31287if test "x${ZLIB_FOUND}" != "xyes"; then
31288#
31289# If we don't find any system...set default to bundled
31290#
31291    DEFAULT_ZLIB=bundled
31292fi
31293
31294#
31295# If user didn't specify, use DEFAULT_ZLIB
31296#
31297if test "x${with_zlib}" = "x"; then
31298    with_zlib=${DEFAULT_ZLIB}
31299fi
31300
31301if test "x${with_zlib}" = "xbundled"; then
31302    USE_EXTERNAL_LIBZ=false
31303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31304$as_echo "bundled" >&6; }
31305elif test "x${with_zlib}" = "xsystem"; then
31306    if test "x${ZLIB_FOUND}" = "xyes"; then
31307        USE_EXTERNAL_LIBZ=true
31308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31309$as_echo "system" >&6; }
31310    else
31311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31312$as_echo "system not found" >&6; }
31313        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31314    fi
31315else
31316    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31317fi
31318
31319
31320
31321###############################################################################
31322LIBZIP_CAN_USE_MMAP=true
31323
31324
31325
31326###############################################################################
31327#
31328# Check if altzone exists in time.h
31329#
31330
31331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31332/* end confdefs.h.  */
31333#include <time.h>
31334int
31335main ()
31336{
31337return (int)altzone;
31338  ;
31339  return 0;
31340}
31341_ACEOF
31342if ac_fn_cxx_try_link "$LINENO"; then :
31343  has_altzone=yes
31344else
31345  has_altzone=no
31346fi
31347rm -f core conftest.err conftest.$ac_objext \
31348    conftest$ac_exeext conftest.$ac_ext
31349if test "x$has_altzone" = xyes; then
31350
31351$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31352
31353fi
31354
31355###############################################################################
31356#
31357# Check the maths library
31358#
31359
31360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31361$as_echo_n "checking for cos in -lm... " >&6; }
31362if test "${ac_cv_lib_m_cos+set}" = set; then :
31363  $as_echo_n "(cached) " >&6
31364else
31365  ac_check_lib_save_LIBS=$LIBS
31366LIBS="-lm  $LIBS"
31367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31368/* end confdefs.h.  */
31369
31370/* Override any GCC internal prototype to avoid an error.
31371   Use char because int might match the return type of a GCC
31372   builtin and then its argument prototype would still apply.  */
31373#ifdef __cplusplus
31374extern "C"
31375#endif
31376char cos ();
31377int
31378main ()
31379{
31380return cos ();
31381  ;
31382  return 0;
31383}
31384_ACEOF
31385if ac_fn_cxx_try_link "$LINENO"; then :
31386  ac_cv_lib_m_cos=yes
31387else
31388  ac_cv_lib_m_cos=no
31389fi
31390rm -f core conftest.err conftest.$ac_objext \
31391    conftest$ac_exeext conftest.$ac_ext
31392LIBS=$ac_check_lib_save_LIBS
31393fi
31394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31395$as_echo "$ac_cv_lib_m_cos" >&6; }
31396if test "x$ac_cv_lib_m_cos" = x""yes; then :
31397  cat >>confdefs.h <<_ACEOF
31398#define HAVE_LIBM 1
31399_ACEOF
31400
31401  LIBS="-lm $LIBS"
31402
31403else
31404
31405                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31406$as_echo "$as_me: Maths library was not found" >&6;}
31407
31408fi
31409
31410
31411
31412###############################################################################
31413#
31414# Check for libdl.so
31415
31416save_LIBS="$LIBS"
31417LIBS=""
31418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31419$as_echo_n "checking for dlopen in -ldl... " >&6; }
31420if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
31421  $as_echo_n "(cached) " >&6
31422else
31423  ac_check_lib_save_LIBS=$LIBS
31424LIBS="-ldl  $LIBS"
31425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31426/* end confdefs.h.  */
31427
31428/* Override any GCC internal prototype to avoid an error.
31429   Use char because int might match the return type of a GCC
31430   builtin and then its argument prototype would still apply.  */
31431#ifdef __cplusplus
31432extern "C"
31433#endif
31434char dlopen ();
31435int
31436main ()
31437{
31438return dlopen ();
31439  ;
31440  return 0;
31441}
31442_ACEOF
31443if ac_fn_cxx_try_link "$LINENO"; then :
31444  ac_cv_lib_dl_dlopen=yes
31445else
31446  ac_cv_lib_dl_dlopen=no
31447fi
31448rm -f core conftest.err conftest.$ac_objext \
31449    conftest$ac_exeext conftest.$ac_ext
31450LIBS=$ac_check_lib_save_LIBS
31451fi
31452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31453$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31454if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
31455  cat >>confdefs.h <<_ACEOF
31456#define HAVE_LIBDL 1
31457_ACEOF
31458
31459  LIBS="-ldl $LIBS"
31460
31461fi
31462
31463LIBDL="$LIBS"
31464
31465LIBS="$save_LIBS"
31466
31467
31468
31469###############################################################################
31470#
31471# statically link libstdc++ before C++ ABI is stablized on Linux unless
31472# dynamic build is configured on command line.
31473#
31474
31475# Check whether --with-stdc++lib was given.
31476if test "${with_stdc__lib+set}" = set; then :
31477  withval=$with_stdc__lib;
31478    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31479        && test "x$with_stdc__lib" != xdefault; then
31480      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31481    fi
31482
31483else
31484  with_stdc__lib=default
31485
31486fi
31487
31488
31489if test "x$OPENJDK_TARGET_OS" = xlinux; then
31490    # Test if -lstdc++ works.
31491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31492$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31493    ac_ext=cpp
31494ac_cpp='$CXXCPP $CPPFLAGS'
31495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31498
31499    OLD_CXXFLAGS="$CXXFLAGS"
31500    CXXFLAGS="$CXXFLAGS -lstdc++"
31501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31502/* end confdefs.h.  */
31503
31504int
31505main ()
31506{
31507return 0;
31508  ;
31509  return 0;
31510}
31511_ACEOF
31512if ac_fn_cxx_try_link "$LINENO"; then :
31513  has_dynamic_libstdcxx=yes
31514else
31515  has_dynamic_libstdcxx=no
31516fi
31517rm -f core conftest.err conftest.$ac_objext \
31518    conftest$ac_exeext conftest.$ac_ext
31519    CXXFLAGS="$OLD_CXXFLAGS"
31520    ac_ext=cpp
31521ac_cpp='$CXXCPP $CPPFLAGS'
31522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31525
31526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31527$as_echo "$has_dynamic_libstdcxx" >&6; }
31528
31529    # Test if stdc++ can be linked statically.
31530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31531$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31532    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31533    ac_ext=cpp
31534ac_cpp='$CXXCPP $CPPFLAGS'
31535ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31536ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31537ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31538
31539    OLD_LIBS="$LIBS"
31540    OLD_CXX="$CXX"
31541    LIBS="$STATIC_STDCXX_FLAGS"
31542    CXX="$CC"
31543    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31544/* end confdefs.h.  */
31545
31546int
31547main ()
31548{
31549return 0;
31550  ;
31551  return 0;
31552}
31553_ACEOF
31554if ac_fn_cxx_try_link "$LINENO"; then :
31555  has_static_libstdcxx=yes
31556else
31557  has_static_libstdcxx=no
31558fi
31559rm -f core conftest.err conftest.$ac_objext \
31560    conftest$ac_exeext conftest.$ac_ext
31561    LIBS="$OLD_LIBS"
31562    CXX="$OLD_CXX"
31563    ac_ext=cpp
31564ac_cpp='$CXXCPP $CPPFLAGS'
31565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31568
31569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31570$as_echo "$has_static_libstdcxx" >&6; }
31571
31572    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31573        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31574    fi
31575
31576    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31577        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31578    fi
31579
31580    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31581        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31582    fi
31583
31584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31585$as_echo_n "checking how to link with libstdc++... " >&6; }
31586    # If dynamic was requested, it's available since it would fail above otherwise.
31587    # If dynamic wasn't requested, go with static unless it isn't available.
31588    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31589        LIBCXX="$LIBCXX -lstdc++"
31590        LDCXX="$CXX"
31591        STATIC_CXX_SETTING="STATIC_CXX=false"
31592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31593$as_echo "dynamic" >&6; }
31594    else
31595        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31596        LDCXX="$CC"
31597        STATIC_CXX_SETTING="STATIC_CXX=true"
31598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31599$as_echo "static" >&6; }
31600    fi
31601fi
31602
31603
31604# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31605if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31606    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31607fi
31608
31609# TODO better (platform agnostic) test
31610if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31611    LIBCXX="-lstdc++"
31612fi
31613
31614
31615
31616
31617
31618# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31619
31620# When using cygwin or msys, we need a wrapper binary that renames
31621# /cygdrive/c/ arguments into c:/ arguments and peeks into
31622# @files and rewrites these too! This wrapper binary is
31623# called fixpath.
31624FIXPATH=
31625if test "x$OPENJDK_BUILD_OS" = xwindows; then
31626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31627$as_echo_n "checking if fixpath can be created... " >&6; }
31628    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31629    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31630    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31631      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31632      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31633      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31634      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31635    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31636      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31637      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31638
31639      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31640      # @ was chosen as separator to minimize risk of other tools messing around with it
31641      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31642      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31643
31644      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31645    fi
31646    rm -f $OUTPUT_ROOT/fixpath*
31647    cd $OUTPUT_ROOT
31648    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31649    cd $CURDIR
31650
31651    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31653$as_echo "no" >&6; }
31654        cat $OUTPUT_ROOT/fixpath1.log
31655        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31656    fi
31657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31658$as_echo "yes" >&6; }
31659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31660$as_echo_n "checking if fixpath.exe works... " >&6; }
31661    cd $OUTPUT_ROOT
31662    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31663    cd $CURDIR
31664    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31666$as_echo "no" >&6; }
31667        cat $OUTPUT_ROOT/fixpath2.log
31668        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31669    fi
31670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31671$as_echo "yes" >&6; }
31672    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31673fi
31674
31675
31676
31677
31678###############################################################################
31679#
31680# We need to do some final tweaking, when everything else is done.
31681#
31682###############################################################################
31683
31684
31685HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31686
31687
31688# The name of the Service Agent jar.
31689SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31690if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31691  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31692fi
31693
31694
31695
31696
31697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
31698$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
31699
31700if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
31701    ENABLE_INTREE_EC=yes
31702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31703$as_echo "yes" >&6; }
31704else
31705    ENABLE_INTREE_EC=no
31706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31707$as_echo "no" >&6; }
31708fi
31709
31710
31711
31712
31713###############################################################################
31714#
31715# Configure parts of the build that only affect the build performance,
31716# not the result.
31717#
31718###############################################################################
31719
31720
31721  # How many cores do we have on this build system?
31722
31723# Check whether --with-num-cores was given.
31724if test "${with_num_cores+set}" = set; then :
31725  withval=$with_num_cores;
31726fi
31727
31728  if test "x$with_num_cores" = x; then
31729    # The number of cores were not specified, try to probe them.
31730
31731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31732$as_echo_n "checking for number of cores... " >&6; }
31733    NUM_CORES=1
31734    FOUND_CORES=no
31735
31736    if test -f /proc/cpuinfo; then
31737        # Looks like a Linux (or cygwin) system
31738        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31739        FOUND_CORES=yes
31740    elif test -x /usr/sbin/psrinfo; then
31741        # Looks like a Solaris system
31742        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31743        FOUND_CORES=yes
31744    elif test -x /usr/sbin/system_profiler; then
31745        # Looks like a MacOSX system
31746        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31747        FOUND_CORES=yes
31748    elif test -n "$NUMBER_OF_PROCESSORS"; then
31749        # On windows, look in the env
31750        NUM_CORES=$NUMBER_OF_PROCESSORS
31751        FOUND_CORES=yes
31752    fi
31753
31754    if test "x$FOUND_CORES" = xyes; then
31755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31756$as_echo "$NUM_CORES" >&6; }
31757    else
31758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31759$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31761$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31762    fi
31763
31764
31765  else
31766    NUM_CORES=$with_num_cores
31767  fi
31768
31769
31770
31771  # How much memory do we have on this build system?
31772
31773# Check whether --with-memory-size was given.
31774if test "${with_memory_size+set}" = set; then :
31775  withval=$with_memory_size;
31776fi
31777
31778  if test "x$with_memory_size" = x; then
31779    # The memory size was not specified, try to probe it.
31780
31781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31782$as_echo_n "checking for memory size... " >&6; }
31783    # Default to 1024 MB
31784    MEMORY_SIZE=1024
31785    FOUND_MEM=no
31786
31787    if test -f /proc/meminfo; then
31788        # Looks like a Linux (or cygwin) system
31789        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31790        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31791        FOUND_MEM=yes
31792    elif test -x /usr/sbin/prtconf; then
31793        # Looks like a Solaris system
31794        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31795        FOUND_MEM=yes
31796    elif test -x /usr/sbin/system_profiler; then
31797        # Looks like a MacOSX system
31798        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31799        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31800        FOUND_MEM=yes
31801    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31802        # Windows, but without cygwin
31803        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31804        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31805        FOUND_MEM=yes
31806    fi
31807
31808    if test "x$FOUND_MEM" = xyes; then
31809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31810$as_echo "$MEMORY_SIZE MB" >&6; }
31811    else
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31813$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31815$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31816    fi
31817
31818  else
31819    MEMORY_SIZE=$with_memory_size
31820  fi
31821
31822
31823
31824  # Provide a decent default number of parallel jobs for make depending on
31825  # number of cores, amount of memory and machine architecture.
31826
31827# Check whether --with-jobs was given.
31828if test "${with_jobs+set}" = set; then :
31829  withval=$with_jobs;
31830fi
31831
31832  if test "x$with_jobs" = x; then
31833    # Number of jobs was not specified, calculate.
31834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31835$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31836    # Approximate memory in GB, rounding up a bit.
31837    memory_gb=`expr $MEMORY_SIZE / 1100`
31838    # Pick the lowest of memory in gb and number of cores.
31839    if test "$memory_gb" -lt "$NUM_CORES"; then
31840      JOBS="$memory_gb"
31841    else
31842      JOBS="$NUM_CORES"
31843      # On bigger machines, leave some room for other processes to run
31844      if test "$JOBS" -gt "4"; then
31845        JOBS=`expr $JOBS '*' 90 / 100`
31846      fi
31847    fi
31848    # Cap number of jobs to 16
31849    if test "$JOBS" -gt "16"; then
31850      JOBS=16
31851    fi
31852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31853$as_echo "$JOBS" >&6; }
31854  else
31855    JOBS=$with_jobs
31856  fi
31857
31858
31859
31860# Setup smart javac (after cores and memory have been setup)
31861
31862
31863# Check whether --with-sjavac-server-java was given.
31864if test "${with_sjavac_server_java+set}" = set; then :
31865  withval=$with_sjavac_server_java;
31866fi
31867
31868
31869if test "x$with_sjavac_server_java" != x; then
31870    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31871    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31872    if test "x$FOUND_VERSION" = x; then
31873        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31874    fi
31875else
31876    SJAVAC_SERVER_JAVA=""
31877    # Hotspot specific options.
31878
31879    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31880    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31881    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31882    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31883    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31884        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31885    fi
31886
31887    # JRockit specific options.
31888
31889    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31890    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31891    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31892    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31893    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31894        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31895    fi
31896
31897    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31898fi
31899
31900
31901
31902# Check whether --with-sjavac-server-cores was given.
31903if test "${with_sjavac_server_cores+set}" = set; then :
31904  withval=$with_sjavac_server_cores;
31905fi
31906
31907if test "x$with_sjavac_server_cores" != x; then
31908    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31909else
31910    if test "$NUM_CORES" -gt 16; then
31911        # We set this arbitrary limit because we want to limit the heap
31912        # size of the javac server.
31913        # In the future we will make the javac compilers in the server
31914        # share more and more state, thus enabling us to use more and
31915        # more concurrent threads in the server.
31916        SJAVAC_SERVER_CORES="16"
31917    else
31918        SJAVAC_SERVER_CORES="$NUM_CORES"
31919    fi
31920
31921    if test "$MEMORY_SIZE" -gt "17000"; then
31922        MAX_HEAP_MEM=10000
31923
31924    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31925    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31926    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31927    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31928    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31929        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31930    fi
31931
31932
31933    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31934    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31935    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31936    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31937    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31938        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31939    fi
31940
31941    elif test "$MEMORY_SIZE" -gt "10000"; then
31942        MAX_HEAP_MEM=6000
31943
31944    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31945    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31946    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31947    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31948    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31949        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31950    fi
31951
31952
31953    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31954    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31955    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31956    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31957    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31958        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31959    fi
31960
31961    elif test "$MEMORY_SIZE" -gt "5000"; then
31962        MAX_HEAP_MEM=3000
31963
31964    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31965    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31966    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31967    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31968    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31969        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31970    fi
31971
31972
31973    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31974    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31975    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31976    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31977    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31978        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31979    fi
31980
31981    elif test "$MEMORY_SIZE" -gt "3800"; then
31982        MAX_HEAP_MEM=2500
31983
31984    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31985    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31986    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31987    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31988    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31989        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31990    fi
31991
31992    elif test "$MEMORY_SIZE" -gt "1900"; then
31993        MAX_HEAP_MEM=1200
31994
31995    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31996    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31997    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31998    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31999    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32000        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32001    fi
32002
32003    elif test "$MEMORY_SIZE" -gt "1000"; then
32004        MAX_HEAP_MEM=900
32005
32006    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32007    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32008    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32009    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32010    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32011        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32012    fi
32013
32014    else
32015        MAX_HEAP_MEM=512
32016
32017    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32018    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32019    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32020    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32021    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32022        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32023    fi
32024
32025    fi
32026
32027
32028    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32029    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32030    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32031    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32032    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32033        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32034    fi
32035
32036
32037    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32038    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32039    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32040    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32041    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32042        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32043    fi
32044
32045
32046    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32047    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32048    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32049    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32050    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32051        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32052    fi
32053
32054
32055    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32056    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32058$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32059        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32061$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32062    fi
32063fi
32064
32065
32066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32067$as_echo_n "checking whether to use sjavac... " >&6; }
32068# Check whether --enable-sjavac was given.
32069if test "${enable_sjavac+set}" = set; then :
32070  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32071else
32072  ENABLE_SJAVAC='no'
32073fi
32074
32075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32076$as_echo "$ENABLE_SJAVAC" >&6; }
32077
32078
32079if test "x$ENABLE_SJAVAC" = xyes; then
32080    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32081else
32082    SJAVAC_SERVER_DIR=
32083fi
32084
32085
32086
32087
32088# Can the C/C++ compiler use precompiled headers?
32089
32090
32091###############################################################################
32092#
32093# Can the C/C++ compiler use precompiled headers?
32094#
32095# Check whether --enable-precompiled-headers was given.
32096if test "${enable_precompiled_headers+set}" = set; then :
32097  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32098else
32099  ENABLE_PRECOMPH=yes
32100fi
32101
32102
32103USE_PRECOMPILED_HEADER=1
32104if test "x$ENABLE_PRECOMPH" = xno; then
32105    USE_PRECOMPILED_HEADER=0
32106fi
32107
32108if test "x$ENABLE_PRECOMPH" = xyes; then
32109    # Check that the compiler actually supports precomp headers.
32110    if test "x$GCC" = xyes; then
32111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32112$as_echo_n "checking that precompiled headers work... " >&6; }
32113         echo "int alfa();" > conftest.h
32114         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32115         if test ! -f conftest.hpp.gch; then
32116             USE_PRECOMPILED_HEADER=0
32117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32118$as_echo "no" >&6; }
32119         else
32120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32121$as_echo "yes" >&6; }
32122         fi
32123         rm -f conftest.h conftest.hpp.gch
32124    fi
32125fi
32126
32127
32128
32129
32130# Setup use of ccache, if available
32131
32132    # Check whether --enable-ccache was given.
32133if test "${enable_ccache+set}" = set; then :
32134  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32135else
32136  ENABLE_CCACHE=yes
32137fi
32138
32139    if test "x$ENABLE_CCACHE" = xyes; then
32140        # Extract the first word of "ccache", so it can be a program name with args.
32141set dummy ccache; ac_word=$2
32142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32143$as_echo_n "checking for $ac_word... " >&6; }
32144if test "${ac_cv_path_CCACHE+set}" = set; then :
32145  $as_echo_n "(cached) " >&6
32146else
32147  case $CCACHE in
32148  [\\/]* | ?:[\\/]*)
32149  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32150  ;;
32151  *)
32152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32153for as_dir in $PATH
32154do
32155  IFS=$as_save_IFS
32156  test -z "$as_dir" && as_dir=.
32157    for ac_exec_ext in '' $ac_executable_extensions; do
32158  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32159    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32161    break 2
32162  fi
32163done
32164  done
32165IFS=$as_save_IFS
32166
32167  ;;
32168esac
32169fi
32170CCACHE=$ac_cv_path_CCACHE
32171if test -n "$CCACHE"; then
32172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32173$as_echo "$CCACHE" >&6; }
32174else
32175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32176$as_echo "no" >&6; }
32177fi
32178
32179
32180    else
32181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32182$as_echo_n "checking for ccache... " >&6; }
32183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32184$as_echo "explicitly disabled" >&6; }
32185        CCACHE=
32186    fi
32187
32188
32189
32190# Check whether --with-ccache-dir was given.
32191if test "${with_ccache_dir+set}" = set; then :
32192  withval=$with_ccache_dir;
32193fi
32194
32195
32196    if test "x$with_ccache_dir" != x; then
32197        # When using a non home ccache directory, assume the use is to share ccache files
32198        # with other users. Thus change the umask.
32199        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32200    fi
32201    CCACHE_FOUND=""
32202    if test "x$CCACHE" != x; then
32203
32204    if test "x$CCACHE" != x; then
32205        CCACHE_FOUND="true"
32206        # Only use ccache if it is 3.1.4 or later, which supports
32207        # precompiled headers.
32208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32209$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32210        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32211        if test "x$HAS_GOOD_CCACHE" = x; then
32212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32213$as_echo "no, disabling ccache" >&6; }
32214            CCACHE=
32215        else
32216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32217$as_echo "yes" >&6; }
32218            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32219$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32220            PUSHED_FLAGS="$CXXFLAGS"
32221            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32222            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32223/* end confdefs.h.  */
32224
32225int
32226main ()
32227{
32228
32229  ;
32230  return 0;
32231}
32232_ACEOF
32233if ac_fn_cxx_try_compile "$LINENO"; then :
32234  CC_KNOWS_CCACHE_TRICK=yes
32235else
32236  CC_KNOWS_CCACHE_TRICK=no
32237fi
32238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32239            CXXFLAGS="$PUSHED_FLAGS"
32240            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32241                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32242$as_echo "yes" >&6; }
32243            else
32244                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32245$as_echo "no, disabling ccaching of precompiled headers" >&6; }
32246                CCACHE=
32247            fi
32248        fi
32249    fi
32250
32251    if test "x$CCACHE" != x; then
32252        CCACHE_SLOPPINESS=time_macros
32253        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32254        CCACHE_FLAGS=-fpch-preprocess
32255
32256        if test "x$SET_CCACHE_DIR" != x; then
32257            mkdir -p $CCACHE_DIR > /dev/null 2>&1
32258	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32259        fi
32260    fi
32261
32262    fi
32263
32264
32265###############################################################################
32266#
32267# And now the finish...
32268#
32269###############################################################################
32270
32271# Check for some common pitfalls
32272
32273  if test x"$OPENJDK_BUILD_OS" = xwindows; then
32274    file_to_test="$SRC_ROOT/LICENSE"
32275    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32276      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
32277    fi
32278  fi
32279
32280
32281
32282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32283$as_echo_n "checking if build directory is on local disk... " >&6; }
32284
32285	# df -l lists only local disks; if the given directory is not found then
32286	# a non-zero exit code is given
32287  if test "x$DF" = x; then
32288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32289      # msys does not have df; use Windows "net use" instead.
32290      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32291      if test "x$IS_NETWORK_DISK" = x; then
32292        OUTPUT_DIR_IS_LOCAL="yes"
32293      else
32294        OUTPUT_DIR_IS_LOCAL="no"
32295      fi
32296    else
32297      # No df here, say it's local
32298      OUTPUT_DIR_IS_LOCAL="yes"
32299    fi
32300  else
32301    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32302      OUTPUT_DIR_IS_LOCAL="yes"
32303    else
32304      OUTPUT_DIR_IS_LOCAL="no"
32305    fi
32306  fi
32307
32308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32309$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32310
32311
32312
32313# Check if the user has any old-style ALT_ variables set.
32314FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32315
32316# Before generating output files, test if they exist. If they do, this is a reconfigure.
32317# Since we can't properly handle the dependencies for this, warn the user about the situation
32318if test -e $OUTPUT_ROOT/spec.gmk; then
32319  IS_RECONFIGURE=yes
32320else
32321  IS_RECONFIGURE=no
32322fi
32323
32324if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32325  HIDE_PERFORMANCE_HINTS=yes
32326else
32327  HIDE_PERFORMANCE_HINTS=no
32328  # Hide it the next time around...
32329  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32330fi
32331
32332
32333
32334# At the end, call the custom hook. (Dummy macro if no custom sources available)
32335
32336
32337# We're messing a bit with internal autoconf variables to put the config.status
32338# in the output directory instead of the current directory.
32339CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32340# Create the actual output files. Now the main work of configure is done.
32341cat >confcache <<\_ACEOF
32342# This file is a shell script that caches the results of configure
32343# tests run on this system so they can be shared between configure
32344# scripts and configure runs, see configure's option --config-cache.
32345# It is not useful on other systems.  If it contains results you don't
32346# want to keep, you may remove or edit it.
32347#
32348# config.status only pays attention to the cache file if you give it
32349# the --recheck option to rerun configure.
32350#
32351# `ac_cv_env_foo' variables (set or unset) will be overridden when
32352# loading this file, other *unset* `ac_cv_foo' will be assigned the
32353# following values.
32354
32355_ACEOF
32356
32357# The following way of writing the cache mishandles newlines in values,
32358# but we know of no workaround that is simple, portable, and efficient.
32359# So, we kill variables containing newlines.
32360# Ultrix sh set writes to stderr and can't be redirected directly,
32361# and sets the high bit in the cache file unless we assign to the vars.
32362(
32363  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32364    eval ac_val=\$$ac_var
32365    case $ac_val in #(
32366    *${as_nl}*)
32367      case $ac_var in #(
32368      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32369$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32370      esac
32371      case $ac_var in #(
32372      _ | IFS | as_nl) ;; #(
32373      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32374      *) { eval $ac_var=; unset $ac_var;} ;;
32375      esac ;;
32376    esac
32377  done
32378
32379  (set) 2>&1 |
32380    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32381    *${as_nl}ac_space=\ *)
32382      # `set' does not quote correctly, so add quotes: double-quote
32383      # substitution turns \\\\ into \\, and sed turns \\ into \.
32384      sed -n \
32385	"s/'/'\\\\''/g;
32386	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32387      ;; #(
32388    *)
32389      # `set' quotes correctly as required by POSIX, so do not add quotes.
32390      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32391      ;;
32392    esac |
32393    sort
32394) |
32395  sed '
32396     /^ac_cv_env_/b end
32397     t clear
32398     :clear
32399     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32400     t end
32401     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32402     :end' >>confcache
32403if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32404  if test -w "$cache_file"; then
32405    test "x$cache_file" != "x/dev/null" &&
32406      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32407$as_echo "$as_me: updating cache $cache_file" >&6;}
32408    cat confcache >$cache_file
32409  else
32410    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32411$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32412  fi
32413fi
32414rm -f confcache
32415
32416test "x$prefix" = xNONE && prefix=$ac_default_prefix
32417# Let make expand exec_prefix.
32418test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32419
32420DEFS=-DHAVE_CONFIG_H
32421
32422ac_libobjs=
32423ac_ltlibobjs=
32424U=
32425for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32426  # 1. Remove the extension, and $U if already installed.
32427  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32428  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32429  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32430  #    will be set to the directory where LIBOBJS objects are built.
32431  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32432  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32433done
32434LIBOBJS=$ac_libobjs
32435
32436LTLIBOBJS=$ac_ltlibobjs
32437
32438
32439
32440: ${CONFIG_STATUS=./config.status}
32441ac_write_fail=0
32442ac_clean_files_save=$ac_clean_files
32443ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32444{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32445$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32446as_write_fail=0
32447cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32448#! $SHELL
32449# Generated by $as_me.
32450# Run this file to recreate the current configuration.
32451# Compiler output produced by configure, useful for debugging
32452# configure, is in config.log if it exists.
32453
32454debug=false
32455ac_cs_recheck=false
32456ac_cs_silent=false
32457
32458SHELL=\${CONFIG_SHELL-$SHELL}
32459export SHELL
32460_ASEOF
32461cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32462## -------------------- ##
32463## M4sh Initialization. ##
32464## -------------------- ##
32465
32466# Be more Bourne compatible
32467DUALCASE=1; export DUALCASE # for MKS sh
32468if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32469  emulate sh
32470  NULLCMD=:
32471  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32472  # is contrary to our usage.  Disable this feature.
32473  alias -g '${1+"$@"}'='"$@"'
32474  setopt NO_GLOB_SUBST
32475else
32476  case `(set -o) 2>/dev/null` in #(
32477  *posix*) :
32478    set -o posix ;; #(
32479  *) :
32480     ;;
32481esac
32482fi
32483
32484
32485as_nl='
32486'
32487export as_nl
32488# Printing a long string crashes Solaris 7 /usr/bin/printf.
32489as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32490as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32491as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32492# Prefer a ksh shell builtin over an external printf program on Solaris,
32493# but without wasting forks for bash or zsh.
32494if test -z "$BASH_VERSION$ZSH_VERSION" \
32495    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32496  as_echo='print -r --'
32497  as_echo_n='print -rn --'
32498elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32499  as_echo='printf %s\n'
32500  as_echo_n='printf %s'
32501else
32502  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32503    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32504    as_echo_n='/usr/ucb/echo -n'
32505  else
32506    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32507    as_echo_n_body='eval
32508      arg=$1;
32509      case $arg in #(
32510      *"$as_nl"*)
32511	expr "X$arg" : "X\\(.*\\)$as_nl";
32512	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32513      esac;
32514      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32515    '
32516    export as_echo_n_body
32517    as_echo_n='sh -c $as_echo_n_body as_echo'
32518  fi
32519  export as_echo_body
32520  as_echo='sh -c $as_echo_body as_echo'
32521fi
32522
32523# The user is always right.
32524if test "${PATH_SEPARATOR+set}" != set; then
32525  PATH_SEPARATOR=:
32526  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32527    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32528      PATH_SEPARATOR=';'
32529  }
32530fi
32531
32532
32533# IFS
32534# We need space, tab and new line, in precisely that order.  Quoting is
32535# there to prevent editors from complaining about space-tab.
32536# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32537# splitting by setting IFS to empty value.)
32538IFS=" ""	$as_nl"
32539
32540# Find who we are.  Look in the path if we contain no directory separator.
32541case $0 in #((
32542  *[\\/]* ) as_myself=$0 ;;
32543  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32544for as_dir in $PATH
32545do
32546  IFS=$as_save_IFS
32547  test -z "$as_dir" && as_dir=.
32548    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32549  done
32550IFS=$as_save_IFS
32551
32552     ;;
32553esac
32554# We did not find ourselves, most probably we were run as `sh COMMAND'
32555# in which case we are not to be found in the path.
32556if test "x$as_myself" = x; then
32557  as_myself=$0
32558fi
32559if test ! -f "$as_myself"; then
32560  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32561  exit 1
32562fi
32563
32564# Unset variables that we do not need and which cause bugs (e.g. in
32565# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32566# suppresses any "Segmentation fault" message there.  '((' could
32567# trigger a bug in pdksh 5.2.14.
32568for as_var in BASH_ENV ENV MAIL MAILPATH
32569do eval test x\${$as_var+set} = xset \
32570  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32571done
32572PS1='$ '
32573PS2='> '
32574PS4='+ '
32575
32576# NLS nuisances.
32577LC_ALL=C
32578export LC_ALL
32579LANGUAGE=C
32580export LANGUAGE
32581
32582# CDPATH.
32583(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32584
32585
32586# as_fn_error STATUS ERROR [LINENO LOG_FD]
32587# ----------------------------------------
32588# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32589# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32590# script with STATUS, using 1 if that was 0.
32591as_fn_error ()
32592{
32593  as_status=$1; test $as_status -eq 0 && as_status=1
32594  if test "$4"; then
32595    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32596    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32597  fi
32598  $as_echo "$as_me: error: $2" >&2
32599  as_fn_exit $as_status
32600} # as_fn_error
32601
32602
32603# as_fn_set_status STATUS
32604# -----------------------
32605# Set $? to STATUS, without forking.
32606as_fn_set_status ()
32607{
32608  return $1
32609} # as_fn_set_status
32610
32611# as_fn_exit STATUS
32612# -----------------
32613# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32614as_fn_exit ()
32615{
32616  set +e
32617  as_fn_set_status $1
32618  exit $1
32619} # as_fn_exit
32620
32621# as_fn_unset VAR
32622# ---------------
32623# Portably unset VAR.
32624as_fn_unset ()
32625{
32626  { eval $1=; unset $1;}
32627}
32628as_unset=as_fn_unset
32629# as_fn_append VAR VALUE
32630# ----------------------
32631# Append the text in VALUE to the end of the definition contained in VAR. Take
32632# advantage of any shell optimizations that allow amortized linear growth over
32633# repeated appends, instead of the typical quadratic growth present in naive
32634# implementations.
32635if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32636  eval 'as_fn_append ()
32637  {
32638    eval $1+=\$2
32639  }'
32640else
32641  as_fn_append ()
32642  {
32643    eval $1=\$$1\$2
32644  }
32645fi # as_fn_append
32646
32647# as_fn_arith ARG...
32648# ------------------
32649# Perform arithmetic evaluation on the ARGs, and store the result in the
32650# global $as_val. Take advantage of shells that can avoid forks. The arguments
32651# must be portable across $(()) and expr.
32652if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32653  eval 'as_fn_arith ()
32654  {
32655    as_val=$(( $* ))
32656  }'
32657else
32658  as_fn_arith ()
32659  {
32660    as_val=`expr "$@" || test $? -eq 1`
32661  }
32662fi # as_fn_arith
32663
32664
32665if expr a : '\(a\)' >/dev/null 2>&1 &&
32666   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32667  as_expr=expr
32668else
32669  as_expr=false
32670fi
32671
32672if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32673  as_basename=basename
32674else
32675  as_basename=false
32676fi
32677
32678if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32679  as_dirname=dirname
32680else
32681  as_dirname=false
32682fi
32683
32684as_me=`$as_basename -- "$0" ||
32685$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32686	 X"$0" : 'X\(//\)$' \| \
32687	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32688$as_echo X/"$0" |
32689    sed '/^.*\/\([^/][^/]*\)\/*$/{
32690	    s//\1/
32691	    q
32692	  }
32693	  /^X\/\(\/\/\)$/{
32694	    s//\1/
32695	    q
32696	  }
32697	  /^X\/\(\/\).*/{
32698	    s//\1/
32699	    q
32700	  }
32701	  s/.*/./; q'`
32702
32703# Avoid depending upon Character Ranges.
32704as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32705as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32706as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32707as_cr_digits='0123456789'
32708as_cr_alnum=$as_cr_Letters$as_cr_digits
32709
32710ECHO_C= ECHO_N= ECHO_T=
32711case `echo -n x` in #(((((
32712-n*)
32713  case `echo 'xy\c'` in
32714  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32715  xy)  ECHO_C='\c';;
32716  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32717       ECHO_T='	';;
32718  esac;;
32719*)
32720  ECHO_N='-n';;
32721esac
32722
32723rm -f conf$$ conf$$.exe conf$$.file
32724if test -d conf$$.dir; then
32725  rm -f conf$$.dir/conf$$.file
32726else
32727  rm -f conf$$.dir
32728  mkdir conf$$.dir 2>/dev/null
32729fi
32730if (echo >conf$$.file) 2>/dev/null; then
32731  if ln -s conf$$.file conf$$ 2>/dev/null; then
32732    as_ln_s='ln -s'
32733    # ... but there are two gotchas:
32734    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32735    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32736    # In both cases, we have to default to `cp -p'.
32737    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32738      as_ln_s='cp -p'
32739  elif ln conf$$.file conf$$ 2>/dev/null; then
32740    as_ln_s=ln
32741  else
32742    as_ln_s='cp -p'
32743  fi
32744else
32745  as_ln_s='cp -p'
32746fi
32747rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32748rmdir conf$$.dir 2>/dev/null
32749
32750
32751# as_fn_mkdir_p
32752# -------------
32753# Create "$as_dir" as a directory, including parents if necessary.
32754as_fn_mkdir_p ()
32755{
32756
32757  case $as_dir in #(
32758  -*) as_dir=./$as_dir;;
32759  esac
32760  test -d "$as_dir" || eval $as_mkdir_p || {
32761    as_dirs=
32762    while :; do
32763      case $as_dir in #(
32764      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32765      *) as_qdir=$as_dir;;
32766      esac
32767      as_dirs="'$as_qdir' $as_dirs"
32768      as_dir=`$as_dirname -- "$as_dir" ||
32769$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32770	 X"$as_dir" : 'X\(//\)[^/]' \| \
32771	 X"$as_dir" : 'X\(//\)$' \| \
32772	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32773$as_echo X"$as_dir" |
32774    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32775	    s//\1/
32776	    q
32777	  }
32778	  /^X\(\/\/\)[^/].*/{
32779	    s//\1/
32780	    q
32781	  }
32782	  /^X\(\/\/\)$/{
32783	    s//\1/
32784	    q
32785	  }
32786	  /^X\(\/\).*/{
32787	    s//\1/
32788	    q
32789	  }
32790	  s/.*/./; q'`
32791      test -d "$as_dir" && break
32792    done
32793    test -z "$as_dirs" || eval "mkdir $as_dirs"
32794  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32795
32796
32797} # as_fn_mkdir_p
32798if mkdir -p . 2>/dev/null; then
32799  as_mkdir_p='mkdir -p "$as_dir"'
32800else
32801  test -d ./-p && rmdir ./-p
32802  as_mkdir_p=false
32803fi
32804
32805if test -x / >/dev/null 2>&1; then
32806  as_test_x='test -x'
32807else
32808  if ls -dL / >/dev/null 2>&1; then
32809    as_ls_L_option=L
32810  else
32811    as_ls_L_option=
32812  fi
32813  as_test_x='
32814    eval sh -c '\''
32815      if test -d "$1"; then
32816	test -d "$1/.";
32817      else
32818	case $1 in #(
32819	-*)set "./$1";;
32820	esac;
32821	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32822	???[sx]*):;;*)false;;esac;fi
32823    '\'' sh
32824  '
32825fi
32826as_executable_p=$as_test_x
32827
32828# Sed expression to map a string onto a valid CPP name.
32829as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32830
32831# Sed expression to map a string onto a valid variable name.
32832as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32833
32834
32835exec 6>&1
32836## ----------------------------------- ##
32837## Main body of $CONFIG_STATUS script. ##
32838## ----------------------------------- ##
32839_ASEOF
32840test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32841
32842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32843# Save the log message, to keep $0 and so on meaningful, and to
32844# report actual input values of CONFIG_FILES etc. instead of their
32845# values after options handling.
32846ac_log="
32847This file was extended by OpenJDK $as_me jdk8, which was
32848generated by GNU Autoconf 2.67.  Invocation command line was
32849
32850  CONFIG_FILES    = $CONFIG_FILES
32851  CONFIG_HEADERS  = $CONFIG_HEADERS
32852  CONFIG_LINKS    = $CONFIG_LINKS
32853  CONFIG_COMMANDS = $CONFIG_COMMANDS
32854  $ $0 $@
32855
32856on `(hostname || uname -n) 2>/dev/null | sed 1q`
32857"
32858
32859_ACEOF
32860
32861case $ac_config_files in *"
32862"*) set x $ac_config_files; shift; ac_config_files=$*;;
32863esac
32864
32865case $ac_config_headers in *"
32866"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32867esac
32868
32869
32870cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32871# Files that config.status was made for.
32872config_files="$ac_config_files"
32873config_headers="$ac_config_headers"
32874
32875_ACEOF
32876
32877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32878ac_cs_usage="\
32879\`$as_me' instantiates files and other configuration actions
32880from templates according to the current configuration.  Unless the files
32881and actions are specified as TAGs, all are instantiated by default.
32882
32883Usage: $0 [OPTION]... [TAG]...
32884
32885  -h, --help       print this help, then exit
32886  -V, --version    print version number and configuration settings, then exit
32887      --config     print configuration, then exit
32888  -q, --quiet, --silent
32889                   do not print progress messages
32890  -d, --debug      don't remove temporary files
32891      --recheck    update $as_me by reconfiguring in the same conditions
32892      --file=FILE[:TEMPLATE]
32893                   instantiate the configuration file FILE
32894      --header=FILE[:TEMPLATE]
32895                   instantiate the configuration header FILE
32896
32897Configuration files:
32898$config_files
32899
32900Configuration headers:
32901$config_headers
32902
32903Report bugs to <build-dev@openjdk.java.net>.
32904OpenJDK home page: <http://openjdk.java.net>."
32905
32906_ACEOF
32907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32908ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32909ac_cs_version="\\
32910OpenJDK config.status jdk8
32911configured by $0, generated by GNU Autoconf 2.67,
32912  with options \\"\$ac_cs_config\\"
32913
32914Copyright (C) 2010 Free Software Foundation, Inc.
32915This config.status script is free software; the Free Software Foundation
32916gives unlimited permission to copy, distribute and modify it."
32917
32918ac_pwd='$ac_pwd'
32919srcdir='$srcdir'
32920AWK='$AWK'
32921test -n "\$AWK" || AWK=awk
32922_ACEOF
32923
32924cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32925# The default lists apply if the user does not specify any file.
32926ac_need_defaults=:
32927while test $# != 0
32928do
32929  case $1 in
32930  --*=?*)
32931    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32932    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32933    ac_shift=:
32934    ;;
32935  --*=)
32936    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32937    ac_optarg=
32938    ac_shift=:
32939    ;;
32940  *)
32941    ac_option=$1
32942    ac_optarg=$2
32943    ac_shift=shift
32944    ;;
32945  esac
32946
32947  case $ac_option in
32948  # Handling of the options.
32949  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32950    ac_cs_recheck=: ;;
32951  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32952    $as_echo "$ac_cs_version"; exit ;;
32953  --config | --confi | --conf | --con | --co | --c )
32954    $as_echo "$ac_cs_config"; exit ;;
32955  --debug | --debu | --deb | --de | --d | -d )
32956    debug=: ;;
32957  --file | --fil | --fi | --f )
32958    $ac_shift
32959    case $ac_optarg in
32960    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32961    '') as_fn_error $? "missing file argument" ;;
32962    esac
32963    as_fn_append CONFIG_FILES " '$ac_optarg'"
32964    ac_need_defaults=false;;
32965  --header | --heade | --head | --hea )
32966    $ac_shift
32967    case $ac_optarg in
32968    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32969    esac
32970    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32971    ac_need_defaults=false;;
32972  --he | --h)
32973    # Conflict between --help and --header
32974    as_fn_error $? "ambiguous option: \`$1'
32975Try \`$0 --help' for more information.";;
32976  --help | --hel | -h )
32977    $as_echo "$ac_cs_usage"; exit ;;
32978  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32979  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32980    ac_cs_silent=: ;;
32981
32982  # This is an error.
32983  -*) as_fn_error $? "unrecognized option: \`$1'
32984Try \`$0 --help' for more information." ;;
32985
32986  *) as_fn_append ac_config_targets " $1"
32987     ac_need_defaults=false ;;
32988
32989  esac
32990  shift
32991done
32992
32993ac_configure_extra_args=
32994
32995if $ac_cs_silent; then
32996  exec 6>/dev/null
32997  ac_configure_extra_args="$ac_configure_extra_args --silent"
32998fi
32999
33000_ACEOF
33001cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33002if \$ac_cs_recheck; then
33003  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33004  shift
33005  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33006  CONFIG_SHELL='$SHELL'
33007  export CONFIG_SHELL
33008  exec "\$@"
33009fi
33010
33011_ACEOF
33012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33013exec 5>>config.log
33014{
33015  echo
33016  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33017## Running $as_me. ##
33018_ASBOX
33019  $as_echo "$ac_log"
33020} >&5
33021
33022_ACEOF
33023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33024_ACEOF
33025
33026cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33027
33028# Handling of arguments.
33029for ac_config_target in $ac_config_targets
33030do
33031  case $ac_config_target in
33032    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33033    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33034    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33035    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33036    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33037    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33038    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33039
33040  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33041  esac
33042done
33043
33044
33045# If the user did not use the arguments to specify the items to instantiate,
33046# then the envvar interface is used.  Set only those that are not.
33047# We use the long form for the default assignment because of an extremely
33048# bizarre bug on SunOS 4.1.3.
33049if $ac_need_defaults; then
33050  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33051  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33052fi
33053
33054# Have a temporary directory for convenience.  Make it in the build tree
33055# simply because there is no reason against having it here, and in addition,
33056# creating and moving files from /tmp can sometimes cause problems.
33057# Hook for its removal unless debugging.
33058# Note that there is a small window in which the directory will not be cleaned:
33059# after its creation but before its name has been assigned to `$tmp'.
33060$debug ||
33061{
33062  tmp=
33063  trap 'exit_status=$?
33064  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33065' 0
33066  trap 'as_fn_exit 1' 1 2 13 15
33067}
33068# Create a (secure) tmp directory for tmp files.
33069
33070{
33071  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33072  test -n "$tmp" && test -d "$tmp"
33073}  ||
33074{
33075  tmp=./conf$$-$RANDOM
33076  (umask 077 && mkdir "$tmp")
33077} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33078
33079# Set up the scripts for CONFIG_FILES section.
33080# No need to generate them if there are no CONFIG_FILES.
33081# This happens for instance with `./config.status config.h'.
33082if test -n "$CONFIG_FILES"; then
33083
33084
33085ac_cr=`echo X | tr X '\015'`
33086# On cygwin, bash can eat \r inside `` if the user requested igncr.
33087# But we know of no other shell where ac_cr would be empty at this
33088# point, so we can use a bashism as a fallback.
33089if test "x$ac_cr" = x; then
33090  eval ac_cr=\$\'\\r\'
33091fi
33092ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33093if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33094  ac_cs_awk_cr='\\r'
33095else
33096  ac_cs_awk_cr=$ac_cr
33097fi
33098
33099echo 'BEGIN {' >"$tmp/subs1.awk" &&
33100_ACEOF
33101
33102
33103{
33104  echo "cat >conf$$subs.awk <<_ACEOF" &&
33105  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33106  echo "_ACEOF"
33107} >conf$$subs.sh ||
33108  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33109ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33110ac_delim='%!_!# '
33111for ac_last_try in false false false false false :; do
33112  . ./conf$$subs.sh ||
33113    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33114
33115  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33116  if test $ac_delim_n = $ac_delim_num; then
33117    break
33118  elif $ac_last_try; then
33119    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33120  else
33121    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33122  fi
33123done
33124rm -f conf$$subs.sh
33125
33126cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33127cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33128_ACEOF
33129sed -n '
33130h
33131s/^/S["/; s/!.*/"]=/
33132p
33133g
33134s/^[^!]*!//
33135:repl
33136t repl
33137s/'"$ac_delim"'$//
33138t delim
33139:nl
33140h
33141s/\(.\{148\}\)..*/\1/
33142t more1
33143s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33144p
33145n
33146b repl
33147:more1
33148s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33149p
33150g
33151s/.\{148\}//
33152t nl
33153:delim
33154h
33155s/\(.\{148\}\)..*/\1/
33156t more2
33157s/["\\]/\\&/g; s/^/"/; s/$/"/
33158p
33159b
33160:more2
33161s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33162p
33163g
33164s/.\{148\}//
33165t delim
33166' <conf$$subs.awk | sed '
33167/^[^""]/{
33168  N
33169  s/\n//
33170}
33171' >>$CONFIG_STATUS || ac_write_fail=1
33172rm -f conf$$subs.awk
33173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33174_ACAWK
33175cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33176  for (key in S) S_is_set[key] = 1
33177  FS = ""
33178
33179}
33180{
33181  line = $ 0
33182  nfields = split(line, field, "@")
33183  substed = 0
33184  len = length(field[1])
33185  for (i = 2; i < nfields; i++) {
33186    key = field[i]
33187    keylen = length(key)
33188    if (S_is_set[key]) {
33189      value = S[key]
33190      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33191      len += length(value) + length(field[++i])
33192      substed = 1
33193    } else
33194      len += 1 + keylen
33195  }
33196
33197  print line
33198}
33199
33200_ACAWK
33201_ACEOF
33202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33203if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33204  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33205else
33206  cat
33207fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
33208  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33209_ACEOF
33210
33211# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33212# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33213# trailing colons and then remove the whole line if VPATH becomes empty
33214# (actually we leave an empty line to preserve line numbers).
33215if test "x$srcdir" = x.; then
33216  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33217h
33218s///
33219s/^/:/
33220s/[	 ]*$/:/
33221s/:\$(srcdir):/:/g
33222s/:\${srcdir}:/:/g
33223s/:@srcdir@:/:/g
33224s/^:*//
33225s/:*$//
33226x
33227s/\(=[	 ]*\).*/\1/
33228G
33229s/\n//
33230s/^[^=]*=[	 ]*$//
33231}'
33232fi
33233
33234cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33235fi # test -n "$CONFIG_FILES"
33236
33237# Set up the scripts for CONFIG_HEADERS section.
33238# No need to generate them if there are no CONFIG_HEADERS.
33239# This happens for instance with `./config.status Makefile'.
33240if test -n "$CONFIG_HEADERS"; then
33241cat >"$tmp/defines.awk" <<\_ACAWK ||
33242BEGIN {
33243_ACEOF
33244
33245# Transform confdefs.h into an awk script `defines.awk', embedded as
33246# here-document in config.status, that substitutes the proper values into
33247# config.h.in to produce config.h.
33248
33249# Create a delimiter string that does not exist in confdefs.h, to ease
33250# handling of long lines.
33251ac_delim='%!_!# '
33252for ac_last_try in false false :; do
33253  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
33254  if test -z "$ac_t"; then
33255    break
33256  elif $ac_last_try; then
33257    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33258  else
33259    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33260  fi
33261done
33262
33263# For the awk script, D is an array of macro values keyed by name,
33264# likewise P contains macro parameters if any.  Preserve backslash
33265# newline sequences.
33266
33267ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33268sed -n '
33269s/.\{148\}/&'"$ac_delim"'/g
33270t rset
33271:rset
33272s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33273t def
33274d
33275:def
33276s/\\$//
33277t bsnl
33278s/["\\]/\\&/g
33279s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33280D["\1"]=" \3"/p
33281s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33282d
33283:bsnl
33284s/["\\]/\\&/g
33285s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33286D["\1"]=" \3\\\\\\n"\\/p
33287t cont
33288s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33289t cont
33290d
33291:cont
33292n
33293s/.\{148\}/&'"$ac_delim"'/g
33294t clear
33295:clear
33296s/\\$//
33297t bsnlc
33298s/["\\]/\\&/g; s/^/"/; s/$/"/p
33299d
33300:bsnlc
33301s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33302b cont
33303' <confdefs.h | sed '
33304s/'"$ac_delim"'/"\\\
33305"/g' >>$CONFIG_STATUS || ac_write_fail=1
33306
33307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33308  for (key in D) D_is_set[key] = 1
33309  FS = ""
33310}
33311/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33312  line = \$ 0
33313  split(line, arg, " ")
33314  if (arg[1] == "#") {
33315    defundef = arg[2]
33316    mac1 = arg[3]
33317  } else {
33318    defundef = substr(arg[1], 2)
33319    mac1 = arg[2]
33320  }
33321  split(mac1, mac2, "(") #)
33322  macro = mac2[1]
33323  prefix = substr(line, 1, index(line, defundef) - 1)
33324  if (D_is_set[macro]) {
33325    # Preserve the white space surrounding the "#".
33326    print prefix "define", macro P[macro] D[macro]
33327    next
33328  } else {
33329    # Replace #undef with comments.  This is necessary, for example,
33330    # in the case of _POSIX_SOURCE, which is predefined and required
33331    # on some systems where configure will not decide to define it.
33332    if (defundef == "undef") {
33333      print "/*", prefix defundef, macro, "*/"
33334      next
33335    }
33336  }
33337}
33338{ print }
33339_ACAWK
33340_ACEOF
33341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33342  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33343fi # test -n "$CONFIG_HEADERS"
33344
33345
33346eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33347shift
33348for ac_tag
33349do
33350  case $ac_tag in
33351  :[FHLC]) ac_mode=$ac_tag; continue;;
33352  esac
33353  case $ac_mode$ac_tag in
33354  :[FHL]*:*);;
33355  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33356  :[FH]-) ac_tag=-:-;;
33357  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33358  esac
33359  ac_save_IFS=$IFS
33360  IFS=:
33361  set x $ac_tag
33362  IFS=$ac_save_IFS
33363  shift
33364  ac_file=$1
33365  shift
33366
33367  case $ac_mode in
33368  :L) ac_source=$1;;
33369  :[FH])
33370    ac_file_inputs=
33371    for ac_f
33372    do
33373      case $ac_f in
33374      -) ac_f="$tmp/stdin";;
33375      *) # Look for the file first in the build tree, then in the source tree
33376	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33377	 # because $ac_f cannot contain `:'.
33378	 test -f "$ac_f" ||
33379	   case $ac_f in
33380	   [\\/$]*) false;;
33381	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33382	   esac ||
33383	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33384      esac
33385      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33386      as_fn_append ac_file_inputs " '$ac_f'"
33387    done
33388
33389    # Let's still pretend it is `configure' which instantiates (i.e., don't
33390    # use $as_me), people would be surprised to read:
33391    #    /* config.h.  Generated by config.status.  */
33392    configure_input='Generated from '`
33393	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33394	`' by configure.'
33395    if test x"$ac_file" != x-; then
33396      configure_input="$ac_file.  $configure_input"
33397      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33398$as_echo "$as_me: creating $ac_file" >&6;}
33399    fi
33400    # Neutralize special characters interpreted by sed in replacement strings.
33401    case $configure_input in #(
33402    *\&* | *\|* | *\\* )
33403       ac_sed_conf_input=`$as_echo "$configure_input" |
33404       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33405    *) ac_sed_conf_input=$configure_input;;
33406    esac
33407
33408    case $ac_tag in
33409    *:-:* | *:-) cat >"$tmp/stdin" \
33410      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33411    esac
33412    ;;
33413  esac
33414
33415  ac_dir=`$as_dirname -- "$ac_file" ||
33416$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33417	 X"$ac_file" : 'X\(//\)[^/]' \| \
33418	 X"$ac_file" : 'X\(//\)$' \| \
33419	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33420$as_echo X"$ac_file" |
33421    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33422	    s//\1/
33423	    q
33424	  }
33425	  /^X\(\/\/\)[^/].*/{
33426	    s//\1/
33427	    q
33428	  }
33429	  /^X\(\/\/\)$/{
33430	    s//\1/
33431	    q
33432	  }
33433	  /^X\(\/\).*/{
33434	    s//\1/
33435	    q
33436	  }
33437	  s/.*/./; q'`
33438  as_dir="$ac_dir"; as_fn_mkdir_p
33439  ac_builddir=.
33440
33441case "$ac_dir" in
33442.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33443*)
33444  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33445  # A ".." for each directory in $ac_dir_suffix.
33446  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33447  case $ac_top_builddir_sub in
33448  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33449  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33450  esac ;;
33451esac
33452ac_abs_top_builddir=$ac_pwd
33453ac_abs_builddir=$ac_pwd$ac_dir_suffix
33454# for backward compatibility:
33455ac_top_builddir=$ac_top_build_prefix
33456
33457case $srcdir in
33458  .)  # We are building in place.
33459    ac_srcdir=.
33460    ac_top_srcdir=$ac_top_builddir_sub
33461    ac_abs_top_srcdir=$ac_pwd ;;
33462  [\\/]* | ?:[\\/]* )  # Absolute name.
33463    ac_srcdir=$srcdir$ac_dir_suffix;
33464    ac_top_srcdir=$srcdir
33465    ac_abs_top_srcdir=$srcdir ;;
33466  *) # Relative name.
33467    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33468    ac_top_srcdir=$ac_top_build_prefix$srcdir
33469    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33470esac
33471ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33472
33473
33474  case $ac_mode in
33475  :F)
33476  #
33477  # CONFIG_FILE
33478  #
33479
33480_ACEOF
33481
33482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33483# If the template does not know about datarootdir, expand it.
33484# FIXME: This hack should be removed a few years after 2.60.
33485ac_datarootdir_hack=; ac_datarootdir_seen=
33486ac_sed_dataroot='
33487/datarootdir/ {
33488  p
33489  q
33490}
33491/@datadir@/p
33492/@docdir@/p
33493/@infodir@/p
33494/@localedir@/p
33495/@mandir@/p'
33496case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33497*datarootdir*) ac_datarootdir_seen=yes;;
33498*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33499  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33500$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33501_ACEOF
33502cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33503  ac_datarootdir_hack='
33504  s&@datadir@&$datadir&g
33505  s&@docdir@&$docdir&g
33506  s&@infodir@&$infodir&g
33507  s&@localedir@&$localedir&g
33508  s&@mandir@&$mandir&g
33509  s&\\\${datarootdir}&$datarootdir&g' ;;
33510esac
33511_ACEOF
33512
33513# Neutralize VPATH when `$srcdir' = `.'.
33514# Shell code in configure.ac might set extrasub.
33515# FIXME: do we really want to maintain this feature?
33516cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33517ac_sed_extra="$ac_vpsub
33518$extrasub
33519_ACEOF
33520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33521:t
33522/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33523s|@configure_input@|$ac_sed_conf_input|;t t
33524s&@top_builddir@&$ac_top_builddir_sub&;t t
33525s&@top_build_prefix@&$ac_top_build_prefix&;t t
33526s&@srcdir@&$ac_srcdir&;t t
33527s&@abs_srcdir@&$ac_abs_srcdir&;t t
33528s&@top_srcdir@&$ac_top_srcdir&;t t
33529s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33530s&@builddir@&$ac_builddir&;t t
33531s&@abs_builddir@&$ac_abs_builddir&;t t
33532s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33533$ac_datarootdir_hack
33534"
33535eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33536  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33537
33538test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33539  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33540  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33541  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33542which seems to be undefined.  Please make sure it is defined" >&5
33543$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33544which seems to be undefined.  Please make sure it is defined" >&2;}
33545
33546  rm -f "$tmp/stdin"
33547  case $ac_file in
33548  -) cat "$tmp/out" && rm -f "$tmp/out";;
33549  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33550  esac \
33551  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33552 ;;
33553  :H)
33554  #
33555  # CONFIG_HEADER
33556  #
33557  if test x"$ac_file" != x-; then
33558    {
33559      $as_echo "/* $configure_input  */" \
33560      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33561    } >"$tmp/config.h" \
33562      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33563    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33564      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33565$as_echo "$as_me: $ac_file is unchanged" >&6;}
33566    else
33567      rm -f "$ac_file"
33568      mv "$tmp/config.h" "$ac_file" \
33569	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33570    fi
33571  else
33572    $as_echo "/* $configure_input  */" \
33573      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33574      || as_fn_error $? "could not create -" "$LINENO" 5
33575  fi
33576 ;;
33577
33578
33579  esac
33580
33581done # for ac_tag
33582
33583
33584as_fn_exit 0
33585_ACEOF
33586ac_clean_files=$ac_clean_files_save
33587
33588test $ac_write_fail = 0 ||
33589  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33590
33591
33592# configure is writing to config.log, and then calls config.status.
33593# config.status does its own redirection, appending to config.log.
33594# Unfortunately, on DOS this fails, as config.log is still kept open
33595# by configure, so config.status won't be able to write to it; its
33596# output is simply discarded.  So we exec the FD to /dev/null,
33597# effectively closing config.log, so it can be properly (re)opened and
33598# appended to by config.status.  When coming back to configure, we
33599# need to make the FD available again.
33600if test "$no_create" != yes; then
33601  ac_cs_success=:
33602  ac_config_status_args=
33603  test "$silent" = yes &&
33604    ac_config_status_args="$ac_config_status_args --quiet"
33605  exec 5>/dev/null
33606  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33607  exec 5>>config.log
33608  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33609  # would make configure fail if this is the last instruction.
33610  $ac_cs_success || as_fn_exit 1
33611fi
33612if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33613  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33614$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33615fi
33616
33617
33618# Make the compare script executable
33619$CHMOD +x $OUTPUT_ROOT/compare.sh
33620
33621# Finally output some useful information to the user
33622
33623# Finally output some useful information to the user
33624
33625if test "x$CCACHE_FOUND" != x; then
33626	if  test "x$HAS_GOOD_CCACHE" = x; then
33627		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33628		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33629	else
33630		CCACHE_STATUS="installed and in use"
33631	fi
33632else
33633	if test "x$GCC" = xyes; then
33634		CCACHE_STATUS="not installed (consider installing)"
33635		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33636	else
33637		CCACHE_STATUS="not available for your system"
33638	fi
33639fi
33640
33641printf "\n"
33642printf "====================================================\n"
33643printf "A new configuration has been successfully created in\n"
33644printf "$OUTPUT_ROOT\n"
33645if test "x$CONFIGURE_COMMAND_LINE" != x; then
33646	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33647else
33648	printf "using default settings.\n"
33649fi
33650
33651printf "\n"
33652printf "Configuration summary:\n"
33653printf "* Debug level:    $DEBUG_LEVEL\n"
33654printf "* JDK variant:    $JDK_VARIANT\n"
33655printf "* JVM variants:   $with_jvm_variants\n"
33656printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33657
33658printf "\n"
33659printf "Tools summary:\n"
33660if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33661  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33662fi
33663printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33664printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33665printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33666
33667printf "\n"
33668printf "Build performance summary:\n"
33669printf "* Cores to use:   $JOBS\n"
33670printf "* Memory limit:   $MEMORY_SIZE MB\n"
33671printf "* ccache status:  $CCACHE_STATUS\n"
33672printf "\n"
33673
33674if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33675	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33676	printf "$CCACHE_HELP_MSG\n"
33677
33678    # Print a helpful message on how to acquire the necessary build dependency.
33679    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33680    MISSING_DEPENDENCY=ccache
33681    PKGHANDLER_COMMAND=
33682
33683    case $PKGHANDLER in
33684	apt-get)
33685                apt_help     $MISSING_DEPENDENCY ;;
33686    yum)
33687                yum_help     $MISSING_DEPENDENCY ;;
33688	port)
33689                port_help    $MISSING_DEPENDENCY ;;
33690	pkgutil)
33691                pkgutil_help $MISSING_DEPENDENCY ;;
33692	pkgadd)
33693                pkgadd_help  $MISSING_DEPENDENCY ;;
33694    * )
33695      break ;;
33696    esac
33697
33698    if test "x$PKGHANDLER_COMMAND" != x; then
33699        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33700    fi
33701
33702	printf "$HELP_MSG\n"
33703	printf "\n"
33704fi
33705
33706if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33707	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33708	printf "will result in longer build times.\n"
33709	printf "\n"
33710fi
33711
33712if test "x$FOUND_ALT_VARIABLES" != "x"; then
33713	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33714	printf "These are not respected, and will be ignored. It is recommended\n"
33715	printf "that you clean your environment. The following variables are set:\n"
33716	printf "$FOUND_ALT_VARIABLES\n"
33717	printf "\n"
33718fi
33719
33720if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33721	printf "WARNING: Your build output directory is not on a local disk.\n"
33722	printf "This will severely degrade build performance!\n"
33723	printf "It is recommended that you create an output directory on a local disk,\n"
33724	printf "and run the configure script again from that directory.\n"
33725	printf "\n"
33726fi
33727
33728if test "x$IS_RECONFIGURE" = "xyes"; then
33729	printf "WARNING: The result of this configuration has overridden an older\n"
33730	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33731	printf "proper build. Failure to do so might result in strange build problems.\n"
33732	printf "\n"
33733fi
33734
33735