generated-configure.sh revision 602:2a713921952c
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755JDK_VERSION
756COPYRIGHT_YEAR
757MACOSX_BUNDLE_ID_BASE
758MACOSX_BUNDLE_NAME_BASE
759COMPANY_NAME
760JDK_RC_PLATFORM_NAME
761PRODUCT_SUFFIX
762PRODUCT_NAME
763LAUNCHER_NAME
764MILESTONE
765JDK_BUILD_NUMBER
766JDK_UPDATE_VERSION
767JDK_MICRO_VERSION
768JDK_MINOR_VERSION
769JDK_MAJOR_VERSION
770USER_RELEASE_SUFFIX
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778BDEPS_FTP
779BDEPS_UNZIP
780OS_VERSION_MICRO
781OS_VERSION_MINOR
782OS_VERSION_MAJOR
783PKG_CONFIG
784TIME
785STAT
786HG
787READELF
788OTOOL
789LDD
790ZIP
791UNZIP
792FIND_DELETE
793MAKE
794CHECK_TOOLSDIR_MAKE
795CHECK_TOOLSDIR_GMAKE
796CHECK_MAKE
797CHECK_GMAKE
798PKGHANDLER
799OUTPUT_ROOT
800CONF_NAME
801SPEC
802BUILD_VARIANT_RELEASE
803DEBUG_CLASSFILES
804FASTDEBUG
805VARIANT
806DEBUG_LEVEL
807MACOSX_UNIVERSAL
808JVM_VARIANT_ZEROSHARK
809JVM_VARIANT_ZERO
810JVM_VARIANT_KERNEL
811JVM_VARIANT_MINIMAL1
812JVM_VARIANT_CLIENT
813JVM_VARIANT_SERVER
814JVM_VARIANTS
815JDK_VARIANT
816SET_OPENJDK
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CPIO
901CP
902COMM
903CMP
904CHMOD
905CAT
906BASH
907BASENAME
908DATE_WHEN_CONFIGURED
909CONFIGURE_COMMAND_LINE
910CUSTOM_MAKE_DIR
911target_alias
912host_alias
913build_alias
914LIBS
915ECHO_T
916ECHO_N
917ECHO_C
918DEFS
919mandir
920localedir
921libdir
922psdir
923pdfdir
924dvidir
925htmldir
926infodir
927docdir
928oldincludedir
929includedir
930localstatedir
931sharedstatedir
932sysconfdir
933datadir
934datarootdir
935libexecdir
936sbindir
937bindir
938program_transform_name
939prefix
940exec_prefix
941PACKAGE_URL
942PACKAGE_BUGREPORT
943PACKAGE_STRING
944PACKAGE_VERSION
945PACKAGE_TARNAME
946PACKAGE_NAME
947PATH_SEPARATOR
948SHELL'
949ac_subst_files=''
950ac_user_opts='
951enable_option_checking
952with_custom_make_dir
953with_target_bits
954with_sys_root
955with_tools_dir
956with_devkit
957enable_openjdk_only
958with_jdk_variant
959with_jvm_variants
960enable_debug
961with_debug_level
962with_conf_name
963with_builddeps_conf
964with_builddeps_server
965with_builddeps_dir
966with_builddeps_group
967enable_headful
968enable_hotspot_test_in_build
969with_cacerts_file
970enable_unlimited_crypto
971with_milestone
972with_build_number
973with_user_release_suffix
974with_boot_jdk
975with_boot_jdk_jvmargs
976with_add_source_root
977with_override_source_root
978with_adds_and_overrides
979with_override_langtools
980with_override_corba
981with_override_jaxp
982with_override_jaxws
983with_override_hotspot
984with_override_jdk
985with_import_hotspot
986with_msvcr_dll
987with_extra_cflags
988with_extra_cxxflags
989with_extra_ldflags
990enable_debug_symbols
991enable_zip_debug_info
992enable_macosx_runtime_support
993with_x
994with_cups
995with_cups_include
996with_freetype
997with_alsa
998with_alsa_include
999with_alsa_lib
1000with_zlib
1001with_stdc__lib
1002with_num_cores
1003with_memory_size
1004with_sjavac_server_java
1005with_sjavac_server_cores
1006enable_sjavac
1007enable_precompiled_headers
1008enable_ccache
1009with_ccache_dir
1010'
1011      ac_precious_vars='build_alias
1012host_alias
1013target_alias
1014PKG_CONFIG
1015CC
1016CFLAGS
1017LDFLAGS
1018LIBS
1019CPPFLAGS
1020CXX
1021CXXFLAGS
1022CCC
1023OBJC
1024OBJCFLAGS
1025CPP
1026CXXCPP
1027XMKMF
1028FREETYPE2_CFLAGS
1029FREETYPE2_LIBS
1030ALSA_CFLAGS
1031ALSA_LIBS'
1032
1033
1034# Initialize some variables set by options.
1035ac_init_help=
1036ac_init_version=false
1037ac_unrecognized_opts=
1038ac_unrecognized_sep=
1039# The variables have the same names as the options, with
1040# dashes changed to underlines.
1041cache_file=/dev/null
1042exec_prefix=NONE
1043no_create=
1044no_recursion=
1045prefix=NONE
1046program_prefix=NONE
1047program_suffix=NONE
1048program_transform_name=s,x,x,
1049silent=
1050site=
1051srcdir=
1052verbose=
1053x_includes=NONE
1054x_libraries=NONE
1055
1056# Installation directory options.
1057# These are left unexpanded so users can "make install exec_prefix=/foo"
1058# and all the variables that are supposed to be based on exec_prefix
1059# by default will actually change.
1060# Use braces instead of parens because sh, perl, etc. also accept them.
1061# (The list follows the same order as the GNU Coding Standards.)
1062bindir='${exec_prefix}/bin'
1063sbindir='${exec_prefix}/sbin'
1064libexecdir='${exec_prefix}/libexec'
1065datarootdir='${prefix}/share'
1066datadir='${datarootdir}'
1067sysconfdir='${prefix}/etc'
1068sharedstatedir='${prefix}/com'
1069localstatedir='${prefix}/var'
1070includedir='${prefix}/include'
1071oldincludedir='/usr/include'
1072docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1073infodir='${datarootdir}/info'
1074htmldir='${docdir}'
1075dvidir='${docdir}'
1076pdfdir='${docdir}'
1077psdir='${docdir}'
1078libdir='${exec_prefix}/lib'
1079localedir='${datarootdir}/locale'
1080mandir='${datarootdir}/man'
1081
1082ac_prev=
1083ac_dashdash=
1084for ac_option
1085do
1086  # If the previous option needs an argument, assign it.
1087  if test -n "$ac_prev"; then
1088    eval $ac_prev=\$ac_option
1089    ac_prev=
1090    continue
1091  fi
1092
1093  case $ac_option in
1094  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1095  *=)   ac_optarg= ;;
1096  *)    ac_optarg=yes ;;
1097  esac
1098
1099  # Accept the important Cygnus configure options, so we can diagnose typos.
1100
1101  case $ac_dashdash$ac_option in
1102  --)
1103    ac_dashdash=yes ;;
1104
1105  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1106    ac_prev=bindir ;;
1107  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1108    bindir=$ac_optarg ;;
1109
1110  -build | --build | --buil | --bui | --bu)
1111    ac_prev=build_alias ;;
1112  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1113    build_alias=$ac_optarg ;;
1114
1115  -cache-file | --cache-file | --cache-fil | --cache-fi \
1116  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1117    ac_prev=cache_file ;;
1118  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1119  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1120    cache_file=$ac_optarg ;;
1121
1122  --config-cache | -C)
1123    cache_file=config.cache ;;
1124
1125  -datadir | --datadir | --datadi | --datad)
1126    ac_prev=datadir ;;
1127  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1128    datadir=$ac_optarg ;;
1129
1130  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1131  | --dataroo | --dataro | --datar)
1132    ac_prev=datarootdir ;;
1133  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1134  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1135    datarootdir=$ac_optarg ;;
1136
1137  -disable-* | --disable-*)
1138    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1139    # Reject names that are not valid shell variable names.
1140    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141      as_fn_error $? "invalid feature name: $ac_useropt"
1142    ac_useropt_orig=$ac_useropt
1143    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1144    case $ac_user_opts in
1145      *"
1146"enable_$ac_useropt"
1147"*) ;;
1148      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1149	 ac_unrecognized_sep=', ';;
1150    esac
1151    eval enable_$ac_useropt=no ;;
1152
1153  -docdir | --docdir | --docdi | --doc | --do)
1154    ac_prev=docdir ;;
1155  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1156    docdir=$ac_optarg ;;
1157
1158  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1159    ac_prev=dvidir ;;
1160  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1161    dvidir=$ac_optarg ;;
1162
1163  -enable-* | --enable-*)
1164    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1165    # Reject names that are not valid shell variable names.
1166    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1167      as_fn_error $? "invalid feature name: $ac_useropt"
1168    ac_useropt_orig=$ac_useropt
1169    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170    case $ac_user_opts in
1171      *"
1172"enable_$ac_useropt"
1173"*) ;;
1174      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1175	 ac_unrecognized_sep=', ';;
1176    esac
1177    eval enable_$ac_useropt=\$ac_optarg ;;
1178
1179  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1180  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1181  | --exec | --exe | --ex)
1182    ac_prev=exec_prefix ;;
1183  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1184  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1185  | --exec=* | --exe=* | --ex=*)
1186    exec_prefix=$ac_optarg ;;
1187
1188  -gas | --gas | --ga | --g)
1189    # Obsolete; use --with-gas.
1190    with_gas=yes ;;
1191
1192  -help | --help | --hel | --he | -h)
1193    ac_init_help=long ;;
1194  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1195    ac_init_help=recursive ;;
1196  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1197    ac_init_help=short ;;
1198
1199  -host | --host | --hos | --ho)
1200    ac_prev=host_alias ;;
1201  -host=* | --host=* | --hos=* | --ho=*)
1202    host_alias=$ac_optarg ;;
1203
1204  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1205    ac_prev=htmldir ;;
1206  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1207  | --ht=*)
1208    htmldir=$ac_optarg ;;
1209
1210  -includedir | --includedir | --includedi | --included | --include \
1211  | --includ | --inclu | --incl | --inc)
1212    ac_prev=includedir ;;
1213  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1214  | --includ=* | --inclu=* | --incl=* | --inc=*)
1215    includedir=$ac_optarg ;;
1216
1217  -infodir | --infodir | --infodi | --infod | --info | --inf)
1218    ac_prev=infodir ;;
1219  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1220    infodir=$ac_optarg ;;
1221
1222  -libdir | --libdir | --libdi | --libd)
1223    ac_prev=libdir ;;
1224  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1225    libdir=$ac_optarg ;;
1226
1227  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1228  | --libexe | --libex | --libe)
1229    ac_prev=libexecdir ;;
1230  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1231  | --libexe=* | --libex=* | --libe=*)
1232    libexecdir=$ac_optarg ;;
1233
1234  -localedir | --localedir | --localedi | --localed | --locale)
1235    ac_prev=localedir ;;
1236  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1237    localedir=$ac_optarg ;;
1238
1239  -localstatedir | --localstatedir | --localstatedi | --localstated \
1240  | --localstate | --localstat | --localsta | --localst | --locals)
1241    ac_prev=localstatedir ;;
1242  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1243  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1244    localstatedir=$ac_optarg ;;
1245
1246  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1247    ac_prev=mandir ;;
1248  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1249    mandir=$ac_optarg ;;
1250
1251  -nfp | --nfp | --nf)
1252    # Obsolete; use --without-fp.
1253    with_fp=no ;;
1254
1255  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1256  | --no-cr | --no-c | -n)
1257    no_create=yes ;;
1258
1259  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1260  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1261    no_recursion=yes ;;
1262
1263  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1264  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1265  | --oldin | --oldi | --old | --ol | --o)
1266    ac_prev=oldincludedir ;;
1267  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1268  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1269  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1270    oldincludedir=$ac_optarg ;;
1271
1272  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1273    ac_prev=prefix ;;
1274  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1275    prefix=$ac_optarg ;;
1276
1277  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1278  | --program-pre | --program-pr | --program-p)
1279    ac_prev=program_prefix ;;
1280  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1281  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1282    program_prefix=$ac_optarg ;;
1283
1284  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1285  | --program-suf | --program-su | --program-s)
1286    ac_prev=program_suffix ;;
1287  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1288  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1289    program_suffix=$ac_optarg ;;
1290
1291  -program-transform-name | --program-transform-name \
1292  | --program-transform-nam | --program-transform-na \
1293  | --program-transform-n | --program-transform- \
1294  | --program-transform | --program-transfor \
1295  | --program-transfo | --program-transf \
1296  | --program-trans | --program-tran \
1297  | --progr-tra | --program-tr | --program-t)
1298    ac_prev=program_transform_name ;;
1299  -program-transform-name=* | --program-transform-name=* \
1300  | --program-transform-nam=* | --program-transform-na=* \
1301  | --program-transform-n=* | --program-transform-=* \
1302  | --program-transform=* | --program-transfor=* \
1303  | --program-transfo=* | --program-transf=* \
1304  | --program-trans=* | --program-tran=* \
1305  | --progr-tra=* | --program-tr=* | --program-t=*)
1306    program_transform_name=$ac_optarg ;;
1307
1308  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1309    ac_prev=pdfdir ;;
1310  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1311    pdfdir=$ac_optarg ;;
1312
1313  -psdir | --psdir | --psdi | --psd | --ps)
1314    ac_prev=psdir ;;
1315  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1316    psdir=$ac_optarg ;;
1317
1318  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1319  | -silent | --silent | --silen | --sile | --sil)
1320    silent=yes ;;
1321
1322  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1323    ac_prev=sbindir ;;
1324  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1325  | --sbi=* | --sb=*)
1326    sbindir=$ac_optarg ;;
1327
1328  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1329  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1330  | --sharedst | --shareds | --shared | --share | --shar \
1331  | --sha | --sh)
1332    ac_prev=sharedstatedir ;;
1333  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1334  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1335  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1336  | --sha=* | --sh=*)
1337    sharedstatedir=$ac_optarg ;;
1338
1339  -site | --site | --sit)
1340    ac_prev=site ;;
1341  -site=* | --site=* | --sit=*)
1342    site=$ac_optarg ;;
1343
1344  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1345    ac_prev=srcdir ;;
1346  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1347    srcdir=$ac_optarg ;;
1348
1349  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1350  | --syscon | --sysco | --sysc | --sys | --sy)
1351    ac_prev=sysconfdir ;;
1352  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1353  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1354    sysconfdir=$ac_optarg ;;
1355
1356  -target | --target | --targe | --targ | --tar | --ta | --t)
1357    ac_prev=target_alias ;;
1358  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1359    target_alias=$ac_optarg ;;
1360
1361  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1362    verbose=yes ;;
1363
1364  -version | --version | --versio | --versi | --vers | -V)
1365    ac_init_version=: ;;
1366
1367  -with-* | --with-*)
1368    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1369    # Reject names that are not valid shell variable names.
1370    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371      as_fn_error $? "invalid package name: $ac_useropt"
1372    ac_useropt_orig=$ac_useropt
1373    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374    case $ac_user_opts in
1375      *"
1376"with_$ac_useropt"
1377"*) ;;
1378      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1379	 ac_unrecognized_sep=', ';;
1380    esac
1381    eval with_$ac_useropt=\$ac_optarg ;;
1382
1383  -without-* | --without-*)
1384    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1385    # Reject names that are not valid shell variable names.
1386    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1387      as_fn_error $? "invalid package name: $ac_useropt"
1388    ac_useropt_orig=$ac_useropt
1389    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1390    case $ac_user_opts in
1391      *"
1392"with_$ac_useropt"
1393"*) ;;
1394      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1395	 ac_unrecognized_sep=', ';;
1396    esac
1397    eval with_$ac_useropt=no ;;
1398
1399  --x)
1400    # Obsolete; use --with-x.
1401    with_x=yes ;;
1402
1403  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1404  | --x-incl | --x-inc | --x-in | --x-i)
1405    ac_prev=x_includes ;;
1406  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1407  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1408    x_includes=$ac_optarg ;;
1409
1410  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1411  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1412    ac_prev=x_libraries ;;
1413  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1414  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1415    x_libraries=$ac_optarg ;;
1416
1417  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1418Try \`$0 --help' for more information"
1419    ;;
1420
1421  *=*)
1422    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1423    # Reject names that are not valid shell variable names.
1424    case $ac_envvar in #(
1425      '' | [0-9]* | *[!_$as_cr_alnum]* )
1426      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1427    esac
1428    eval $ac_envvar=\$ac_optarg
1429    export $ac_envvar ;;
1430
1431  *)
1432    # FIXME: should be removed in autoconf 3.0.
1433    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1434    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1435      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1436    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1437    ;;
1438
1439  esac
1440done
1441
1442if test -n "$ac_prev"; then
1443  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1444  as_fn_error $? "missing argument to $ac_option"
1445fi
1446
1447if test -n "$ac_unrecognized_opts"; then
1448  case $enable_option_checking in
1449    no) ;;
1450    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1451    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1452  esac
1453fi
1454
1455# Check all directory arguments for consistency.
1456for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1457		datadir sysconfdir sharedstatedir localstatedir includedir \
1458		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1459		libdir localedir mandir
1460do
1461  eval ac_val=\$$ac_var
1462  # Remove trailing slashes.
1463  case $ac_val in
1464    */ )
1465      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1466      eval $ac_var=\$ac_val;;
1467  esac
1468  # Be sure to have absolute directory names.
1469  case $ac_val in
1470    [\\/$]* | ?:[\\/]* )  continue;;
1471    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1472  esac
1473  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1474done
1475
1476# There might be people who depend on the old broken behavior: `$host'
1477# used to hold the argument of --host etc.
1478# FIXME: To remove some day.
1479build=$build_alias
1480host=$host_alias
1481target=$target_alias
1482
1483# FIXME: To remove some day.
1484if test "x$host_alias" != x; then
1485  if test "x$build_alias" = x; then
1486    cross_compiling=maybe
1487    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1488    If a cross compiler is detected then cross compile mode will be used" >&2
1489  elif test "x$build_alias" != "x$host_alias"; then
1490    cross_compiling=yes
1491  fi
1492fi
1493
1494ac_tool_prefix=
1495test -n "$host_alias" && ac_tool_prefix=$host_alias-
1496
1497test "$silent" = yes && exec 6>/dev/null
1498
1499
1500ac_pwd=`pwd` && test -n "$ac_pwd" &&
1501ac_ls_di=`ls -di .` &&
1502ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1503  as_fn_error $? "working directory cannot be determined"
1504test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1505  as_fn_error $? "pwd does not report name of working directory"
1506
1507
1508# Find the source files, if location was not specified.
1509if test -z "$srcdir"; then
1510  ac_srcdir_defaulted=yes
1511  # Try the directory containing this script, then the parent directory.
1512  ac_confdir=`$as_dirname -- "$as_myself" ||
1513$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1514	 X"$as_myself" : 'X\(//\)[^/]' \| \
1515	 X"$as_myself" : 'X\(//\)$' \| \
1516	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1517$as_echo X"$as_myself" |
1518    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1519	    s//\1/
1520	    q
1521	  }
1522	  /^X\(\/\/\)[^/].*/{
1523	    s//\1/
1524	    q
1525	  }
1526	  /^X\(\/\/\)$/{
1527	    s//\1/
1528	    q
1529	  }
1530	  /^X\(\/\).*/{
1531	    s//\1/
1532	    q
1533	  }
1534	  s/.*/./; q'`
1535  srcdir=$ac_confdir
1536  if test ! -r "$srcdir/$ac_unique_file"; then
1537    srcdir=..
1538  fi
1539else
1540  ac_srcdir_defaulted=no
1541fi
1542if test ! -r "$srcdir/$ac_unique_file"; then
1543  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1544  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1545fi
1546ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1547ac_abs_confdir=`(
1548	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1549	pwd)`
1550# When building in place, set srcdir=.
1551if test "$ac_abs_confdir" = "$ac_pwd"; then
1552  srcdir=.
1553fi
1554# Remove unnecessary trailing slashes from srcdir.
1555# Double slashes in file names in object file debugging info
1556# mess up M-x gdb in Emacs.
1557case $srcdir in
1558*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1559esac
1560for ac_var in $ac_precious_vars; do
1561  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1562  eval ac_env_${ac_var}_value=\$${ac_var}
1563  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1564  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1565done
1566
1567#
1568# Report the --help message.
1569#
1570if test "$ac_init_help" = "long"; then
1571  # Omit some internal or obsolete options to make the list less imposing.
1572  # This message is too long to be a string in the A/UX 3.1 sh.
1573  cat <<_ACEOF
1574\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1575
1576Usage: $0 [OPTION]... [VAR=VALUE]...
1577
1578To assign environment variables (e.g., CC, CFLAGS...), specify them as
1579VAR=VALUE.  See below for descriptions of some of the useful variables.
1580
1581Defaults for the options are specified in brackets.
1582
1583Configuration:
1584  -h, --help              display this help and exit
1585      --help=short        display options specific to this package
1586      --help=recursive    display the short help of all the included packages
1587  -V, --version           display version information and exit
1588  -q, --quiet, --silent   do not print \`checking ...' messages
1589      --cache-file=FILE   cache test results in FILE [disabled]
1590  -C, --config-cache      alias for \`--cache-file=config.cache'
1591  -n, --no-create         do not create output files
1592      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1593
1594Installation directories:
1595  --prefix=PREFIX         install architecture-independent files in PREFIX
1596                          [$ac_default_prefix]
1597  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1598                          [PREFIX]
1599
1600By default, \`make install' will install all the files in
1601\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1602an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1603for instance \`--prefix=\$HOME'.
1604
1605For better control, use the options below.
1606
1607Fine tuning of the installation directories:
1608  --bindir=DIR            user executables [EPREFIX/bin]
1609  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1610  --libexecdir=DIR        program executables [EPREFIX/libexec]
1611  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1612  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1613  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1614  --libdir=DIR            object code libraries [EPREFIX/lib]
1615  --includedir=DIR        C header files [PREFIX/include]
1616  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1617  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1618  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1619  --infodir=DIR           info documentation [DATAROOTDIR/info]
1620  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1621  --mandir=DIR            man documentation [DATAROOTDIR/man]
1622  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1623  --htmldir=DIR           html documentation [DOCDIR]
1624  --dvidir=DIR            dvi documentation [DOCDIR]
1625  --pdfdir=DIR            pdf documentation [DOCDIR]
1626  --psdir=DIR             ps documentation [DOCDIR]
1627_ACEOF
1628
1629  cat <<\_ACEOF
1630
1631X features:
1632  --x-includes=DIR    X include files are in DIR
1633  --x-libraries=DIR   X library files are in DIR
1634
1635System types:
1636  --build=BUILD     configure for building on BUILD [guessed]
1637  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1638  --target=TARGET   configure for building compilers for TARGET [HOST]
1639_ACEOF
1640fi
1641
1642if test -n "$ac_init_help"; then
1643  case $ac_init_help in
1644     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1645   esac
1646  cat <<\_ACEOF
1647
1648Optional Features:
1649  --disable-option-checking  ignore unrecognized --enable/--with options
1650  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1651  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1652  --enable-openjdk-only   suppress building custom source even if present
1653                          [disabled]
1654  --enable-debug          set the debug level to fastdebug (shorthand for
1655                          --with-debug-level=fastdebug) [disabled]
1656  --disable-headful       disable building headful support (graphical UI
1657                          support) [enabled]
1658  --enable-hotspot-test-in-build
1659                          run the Queens test after Hotspot build [disabled]
1660  --enable-unlimited-crypto
1661                          Enable unlimited crypto policy [disabled]
1662  --disable-debug-symbols disable generation of debug symbols [enabled]
1663  --disable-zip-debug-info
1664                          disable zipping of debug-info files [enabled]
1665  --disable-macosx-runtime-support
1666                          disable the use of MacOSX Java runtime support
1667                          framework [enabled]
1668  --enable-sjavac         use sjavac to do fast incremental compiles
1669                          [disabled]
1670  --disable-precompiled-headers
1671                          disable using precompiled headers when compiling C++
1672                          [enabled]
1673  --disable-ccache        disable using ccache to speed up recompilations
1674                          [enabled]
1675
1676Optional Packages:
1677  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1678  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1679  --with-custom-make-dir  use this directory for custom build/make files
1680  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1681                          support it), e.g. --with-target-bits=32 [guessed]
1682  --with-sys-root         pass this sys-root to the compilers and tools (for
1683                          cross-compiling)
1684  --with-tools-dir        search this directory for compilers and tools (for
1685                          cross-compiling)
1686  --with-devkit           use this directory as base for tools-dir and
1687                          sys-root (for cross-compiling)
1688  --with-jdk-variant      JDK variant to build (normal) [normal]
1689  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1690                          client, minimal1, kernel, zero, zeroshark) [server]
1691  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1692                          [release]
1693  --with-conf-name        use this as the name of the configuration [generated
1694                          from important configuration options]
1695  --with-builddeps-conf   use this configuration file for the builddeps
1696  --with-builddeps-server download and use build dependencies from this server
1697                          url
1698  --with-builddeps-dir    store downloaded build dependencies here
1699                          [/localhome/builddeps]
1700  --with-builddeps-group  chgrp the downloaded build dependencies to this
1701                          group
1702  --with-cacerts-file     specify alternative cacerts file
1703  --with-milestone        Set milestone value for build [internal]
1704  --with-build-number     Set build number value for build [b00]
1705  --with-user-release-suffix
1706                          Add a custom string to the version string if build
1707                          number isn't set.[username_builddateb00]
1708  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1709  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1710                          invocations of the Boot JDK, overriding the default
1711                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1712                          -enableassertions"
1713  --with-add-source-root  for each and every source directory, look in this
1714                          additional source root for the same directory; if it
1715                          exists and have files in it, include it in the build
1716  --with-override-source-root
1717                          for each and every source directory, look in this
1718                          override source root for the same directory; if it
1719                          exists, use that directory instead and ignore the
1720                          directory in the original source root
1721  --with-adds-and-overrides
1722                          use the subdirs 'adds' and 'overrides' in the
1723                          specified directory as add-source-root and
1724                          override-source-root
1725  --with-override-langtools
1726                          use this langtools dir for the build
1727  --with-override-corba   use this corba dir for the build
1728  --with-override-jaxp    use this jaxp dir for the build
1729  --with-override-jaxws   use this jaxws dir for the build
1730  --with-override-hotspot use this hotspot dir for the build
1731  --with-override-jdk     use this jdk dir for the build
1732  --with-import-hotspot   import hotspot binaries from this jdk image or
1733                          hotspot build dist dir instead of building from
1734                          source
1735  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1736                          only) [probed]
1737  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1738  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1739  --with-extra-ldflags    extra flags to be used when linking jdk
1740  --with-x                use the X Window System
1741  --with-cups             specify prefix directory for the cups package
1742                          (expecting the headers under PATH/include)
1743  --with-cups-include     specify directory for the cups include files
1744  --with-freetype         specify prefix directory for the freetype2 package
1745                          (expecting the libraries under PATH/lib and the
1746                          headers under PATH/include)
1747  --with-alsa             specify prefix directory for the alsa package
1748                          (expecting the libraries under PATH/lib and the
1749                          headers under PATH/include)
1750  --with-alsa-include     specify directory for the alsa include files
1751  --with-alsa-lib         specify directory for the alsa library
1752  --with-zlib             use zlib from build system or OpenJDK source
1753                          (system, bundled) [bundled]
1754  --with-stdc++lib=<static>,<dynamic>,<default>
1755                          force linking of the C++ runtime on Linux to either
1756                          static or dynamic, default is static with dynamic as
1757                          fallback
1758  --with-num-cores        number of cores in the build system, e.g.
1759                          --with-num-cores=8 [probed]
1760  --with-memory-size      memory (in MB) available in the build system, e.g.
1761                          --with-memory-size=1024 [probed]
1762  --with-sjavac-server-java
1763                          use this java binary for running the sjavac
1764                          background server [Boot JDK java]
1765  --with-sjavac-server-cores
1766                          use at most this number of concurrent threads on the
1767                          sjavac server [probed]
1768  --with-ccache-dir       where to store ccache files [~/.ccache]
1769
1770Some influential environment variables:
1771  PKG_CONFIG  path to pkg-config utility
1772  CC          C compiler command
1773  CFLAGS      C compiler flags
1774  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1775              nonstandard directory <lib dir>
1776  LIBS        libraries to pass to the linker, e.g. -l<library>
1777  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1778              you have headers in a nonstandard directory <include dir>
1779  CXX         C++ compiler command
1780  CXXFLAGS    C++ compiler flags
1781  OBJC        Objective C compiler command
1782  OBJCFLAGS   Objective C compiler flags
1783  CPP         C preprocessor
1784  CXXCPP      C++ preprocessor
1785  XMKMF       Path to xmkmf, Makefile generator for X Window System
1786  FREETYPE2_CFLAGS
1787              C compiler flags for FREETYPE2, overriding pkg-config
1788  FREETYPE2_LIBS
1789              linker flags for FREETYPE2, overriding pkg-config
1790  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1791  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1792
1793Use these variables to override the choices made by `configure' or to help
1794it to find libraries and programs with nonstandard names/locations.
1795
1796Report bugs to <build-dev@openjdk.java.net>.
1797OpenJDK home page: <http://openjdk.java.net>.
1798_ACEOF
1799ac_status=$?
1800fi
1801
1802if test "$ac_init_help" = "recursive"; then
1803  # If there are subdirs, report their specific --help.
1804  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1805    test -d "$ac_dir" ||
1806      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1807      continue
1808    ac_builddir=.
1809
1810case "$ac_dir" in
1811.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1812*)
1813  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1814  # A ".." for each directory in $ac_dir_suffix.
1815  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1816  case $ac_top_builddir_sub in
1817  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1818  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1819  esac ;;
1820esac
1821ac_abs_top_builddir=$ac_pwd
1822ac_abs_builddir=$ac_pwd$ac_dir_suffix
1823# for backward compatibility:
1824ac_top_builddir=$ac_top_build_prefix
1825
1826case $srcdir in
1827  .)  # We are building in place.
1828    ac_srcdir=.
1829    ac_top_srcdir=$ac_top_builddir_sub
1830    ac_abs_top_srcdir=$ac_pwd ;;
1831  [\\/]* | ?:[\\/]* )  # Absolute name.
1832    ac_srcdir=$srcdir$ac_dir_suffix;
1833    ac_top_srcdir=$srcdir
1834    ac_abs_top_srcdir=$srcdir ;;
1835  *) # Relative name.
1836    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1837    ac_top_srcdir=$ac_top_build_prefix$srcdir
1838    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1839esac
1840ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1841
1842    cd "$ac_dir" || { ac_status=$?; continue; }
1843    # Check for guested configure.
1844    if test -f "$ac_srcdir/configure.gnu"; then
1845      echo &&
1846      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1847    elif test -f "$ac_srcdir/configure"; then
1848      echo &&
1849      $SHELL "$ac_srcdir/configure" --help=recursive
1850    else
1851      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1852    fi || ac_status=$?
1853    cd "$ac_pwd" || { ac_status=$?; break; }
1854  done
1855fi
1856
1857test -n "$ac_init_help" && exit $ac_status
1858if $ac_init_version; then
1859  cat <<\_ACEOF
1860OpenJDK configure jdk8
1861generated by GNU Autoconf 2.67
1862
1863Copyright (C) 2010 Free Software Foundation, Inc.
1864This configure script is free software; the Free Software Foundation
1865gives unlimited permission to copy, distribute and modify it.
1866_ACEOF
1867  exit
1868fi
1869
1870## ------------------------ ##
1871## Autoconf initialization. ##
1872## ------------------------ ##
1873
1874# ac_fn_c_try_compile LINENO
1875# --------------------------
1876# Try to compile conftest.$ac_ext, and return whether this succeeded.
1877ac_fn_c_try_compile ()
1878{
1879  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880  rm -f conftest.$ac_objext
1881  if { { ac_try="$ac_compile"
1882case "(($ac_try" in
1883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884  *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888  (eval "$ac_compile") 2>conftest.err
1889  ac_status=$?
1890  if test -s conftest.err; then
1891    grep -v '^ *+' conftest.err >conftest.er1
1892    cat conftest.er1 >&5
1893    mv -f conftest.er1 conftest.err
1894  fi
1895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896  test $ac_status = 0; } && {
1897	 test -z "$ac_c_werror_flag" ||
1898	 test ! -s conftest.err
1899       } && test -s conftest.$ac_objext; then :
1900  ac_retval=0
1901else
1902  $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905	ac_retval=1
1906fi
1907  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908  as_fn_set_status $ac_retval
1909
1910} # ac_fn_c_try_compile
1911
1912# ac_fn_cxx_try_compile LINENO
1913# ----------------------------
1914# Try to compile conftest.$ac_ext, and return whether this succeeded.
1915ac_fn_cxx_try_compile ()
1916{
1917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918  rm -f conftest.$ac_objext
1919  if { { ac_try="$ac_compile"
1920case "(($ac_try" in
1921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922  *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926  (eval "$ac_compile") 2>conftest.err
1927  ac_status=$?
1928  if test -s conftest.err; then
1929    grep -v '^ *+' conftest.err >conftest.er1
1930    cat conftest.er1 >&5
1931    mv -f conftest.er1 conftest.err
1932  fi
1933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934  test $ac_status = 0; } && {
1935	 test -z "$ac_cxx_werror_flag" ||
1936	 test ! -s conftest.err
1937       } && test -s conftest.$ac_objext; then :
1938  ac_retval=0
1939else
1940  $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943	ac_retval=1
1944fi
1945  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946  as_fn_set_status $ac_retval
1947
1948} # ac_fn_cxx_try_compile
1949
1950# ac_fn_objc_try_compile LINENO
1951# -----------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_objc_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_objc_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_objc_try_compile
1987
1988# ac_fn_c_try_cpp LINENO
1989# ----------------------
1990# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_c_try_cpp ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  if { { ac_try="$ac_cpp conftest.$ac_ext"
1995case "(($ac_try" in
1996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997  *) ac_try_echo=$ac_try;;
1998esac
1999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000$as_echo "$ac_try_echo"; } >&5
2001  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2002  ac_status=$?
2003  if test -s conftest.err; then
2004    grep -v '^ *+' conftest.err >conftest.er1
2005    cat conftest.er1 >&5
2006    mv -f conftest.er1 conftest.err
2007  fi
2008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009  test $ac_status = 0; } > conftest.i && {
2010	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2011	 test ! -s conftest.err
2012       }; then :
2013  ac_retval=0
2014else
2015  $as_echo "$as_me: failed program was:" >&5
2016sed 's/^/| /' conftest.$ac_ext >&5
2017
2018    ac_retval=1
2019fi
2020  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2021  as_fn_set_status $ac_retval
2022
2023} # ac_fn_c_try_cpp
2024
2025# ac_fn_cxx_try_cpp LINENO
2026# ------------------------
2027# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_cxx_try_cpp ()
2029{
2030  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031  if { { ac_try="$ac_cpp conftest.$ac_ext"
2032case "(($ac_try" in
2033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034  *) ac_try_echo=$ac_try;;
2035esac
2036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037$as_echo "$ac_try_echo"; } >&5
2038  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2039  ac_status=$?
2040  if test -s conftest.err; then
2041    grep -v '^ *+' conftest.err >conftest.er1
2042    cat conftest.er1 >&5
2043    mv -f conftest.er1 conftest.err
2044  fi
2045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046  test $ac_status = 0; } > conftest.i && {
2047	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2048	 test ! -s conftest.err
2049       }; then :
2050  ac_retval=0
2051else
2052  $as_echo "$as_me: failed program was:" >&5
2053sed 's/^/| /' conftest.$ac_ext >&5
2054
2055    ac_retval=1
2056fi
2057  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058  as_fn_set_status $ac_retval
2059
2060} # ac_fn_cxx_try_cpp
2061
2062# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2063# ---------------------------------------------------------
2064# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2065# the include files in INCLUDES and setting the cache variable VAR
2066# accordingly.
2067ac_fn_cxx_check_header_mongrel ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if eval "test \"\${$3+set}\"" = set; then :
2071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2072$as_echo_n "checking for $2... " >&6; }
2073if eval "test \"\${$3+set}\"" = set; then :
2074  $as_echo_n "(cached) " >&6
2075fi
2076eval ac_res=\$$3
2077	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
2079else
2080  # Is the header compilable?
2081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2082$as_echo_n "checking $2 usability... " >&6; }
2083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h.  */
2085$4
2086#include <$2>
2087_ACEOF
2088if ac_fn_cxx_try_compile "$LINENO"; then :
2089  ac_header_compiler=yes
2090else
2091  ac_header_compiler=no
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2095$as_echo "$ac_header_compiler" >&6; }
2096
2097# Is the header present?
2098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2099$as_echo_n "checking $2 presence... " >&6; }
2100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h.  */
2102#include <$2>
2103_ACEOF
2104if ac_fn_cxx_try_cpp "$LINENO"; then :
2105  ac_header_preproc=yes
2106else
2107  ac_header_preproc=no
2108fi
2109rm -f conftest.err conftest.i conftest.$ac_ext
2110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2111$as_echo "$ac_header_preproc" >&6; }
2112
2113# So?  What about this header?
2114case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2115  yes:no: )
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2117$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2119$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2120    ;;
2121  no:yes:* )
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2123$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2125$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2127$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2129$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2131$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2132( $as_echo "## ----------------------------------------- ##
2133## Report this to build-dev@openjdk.java.net ##
2134## ----------------------------------------- ##"
2135     ) | sed "s/^/$as_me: WARNING:     /" >&2
2136    ;;
2137esac
2138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139$as_echo_n "checking for $2... " >&6; }
2140if eval "test \"\${$3+set}\"" = set; then :
2141  $as_echo_n "(cached) " >&6
2142else
2143  eval "$3=\$ac_header_compiler"
2144fi
2145eval ac_res=\$$3
2146	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147$as_echo "$ac_res" >&6; }
2148fi
2149  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2150
2151} # ac_fn_cxx_check_header_mongrel
2152
2153# ac_fn_cxx_try_run LINENO
2154# ------------------------
2155# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2156# that executables *can* be run.
2157ac_fn_cxx_try_run ()
2158{
2159  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2160  if { { ac_try="$ac_link"
2161case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_link") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2171  { { case "(($ac_try" in
2172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2173  *) ac_try_echo=$ac_try;;
2174esac
2175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2176$as_echo "$ac_try_echo"; } >&5
2177  (eval "$ac_try") 2>&5
2178  ac_status=$?
2179  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2180  test $ac_status = 0; }; }; then :
2181  ac_retval=0
2182else
2183  $as_echo "$as_me: program exited with status $ac_status" >&5
2184       $as_echo "$as_me: failed program was:" >&5
2185sed 's/^/| /' conftest.$ac_ext >&5
2186
2187       ac_retval=$ac_status
2188fi
2189  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2190  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2191  as_fn_set_status $ac_retval
2192
2193} # ac_fn_cxx_try_run
2194
2195# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2196# ---------------------------------------------------------
2197# Tests whether HEADER exists and can be compiled using the include files in
2198# INCLUDES, setting the cache variable VAR accordingly.
2199ac_fn_cxx_check_header_compile ()
2200{
2201  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203$as_echo_n "checking for $2... " >&6; }
2204if eval "test \"\${$3+set}\"" = set; then :
2205  $as_echo_n "(cached) " >&6
2206else
2207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h.  */
2209$4
2210#include <$2>
2211_ACEOF
2212if ac_fn_cxx_try_compile "$LINENO"; then :
2213  eval "$3=yes"
2214else
2215  eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
2222  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2223
2224} # ac_fn_cxx_check_header_compile
2225
2226# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2227# ----------------------------------------------
2228# Tries to find the compile-time value of EXPR in a program that includes
2229# INCLUDES, setting VAR accordingly. Returns whether the value could be
2230# computed
2231ac_fn_cxx_compute_int ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  if test "$cross_compiling" = yes; then
2235    # Depending upon the size, compute the lo and hi bounds.
2236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237/* end confdefs.h.  */
2238$4
2239int
2240main ()
2241{
2242static int test_array [1 - 2 * !(($2) >= 0)];
2243test_array [0] = 0
2244
2245  ;
2246  return 0;
2247}
2248_ACEOF
2249if ac_fn_cxx_try_compile "$LINENO"; then :
2250  ac_lo=0 ac_mid=0
2251  while :; do
2252    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h.  */
2254$4
2255int
2256main ()
2257{
2258static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2259test_array [0] = 0
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_cxx_try_compile "$LINENO"; then :
2266  ac_hi=$ac_mid; break
2267else
2268  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2269			if test $ac_lo -le $ac_mid; then
2270			  ac_lo= ac_hi=
2271			  break
2272			fi
2273			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276  done
2277else
2278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279/* end confdefs.h.  */
2280$4
2281int
2282main ()
2283{
2284static int test_array [1 - 2 * !(($2) < 0)];
2285test_array [0] = 0
2286
2287  ;
2288  return 0;
2289}
2290_ACEOF
2291if ac_fn_cxx_try_compile "$LINENO"; then :
2292  ac_hi=-1 ac_mid=-1
2293  while :; do
2294    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h.  */
2296$4
2297int
2298main ()
2299{
2300static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2301test_array [0] = 0
2302
2303  ;
2304  return 0;
2305}
2306_ACEOF
2307if ac_fn_cxx_try_compile "$LINENO"; then :
2308  ac_lo=$ac_mid; break
2309else
2310  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2311			if test $ac_mid -le $ac_hi; then
2312			  ac_lo= ac_hi=
2313			  break
2314			fi
2315			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318  done
2319else
2320  ac_lo= ac_hi=
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325# Binary search between lo and hi bounds.
2326while test "x$ac_lo" != "x$ac_hi"; do
2327  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330$4
2331int
2332main ()
2333{
2334static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2335test_array [0] = 0
2336
2337  ;
2338  return 0;
2339}
2340_ACEOF
2341if ac_fn_cxx_try_compile "$LINENO"; then :
2342  ac_hi=$ac_mid
2343else
2344  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347done
2348case $ac_lo in #((
2349?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2350'') ac_retval=1 ;;
2351esac
2352  else
2353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h.  */
2355$4
2356static long int longval () { return $2; }
2357static unsigned long int ulongval () { return $2; }
2358#include <stdio.h>
2359#include <stdlib.h>
2360int
2361main ()
2362{
2363
2364  FILE *f = fopen ("conftest.val", "w");
2365  if (! f)
2366    return 1;
2367  if (($2) < 0)
2368    {
2369      long int i = longval ();
2370      if (i != ($2))
2371	return 1;
2372      fprintf (f, "%ld", i);
2373    }
2374  else
2375    {
2376      unsigned long int i = ulongval ();
2377      if (i != ($2))
2378	return 1;
2379      fprintf (f, "%lu", i);
2380    }
2381  /* Do not output a trailing newline, as this causes \r\n confusion
2382     on some platforms.  */
2383  return ferror (f) || fclose (f) != 0;
2384
2385  ;
2386  return 0;
2387}
2388_ACEOF
2389if ac_fn_cxx_try_run "$LINENO"; then :
2390  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2391else
2392  ac_retval=1
2393fi
2394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2395  conftest.$ac_objext conftest.beam conftest.$ac_ext
2396rm -f conftest.val
2397
2398  fi
2399  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2400  as_fn_set_status $ac_retval
2401
2402} # ac_fn_cxx_compute_int
2403
2404# ac_fn_cxx_try_link LINENO
2405# -------------------------
2406# Try to link conftest.$ac_ext, and return whether this succeeded.
2407ac_fn_cxx_try_link ()
2408{
2409  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410  rm -f conftest.$ac_objext conftest$ac_exeext
2411  if { { ac_try="$ac_link"
2412case "(($ac_try" in
2413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2414  *) ac_try_echo=$ac_try;;
2415esac
2416eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2417$as_echo "$ac_try_echo"; } >&5
2418  (eval "$ac_link") 2>conftest.err
2419  ac_status=$?
2420  if test -s conftest.err; then
2421    grep -v '^ *+' conftest.err >conftest.er1
2422    cat conftest.er1 >&5
2423    mv -f conftest.er1 conftest.err
2424  fi
2425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2426  test $ac_status = 0; } && {
2427	 test -z "$ac_cxx_werror_flag" ||
2428	 test ! -s conftest.err
2429       } && test -s conftest$ac_exeext && {
2430	 test "$cross_compiling" = yes ||
2431	 $as_test_x conftest$ac_exeext
2432       }; then :
2433  ac_retval=0
2434else
2435  $as_echo "$as_me: failed program was:" >&5
2436sed 's/^/| /' conftest.$ac_ext >&5
2437
2438	ac_retval=1
2439fi
2440  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2441  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2442  # interfere with the next link command; also delete a directory that is
2443  # left behind by Apple's compiler.  We do this before executing the actions.
2444  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2445  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_cxx_try_link
2449
2450# ac_fn_cxx_check_func LINENO FUNC VAR
2451# ------------------------------------
2452# Tests whether FUNC exists, setting the cache variable VAR accordingly
2453ac_fn_cxx_check_func ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2457$as_echo_n "checking for $2... " >&6; }
2458if eval "test \"\${$3+set}\"" = set; then :
2459  $as_echo_n "(cached) " >&6
2460else
2461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462/* end confdefs.h.  */
2463/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2464   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2465#define $2 innocuous_$2
2466
2467/* System header to define __stub macros and hopefully few prototypes,
2468    which can conflict with char $2 (); below.
2469    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2470    <limits.h> exists even on freestanding compilers.  */
2471
2472#ifdef __STDC__
2473# include <limits.h>
2474#else
2475# include <assert.h>
2476#endif
2477
2478#undef $2
2479
2480/* Override any GCC internal prototype to avoid an error.
2481   Use char because int might match the return type of a GCC
2482   builtin and then its argument prototype would still apply.  */
2483#ifdef __cplusplus
2484extern "C"
2485#endif
2486char $2 ();
2487/* The GNU C library defines this for functions which it implements
2488    to always fail with ENOSYS.  Some functions are actually named
2489    something starting with __ and the normal name is an alias.  */
2490#if defined __stub_$2 || defined __stub___$2
2491choke me
2492#endif
2493
2494int
2495main ()
2496{
2497return $2 ();
2498  ;
2499  return 0;
2500}
2501_ACEOF
2502if ac_fn_cxx_try_link "$LINENO"; then :
2503  eval "$3=yes"
2504else
2505  eval "$3=no"
2506fi
2507rm -f core conftest.err conftest.$ac_objext \
2508    conftest$ac_exeext conftest.$ac_ext
2509fi
2510eval ac_res=\$$3
2511	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2514
2515} # ac_fn_cxx_check_func
2516
2517# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2518# -------------------------------------------------------
2519# Tests whether HEADER exists and can be compiled using the include files in
2520# INCLUDES, setting the cache variable VAR accordingly.
2521ac_fn_c_check_header_compile ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2525$as_echo_n "checking for $2... " >&6; }
2526if eval "test \"\${$3+set}\"" = set; then :
2527  $as_echo_n "(cached) " >&6
2528else
2529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2530/* end confdefs.h.  */
2531$4
2532#include <$2>
2533_ACEOF
2534if ac_fn_c_try_compile "$LINENO"; then :
2535  eval "$3=yes"
2536else
2537  eval "$3=no"
2538fi
2539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2540fi
2541eval ac_res=\$$3
2542	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2543$as_echo "$ac_res" >&6; }
2544  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2545
2546} # ac_fn_c_check_header_compile
2547cat >config.log <<_ACEOF
2548This file contains any messages produced by compilers while
2549running configure, to aid debugging if configure makes a mistake.
2550
2551It was created by OpenJDK $as_me jdk8, which was
2552generated by GNU Autoconf 2.67.  Invocation command line was
2553
2554  $ $0 $@
2555
2556_ACEOF
2557exec 5>>config.log
2558{
2559cat <<_ASUNAME
2560## --------- ##
2561## Platform. ##
2562## --------- ##
2563
2564hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2565uname -m = `(uname -m) 2>/dev/null || echo unknown`
2566uname -r = `(uname -r) 2>/dev/null || echo unknown`
2567uname -s = `(uname -s) 2>/dev/null || echo unknown`
2568uname -v = `(uname -v) 2>/dev/null || echo unknown`
2569
2570/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2571/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2572
2573/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2574/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2575/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2576/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2577/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2578/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2579/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2580
2581_ASUNAME
2582
2583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2584for as_dir in $PATH
2585do
2586  IFS=$as_save_IFS
2587  test -z "$as_dir" && as_dir=.
2588    $as_echo "PATH: $as_dir"
2589  done
2590IFS=$as_save_IFS
2591
2592} >&5
2593
2594cat >&5 <<_ACEOF
2595
2596
2597## ----------- ##
2598## Core tests. ##
2599## ----------- ##
2600
2601_ACEOF
2602
2603
2604# Keep a trace of the command line.
2605# Strip out --no-create and --no-recursion so they do not pile up.
2606# Strip out --silent because we don't want to record it for future runs.
2607# Also quote any args containing shell meta-characters.
2608# Make two passes to allow for proper duplicate-argument suppression.
2609ac_configure_args=
2610ac_configure_args0=
2611ac_configure_args1=
2612ac_must_keep_next=false
2613for ac_pass in 1 2
2614do
2615  for ac_arg
2616  do
2617    case $ac_arg in
2618    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2619    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2620    | -silent | --silent | --silen | --sile | --sil)
2621      continue ;;
2622    *\'*)
2623      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2624    esac
2625    case $ac_pass in
2626    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2627    2)
2628      as_fn_append ac_configure_args1 " '$ac_arg'"
2629      if test $ac_must_keep_next = true; then
2630	ac_must_keep_next=false # Got value, back to normal.
2631      else
2632	case $ac_arg in
2633	  *=* | --config-cache | -C | -disable-* | --disable-* \
2634	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2635	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2636	  | -with-* | --with-* | -without-* | --without-* | --x)
2637	    case "$ac_configure_args0 " in
2638	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2639	    esac
2640	    ;;
2641	  -* ) ac_must_keep_next=true ;;
2642	esac
2643      fi
2644      as_fn_append ac_configure_args " '$ac_arg'"
2645      ;;
2646    esac
2647  done
2648done
2649{ ac_configure_args0=; unset ac_configure_args0;}
2650{ ac_configure_args1=; unset ac_configure_args1;}
2651
2652# When interrupted or exit'd, cleanup temporary files, and complete
2653# config.log.  We remove comments because anyway the quotes in there
2654# would cause problems or look ugly.
2655# WARNING: Use '\'' to represent an apostrophe within the trap.
2656# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2657trap 'exit_status=$?
2658  # Save into config.log some information that might help in debugging.
2659  {
2660    echo
2661
2662    $as_echo "## ---------------- ##
2663## Cache variables. ##
2664## ---------------- ##"
2665    echo
2666    # The following way of writing the cache mishandles newlines in values,
2667(
2668  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2669    eval ac_val=\$$ac_var
2670    case $ac_val in #(
2671    *${as_nl}*)
2672      case $ac_var in #(
2673      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2674$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2675      esac
2676      case $ac_var in #(
2677      _ | IFS | as_nl) ;; #(
2678      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2679      *) { eval $ac_var=; unset $ac_var;} ;;
2680      esac ;;
2681    esac
2682  done
2683  (set) 2>&1 |
2684    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2685    *${as_nl}ac_space=\ *)
2686      sed -n \
2687	"s/'\''/'\''\\\\'\'''\''/g;
2688	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2689      ;; #(
2690    *)
2691      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2692      ;;
2693    esac |
2694    sort
2695)
2696    echo
2697
2698    $as_echo "## ----------------- ##
2699## Output variables. ##
2700## ----------------- ##"
2701    echo
2702    for ac_var in $ac_subst_vars
2703    do
2704      eval ac_val=\$$ac_var
2705      case $ac_val in
2706      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2707      esac
2708      $as_echo "$ac_var='\''$ac_val'\''"
2709    done | sort
2710    echo
2711
2712    if test -n "$ac_subst_files"; then
2713      $as_echo "## ------------------- ##
2714## File substitutions. ##
2715## ------------------- ##"
2716      echo
2717      for ac_var in $ac_subst_files
2718      do
2719	eval ac_val=\$$ac_var
2720	case $ac_val in
2721	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2722	esac
2723	$as_echo "$ac_var='\''$ac_val'\''"
2724      done | sort
2725      echo
2726    fi
2727
2728    if test -s confdefs.h; then
2729      $as_echo "## ----------- ##
2730## confdefs.h. ##
2731## ----------- ##"
2732      echo
2733      cat confdefs.h
2734      echo
2735    fi
2736    test "$ac_signal" != 0 &&
2737      $as_echo "$as_me: caught signal $ac_signal"
2738    $as_echo "$as_me: exit $exit_status"
2739  } >&5
2740  rm -f core *.core core.conftest.* &&
2741    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2742    exit $exit_status
2743' 0
2744for ac_signal in 1 2 13 15; do
2745  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2746done
2747ac_signal=0
2748
2749# confdefs.h avoids OS command line length limits that DEFS can exceed.
2750rm -f -r conftest* confdefs.h
2751
2752$as_echo "/* confdefs.h */" > confdefs.h
2753
2754# Predefined preprocessor variables.
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_NAME "$PACKAGE_NAME"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_VERSION "$PACKAGE_VERSION"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_STRING "$PACKAGE_STRING"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2774_ACEOF
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_URL "$PACKAGE_URL"
2778_ACEOF
2779
2780
2781# Let the site file select an alternate cache file if it wants to.
2782# Prefer an explicitly selected file to automatically selected ones.
2783ac_site_file1=NONE
2784ac_site_file2=NONE
2785if test -n "$CONFIG_SITE"; then
2786  # We do not want a PATH search for config.site.
2787  case $CONFIG_SITE in #((
2788    -*)  ac_site_file1=./$CONFIG_SITE;;
2789    */*) ac_site_file1=$CONFIG_SITE;;
2790    *)   ac_site_file1=./$CONFIG_SITE;;
2791  esac
2792elif test "x$prefix" != xNONE; then
2793  ac_site_file1=$prefix/share/config.site
2794  ac_site_file2=$prefix/etc/config.site
2795else
2796  ac_site_file1=$ac_default_prefix/share/config.site
2797  ac_site_file2=$ac_default_prefix/etc/config.site
2798fi
2799for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2800do
2801  test "x$ac_site_file" = xNONE && continue
2802  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2803    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2804$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2805    sed 's/^/| /' "$ac_site_file" >&5
2806    . "$ac_site_file" \
2807      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2809as_fn_error $? "failed to load site script $ac_site_file
2810See \`config.log' for more details" "$LINENO" 5 ; }
2811  fi
2812done
2813
2814if test -r "$cache_file"; then
2815  # Some versions of bash will fail to source /dev/null (special files
2816  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2817  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2818    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2819$as_echo "$as_me: loading cache $cache_file" >&6;}
2820    case $cache_file in
2821      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2822      *)                      . "./$cache_file";;
2823    esac
2824  fi
2825else
2826  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2827$as_echo "$as_me: creating cache $cache_file" >&6;}
2828  >$cache_file
2829fi
2830
2831# Check that the precious variables saved in the cache have kept the same
2832# value.
2833ac_cache_corrupted=false
2834for ac_var in $ac_precious_vars; do
2835  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2836  eval ac_new_set=\$ac_env_${ac_var}_set
2837  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2838  eval ac_new_val=\$ac_env_${ac_var}_value
2839  case $ac_old_set,$ac_new_set in
2840    set,)
2841      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2842$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2843      ac_cache_corrupted=: ;;
2844    ,set)
2845      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2846$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2847      ac_cache_corrupted=: ;;
2848    ,);;
2849    *)
2850      if test "x$ac_old_val" != "x$ac_new_val"; then
2851	# differences in whitespace do not lead to failure.
2852	ac_old_val_w=`echo x $ac_old_val`
2853	ac_new_val_w=`echo x $ac_new_val`
2854	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2855	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2856$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2857	  ac_cache_corrupted=:
2858	else
2859	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2860$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2861	  eval $ac_var=\$ac_old_val
2862	fi
2863	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2864$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2865	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2866$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2867      fi;;
2868  esac
2869  # Pass precious variables to config.status.
2870  if test "$ac_new_set" = set; then
2871    case $ac_new_val in
2872    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2873    *) ac_arg=$ac_var=$ac_new_val ;;
2874    esac
2875    case " $ac_configure_args " in
2876      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2877      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2878    esac
2879  fi
2880done
2881if $ac_cache_corrupted; then
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2884  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2885$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2886  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2887fi
2888## -------------------- ##
2889## Main body of script. ##
2890## -------------------- ##
2891
2892ac_ext=c
2893ac_cpp='$CPP $CPPFLAGS'
2894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2896ac_compiler_gnu=$ac_cv_c_compiler_gnu
2897
2898
2899
2900ac_aux_dir=
2901for ac_dir in build-aux "$srcdir"/build-aux; do
2902  if test -f "$ac_dir/install-sh"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/install-sh -c"
2905    break
2906  elif test -f "$ac_dir/install.sh"; then
2907    ac_aux_dir=$ac_dir
2908    ac_install_sh="$ac_aux_dir/install.sh -c"
2909    break
2910  elif test -f "$ac_dir/shtool"; then
2911    ac_aux_dir=$ac_dir
2912    ac_install_sh="$ac_aux_dir/shtool install -c"
2913    break
2914  fi
2915done
2916if test -z "$ac_aux_dir"; then
2917  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2918fi
2919
2920# These three variables are undocumented and unsupported,
2921# and are intended to be withdrawn in a future Autoconf release.
2922# They can cause serious problems if a builder's source tree is in a directory
2923# whose full name contains unusual characters.
2924ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2925ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2926ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2927
2928
2929# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2930
2931#
2932# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2933# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2934#
2935# This code is free software; you can redistribute it and/or modify it
2936# under the terms of the GNU General Public License version 2 only, as
2937# published by the Free Software Foundation.  Oracle designates this
2938# particular file as subject to the "Classpath" exception as provided
2939# by Oracle in the LICENSE file that accompanied this code.
2940#
2941# This code is distributed in the hope that it will be useful, but WITHOUT
2942# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2943# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2944# version 2 for more details (a copy is included in the LICENSE file that
2945# accompanied this code).
2946#
2947# You should have received a copy of the GNU General Public License version
2948# 2 along with this work; if not, write to the Free Software Foundation,
2949# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2950#
2951# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2952# or visit www.oracle.com if you need additional information or have any
2953# questions.
2954#
2955
2956#
2957# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2958#
2959# This program is free software; you can redistribute it and/or modify
2960# it under the terms of the GNU General Public License as published by
2961# the Free Software Foundation; either version 2 of the License, or
2962# (at your option) any later version.
2963#
2964# This program is distributed in the hope that it will be useful, but
2965# WITHOUT ANY WARRANTY; without even the implied warranty of
2966# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2967# General Public License for more details.
2968#
2969# You should have received a copy of the GNU General Public License
2970# along with this program; if not, write to the Free Software
2971# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2972#
2973# As a special exception to the GNU General Public License, if you
2974# distribute this file as part of a program that contains a
2975# configuration script generated by Autoconf, you may include it under
2976# the same distribution terms that you use for the rest of that program.
2977
2978# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2979# ----------------------------------
2980# PKG_PROG_PKG_CONFIG
2981
2982# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2983#
2984# Check to see whether a particular set of modules exists.  Similar
2985# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2986#
2987#
2988# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2989# this or PKG_CHECK_MODULES is called, or make sure to call
2990# PKG_CHECK_EXISTS manually
2991# --------------------------------------------------------------
2992
2993
2994
2995# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2996# ---------------------------------------------
2997# _PKG_CONFIG
2998
2999# _PKG_SHORT_ERRORS_SUPPORTED
3000# -----------------------------
3001# _PKG_SHORT_ERRORS_SUPPORTED
3002
3003
3004# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3005# [ACTION-IF-NOT-FOUND])
3006#
3007#
3008# Note that if there is a possibility the first call to
3009# PKG_CHECK_MODULES might not happen, you should be sure to include an
3010# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3011#
3012#
3013# --------------------------------------------------------------
3014# PKG_CHECK_MODULES
3015
3016
3017# Include these first...
3018#
3019# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3020# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3021#
3022# This code is free software; you can redistribute it and/or modify it
3023# under the terms of the GNU General Public License version 2 only, as
3024# published by the Free Software Foundation.  Oracle designates this
3025# particular file as subject to the "Classpath" exception as provided
3026# by Oracle in the LICENSE file that accompanied this code.
3027#
3028# This code is distributed in the hope that it will be useful, but WITHOUT
3029# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3030# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3031# version 2 for more details (a copy is included in the LICENSE file that
3032# accompanied this code).
3033#
3034# You should have received a copy of the GNU General Public License version
3035# 2 along with this work; if not, write to the Free Software Foundation,
3036# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3037#
3038# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3039# or visit www.oracle.com if you need additional information or have any
3040# questions.
3041#
3042
3043
3044
3045# This will make sure the given variable points to a full and proper
3046# path. This means:
3047# 1) There will be no spaces in the path. On posix platforms,
3048#    spaces in the path will result in an error. On Windows,
3049#    the path will be rewritten using short-style to be space-free.
3050# 2) The path will be absolute, and it will be in unix-style (on
3051#     cygwin).
3052# $1: The name of the variable to fix
3053
3054
3055# This will make sure the given variable points to a executable
3056# with a full and proper path. This means:
3057# 1) There will be no spaces in the path. On posix platforms,
3058#    spaces in the path will result in an error. On Windows,
3059#    the path will be rewritten using short-style to be space-free.
3060# 2) The path will be absolute, and it will be in unix-style (on
3061#     cygwin).
3062# Any arguments given to the executable is preserved.
3063# If the input variable does not have a directory specification, then
3064# it need to be in the PATH.
3065# $1: The name of the variable to fix
3066
3067
3068
3069
3070
3071
3072# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3073# $1: variable to check
3074# $2: executable name to print in warning (optional)
3075
3076
3077# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3078# Arguments as AC_PATH_PROG:
3079# $1: variable to set
3080# $2: executable name to look for
3081
3082
3083# Setup the most fundamental tools that relies on not much else to set up,
3084# but is used by much of the early bootstrap code.
3085
3086
3087# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3088
3089
3090
3091
3092
3093
3094
3095#%%% Simple tools %%%
3096
3097# Check if we have found a usable version of make
3098# $1: the path to a potential make binary (or empty)
3099# $2: the description on how we found this
3100
3101
3102# Goes looking for a usable version of GNU make.
3103
3104
3105
3106
3107
3108
3109# Check if build directory is on local disk. If not possible to determine,
3110# we prefer to claim it's local.
3111# Argument 1: directory to test
3112# Argument 2: what to do if it is on local disk
3113# Argument 3: what to do otherwise (remote disk or failure)
3114
3115
3116# Check that source files have basic read permissions set. This might
3117# not be the case in cygwin in certain conditions.
3118
3119
3120
3121
3122#
3123# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3125#
3126# This code is free software; you can redistribute it and/or modify it
3127# under the terms of the GNU General Public License version 2 only, as
3128# published by the Free Software Foundation.  Oracle designates this
3129# particular file as subject to the "Classpath" exception as provided
3130# by Oracle in the LICENSE file that accompanied this code.
3131#
3132# This code is distributed in the hope that it will be useful, but WITHOUT
3133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3135# version 2 for more details (a copy is included in the LICENSE file that
3136# accompanied this code).
3137#
3138# You should have received a copy of the GNU General Public License version
3139# 2 along with this work; if not, write to the Free Software Foundation,
3140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3141#
3142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3143# or visit www.oracle.com if you need additional information or have any
3144# questions.
3145#
3146
3147
3148
3149
3150
3151# Helper function which possibly converts a path using DOS-style short mode.
3152# If so, the updated path is stored in $new_path.
3153# $1: The path to check
3154
3155
3156# Helper function which possibly converts a path using DOS-style short mode.
3157# If so, the updated path is stored in $new_path.
3158# $1: The path to check
3159
3160
3161# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3162# and could probably be heavily simplified. However, all changes in this
3163# area tend to need lot of testing in different scenarios, and in lack of
3164# proper unit testing, cleaning this up has not been deemed worth the effort
3165# at the moment.
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3176
3177
3178
3179
3180#
3181# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3182# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3183#
3184# This code is free software; you can redistribute it and/or modify it
3185# under the terms of the GNU General Public License version 2 only, as
3186# published by the Free Software Foundation.  Oracle designates this
3187# particular file as subject to the "Classpath" exception as provided
3188# by Oracle in the LICENSE file that accompanied this code.
3189#
3190# This code is distributed in the hope that it will be useful, but WITHOUT
3191# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3192# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3193# version 2 for more details (a copy is included in the LICENSE file that
3194# accompanied this code).
3195#
3196# You should have received a copy of the GNU General Public License version
3197# 2 along with this work; if not, write to the Free Software Foundation,
3198# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3199#
3200# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3201# or visit www.oracle.com if you need additional information or have any
3202# questions.
3203#
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215# ... then the rest
3216#
3217# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3218# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3219#
3220# This code is free software; you can redistribute it and/or modify it
3221# under the terms of the GNU General Public License version 2 only, as
3222# published by the Free Software Foundation.  Oracle designates this
3223# particular file as subject to the "Classpath" exception as provided
3224# by Oracle in the LICENSE file that accompanied this code.
3225#
3226# This code is distributed in the hope that it will be useful, but WITHOUT
3227# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3228# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3229# version 2 for more details (a copy is included in the LICENSE file that
3230# accompanied this code).
3231#
3232# You should have received a copy of the GNU General Public License version
3233# 2 along with this work; if not, write to the Free Software Foundation,
3234# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3235#
3236# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3237# or visit www.oracle.com if you need additional information or have any
3238# questions.
3239#
3240
3241# Execute the check given as argument, and verify the result
3242# If the Boot JDK was previously found, do nothing
3243# $1 A command line (typically autoconf macro) to execute
3244
3245
3246# Test: Is bootjdk explicitely set by command line arguments?
3247
3248
3249# Test: Is bootjdk available from builddeps?
3250
3251
3252# Test: Is $JAVA_HOME set?
3253
3254
3255# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3256
3257
3258# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3259
3260
3261# Look for a jdk in the given path. If there are multiple, try to select the newest.
3262# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3263# $1 = Path to directory containing jdk installations.
3264# $2 = String to append to the found JDK directory to get the proper JDK home
3265
3266
3267# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3268# environmental variable as base for where to look.
3269# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3270
3271
3272# Test: Is there a JDK installed in default, well-known locations?
3273
3274
3275# Check that a command-line tool in the Boot JDK is correct
3276# $1 = name of variable to assign
3277# $2 = name of binary
3278
3279
3280###############################################################################
3281#
3282# We need a Boot JDK to bootstrap the build.
3283#
3284
3285
3286
3287
3288
3289#
3290# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292#
3293# This code is free software; you can redistribute it and/or modify it
3294# under the terms of the GNU General Public License version 2 only, as
3295# published by the Free Software Foundation.  Oracle designates this
3296# particular file as subject to the "Classpath" exception as provided
3297# by Oracle in the LICENSE file that accompanied this code.
3298#
3299# This code is distributed in the hope that it will be useful, but WITHOUT
3300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302# version 2 for more details (a copy is included in the LICENSE file that
3303# accompanied this code).
3304#
3305# You should have received a copy of the GNU General Public License version
3306# 2 along with this work; if not, write to the Free Software Foundation,
3307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308#
3309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310# or visit www.oracle.com if you need additional information or have any
3311# questions.
3312#
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331#
3332# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3333# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3334#
3335# This code is free software; you can redistribute it and/or modify it
3336# under the terms of the GNU General Public License version 2 only, as
3337# published by the Free Software Foundation.  Oracle designates this
3338# particular file as subject to the "Classpath" exception as provided
3339# by Oracle in the LICENSE file that accompanied this code.
3340#
3341# This code is distributed in the hope that it will be useful, but WITHOUT
3342# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3343# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3344# version 2 for more details (a copy is included in the LICENSE file that
3345# accompanied this code).
3346#
3347# You should have received a copy of the GNU General Public License version
3348# 2 along with this work; if not, write to the Free Software Foundation,
3349# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3350#
3351# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3352# or visit www.oracle.com if you need additional information or have any
3353# questions.
3354#
3355
3356
3357
3358
3359
3360cygwin_help() {
3361    case $1 in
3362    unzip)
3363        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3364    zip)
3365        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3366    make)
3367        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3368    * )
3369       break ;;
3370    esac
3371}
3372
3373apt_help() {
3374    case $1 in
3375    devkit)
3376        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3377    openjdk)
3378        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3379    alsa)
3380        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3381    cups)
3382        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3383    freetype2)
3384        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3385    pulse)
3386        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3387    x11)
3388        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3389    ccache)
3390        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3391    * )
3392       break ;;
3393    esac
3394}
3395
3396yum_help() {
3397    case $1 in
3398    devkit)
3399        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3400    openjdk)
3401        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3402    alsa)
3403        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3404    cups)
3405        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3406    freetype2)
3407        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3408    pulse)
3409        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3410    x11)
3411        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3412    ccache)
3413        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3414    * )
3415       break ;;
3416    esac
3417}
3418
3419port_help() {
3420    PKGHANDLER_COMMAND=""
3421}
3422
3423pkgutil_help() {
3424    PKGHANDLER_COMMAND=""
3425}
3426
3427pkgadd_help() {
3428    PKGHANDLER_COMMAND=""
3429}
3430
3431
3432
3433#
3434# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3435# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3436#
3437# This code is free software; you can redistribute it and/or modify it
3438# under the terms of the GNU General Public License version 2 only, as
3439# published by the Free Software Foundation.  Oracle designates this
3440# particular file as subject to the "Classpath" exception as provided
3441# by Oracle in the LICENSE file that accompanied this code.
3442#
3443# This code is distributed in the hope that it will be useful, but WITHOUT
3444# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3445# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3446# version 2 for more details (a copy is included in the LICENSE file that
3447# accompanied this code).
3448#
3449# You should have received a copy of the GNU General Public License version
3450# 2 along with this work; if not, write to the Free Software Foundation,
3451# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3452#
3453# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3454# or visit www.oracle.com if you need additional information or have any
3455# questions.
3456#
3457
3458
3459
3460
3461
3462
3463
3464
3465###############################################################################
3466#
3467# Should we build only OpenJDK even if closed sources are present?
3468#
3469
3470
3471
3472
3473###############################################################################
3474#
3475# Setup version numbers
3476#
3477
3478
3479
3480
3481
3482
3483# Support for customization of the build process. Some build files
3484# will include counterparts from this location, if they exist. This allows
3485# for a degree of customization of the build targets and the rules/recipes
3486# to create them
3487
3488# Check whether --with-custom-make-dir was given.
3489if test "${with_custom_make_dir+set}" = set; then :
3490  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3491fi
3492
3493
3494
3495#
3496# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498#
3499# This code is free software; you can redistribute it and/or modify it
3500# under the terms of the GNU General Public License version 2 only, as
3501# published by the Free Software Foundation.  Oracle designates this
3502# particular file as subject to the "Classpath" exception as provided
3503# by Oracle in the LICENSE file that accompanied this code.
3504#
3505# This code is distributed in the hope that it will be useful, but WITHOUT
3506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508# version 2 for more details (a copy is included in the LICENSE file that
3509# accompanied this code).
3510#
3511# You should have received a copy of the GNU General Public License version
3512# 2 along with this work; if not, write to the Free Software Foundation,
3513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514#
3515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516# or visit www.oracle.com if you need additional information or have any
3517# questions.
3518#
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534#
3535# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3537#
3538# This code is free software; you can redistribute it and/or modify it
3539# under the terms of the GNU General Public License version 2 only, as
3540# published by the Free Software Foundation.  Oracle designates this
3541# particular file as subject to the "Classpath" exception as provided
3542# by Oracle in the LICENSE file that accompanied this code.
3543#
3544# This code is distributed in the hope that it will be useful, but WITHOUT
3545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3547# version 2 for more details (a copy is included in the LICENSE file that
3548# accompanied this code).
3549#
3550# You should have received a copy of the GNU General Public License version
3551# 2 along with this work; if not, write to the Free Software Foundation,
3552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3553#
3554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3555# or visit www.oracle.com if you need additional information or have any
3556# questions.
3557#
3558
3559# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3560# Converts autoconf style CPU name to OpenJDK style, into
3561# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3562
3563
3564# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3565# Converts autoconf style OS name to OpenJDK style, into
3566# VAR_OS and VAR_OS_API.
3567
3568
3569# Expects $host_os $host_cpu $build_os and $build_cpu
3570# and $with_target_bits to have been setup!
3571#
3572# Translate the standard triplet(quadruplet) definition
3573# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3574# OPENJDK_BUILD_OS, etc.
3575
3576
3577# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3578# accordingly. Must be done after setting up build and target system, but before
3579# doing anything else with these values.
3580
3581
3582    # Setup the legacy variables, for controlling the old makefiles.
3583    #
3584
3585
3586
3587
3588#%%% Build and target systems %%%
3589
3590
3591
3592
3593# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3594# Add -mX to various FLAGS variables.
3595
3596
3597
3598
3599
3600
3601#
3602# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3604#
3605# This code is free software; you can redistribute it and/or modify it
3606# under the terms of the GNU General Public License version 2 only, as
3607# published by the Free Software Foundation.  Oracle designates this
3608# particular file as subject to the "Classpath" exception as provided
3609# by Oracle in the LICENSE file that accompanied this code.
3610#
3611# This code is distributed in the hope that it will be useful, but WITHOUT
3612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3614# version 2 for more details (a copy is included in the LICENSE file that
3615# accompanied this code).
3616#
3617# You should have received a copy of the GNU General Public License version
3618# 2 along with this work; if not, write to the Free Software Foundation,
3619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3620#
3621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3622# or visit www.oracle.com if you need additional information or have any
3623# questions.
3624#
3625
3626
3627
3628
3629
3630
3631
3632
3633#
3634# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3635# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3636#
3637# This code is free software; you can redistribute it and/or modify it
3638# under the terms of the GNU General Public License version 2 only, as
3639# published by the Free Software Foundation.  Oracle designates this
3640# particular file as subject to the "Classpath" exception as provided
3641# by Oracle in the LICENSE file that accompanied this code.
3642#
3643# This code is distributed in the hope that it will be useful, but WITHOUT
3644# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3645# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3646# version 2 for more details (a copy is included in the LICENSE file that
3647# accompanied this code).
3648#
3649# You should have received a copy of the GNU General Public License version
3650# 2 along with this work; if not, write to the Free Software Foundation,
3651# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3652#
3653# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3654# or visit www.oracle.com if you need additional information or have any
3655# questions.
3656#
3657
3658# $1 = compiler to test (CC or CXX)
3659# $2 = human readable name of compiler (C or C++)
3660
3661
3662
3663
3664
3665# $1 = compiler to test (CC or CXX)
3666# $2 = human readable name of compiler (C or C++)
3667# $3 = list of compiler names to search for
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705
3706
3707
3708
3709
3710
3711# Check if the VS env variables were setup prior to running configure.
3712# If not, then find vcvarsall.bat and run it automatically, and integrate
3713# the set env variables into the spec file.
3714
3715
3716
3717
3718
3719
3720# This line needs to be here, verbatim, after all includes and the dummy hook
3721# definitions. It is replaced with custom functionality when building
3722# custom sources.
3723#CUSTOM_AUTOCONF_INCLUDE
3724
3725# Do not change or remove the following line, it is needed for consistency checks:
3726DATE_WHEN_GENERATED=1359376859
3727
3728###############################################################################
3729#
3730# Initialization / Boot-strapping
3731#
3732# The bootstrapping process needs to solve the "chicken or the egg" problem,
3733# thus it jumps back and forth, each time gaining something needed later on.
3734#
3735###############################################################################
3736
3737# Basic initialization that must happen first of all
3738
3739# Save the original command line. This is passed to us by the wrapper configure script.
3740
3741DATE_WHEN_CONFIGURED=`LANG=C date`
3742
3743{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3744$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3746$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3747
3748
3749
3750# Start with tools that do not need have cross compilation support
3751# and can be expected to be found in the default PATH. These tools are
3752# used by configure. Nor are these tools expected to be found in the
3753# devkit from the builddeps server either, since they are
3754# needed to download the devkit.
3755
3756# First are all the simple required tools.
3757
3758    for ac_prog in basename
3759do
3760  # Extract the first word of "$ac_prog", so it can be a program name with args.
3761set dummy $ac_prog; ac_word=$2
3762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
3764if test "${ac_cv_path_BASENAME+set}" = set; then :
3765  $as_echo_n "(cached) " >&6
3766else
3767  case $BASENAME in
3768  [\\/]* | ?:[\\/]*)
3769  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3770  ;;
3771  *)
3772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3773for as_dir in $PATH
3774do
3775  IFS=$as_save_IFS
3776  test -z "$as_dir" && as_dir=.
3777    for ac_exec_ext in '' $ac_executable_extensions; do
3778  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3779    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3781    break 2
3782  fi
3783done
3784  done
3785IFS=$as_save_IFS
3786
3787  ;;
3788esac
3789fi
3790BASENAME=$ac_cv_path_BASENAME
3791if test -n "$BASENAME"; then
3792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3793$as_echo "$BASENAME" >&6; }
3794else
3795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
3797fi
3798
3799
3800  test -n "$BASENAME" && break
3801done
3802
3803
3804    if test "x$BASENAME" = x; then
3805        if test "xbasename" = x; then
3806          PROG_NAME=basename
3807        else
3808          PROG_NAME=basename
3809        fi
3810        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3811$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3812        as_fn_error $? "Cannot continue" "$LINENO" 5
3813    fi
3814
3815
3816
3817    for ac_prog in bash
3818do
3819  # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
3821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
3823if test "${ac_cv_path_BASH+set}" = set; then :
3824  $as_echo_n "(cached) " >&6
3825else
3826  case $BASH in
3827  [\\/]* | ?:[\\/]*)
3828  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3829  ;;
3830  *)
3831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834  IFS=$as_save_IFS
3835  test -z "$as_dir" && as_dir=.
3836    for ac_exec_ext in '' $ac_executable_extensions; do
3837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840    break 2
3841  fi
3842done
3843  done
3844IFS=$as_save_IFS
3845
3846  ;;
3847esac
3848fi
3849BASH=$ac_cv_path_BASH
3850if test -n "$BASH"; then
3851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3852$as_echo "$BASH" >&6; }
3853else
3854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859  test -n "$BASH" && break
3860done
3861
3862
3863    if test "x$BASH" = x; then
3864        if test "xbash" = x; then
3865          PROG_NAME=bash
3866        else
3867          PROG_NAME=bash
3868        fi
3869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871        as_fn_error $? "Cannot continue" "$LINENO" 5
3872    fi
3873
3874
3875
3876    for ac_prog in cat
3877do
3878  # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
3882if test "${ac_cv_path_CAT+set}" = set; then :
3883  $as_echo_n "(cached) " >&6
3884else
3885  case $CAT in
3886  [\\/]* | ?:[\\/]*)
3887  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3888  ;;
3889  *)
3890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891for as_dir in $PATH
3892do
3893  IFS=$as_save_IFS
3894  test -z "$as_dir" && as_dir=.
3895    for ac_exec_ext in '' $ac_executable_extensions; do
3896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899    break 2
3900  fi
3901done
3902  done
3903IFS=$as_save_IFS
3904
3905  ;;
3906esac
3907fi
3908CAT=$ac_cv_path_CAT
3909if test -n "$CAT"; then
3910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3911$as_echo "$CAT" >&6; }
3912else
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914$as_echo "no" >&6; }
3915fi
3916
3917
3918  test -n "$CAT" && break
3919done
3920
3921
3922    if test "x$CAT" = x; then
3923        if test "xcat" = x; then
3924          PROG_NAME=cat
3925        else
3926          PROG_NAME=cat
3927        fi
3928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930        as_fn_error $? "Cannot continue" "$LINENO" 5
3931    fi
3932
3933
3934
3935    for ac_prog in chmod
3936do
3937  # Extract the first word of "$ac_prog", so it can be a program name with args.
3938set dummy $ac_prog; ac_word=$2
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940$as_echo_n "checking for $ac_word... " >&6; }
3941if test "${ac_cv_path_CHMOD+set}" = set; then :
3942  $as_echo_n "(cached) " >&6
3943else
3944  case $CHMOD in
3945  [\\/]* | ?:[\\/]*)
3946  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3947  ;;
3948  *)
3949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950for as_dir in $PATH
3951do
3952  IFS=$as_save_IFS
3953  test -z "$as_dir" && as_dir=.
3954    for ac_exec_ext in '' $ac_executable_extensions; do
3955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958    break 2
3959  fi
3960done
3961  done
3962IFS=$as_save_IFS
3963
3964  ;;
3965esac
3966fi
3967CHMOD=$ac_cv_path_CHMOD
3968if test -n "$CHMOD"; then
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3970$as_echo "$CHMOD" >&6; }
3971else
3972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974fi
3975
3976
3977  test -n "$CHMOD" && break
3978done
3979
3980
3981    if test "x$CHMOD" = x; then
3982        if test "xchmod" = x; then
3983          PROG_NAME=chmod
3984        else
3985          PROG_NAME=chmod
3986        fi
3987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989        as_fn_error $? "Cannot continue" "$LINENO" 5
3990    fi
3991
3992
3993
3994    for ac_prog in cmp
3995do
3996  # Extract the first word of "$ac_prog", so it can be a program name with args.
3997set dummy $ac_prog; ac_word=$2
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CMP+set}" = set; then :
4001  $as_echo_n "(cached) " >&6
4002else
4003  case $CMP in
4004  [\\/]* | ?:[\\/]*)
4005  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4006  ;;
4007  *)
4008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in $PATH
4010do
4011  IFS=$as_save_IFS
4012  test -z "$as_dir" && as_dir=.
4013    for ac_exec_ext in '' $ac_executable_extensions; do
4014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017    break 2
4018  fi
4019done
4020  done
4021IFS=$as_save_IFS
4022
4023  ;;
4024esac
4025fi
4026CMP=$ac_cv_path_CMP
4027if test -n "$CMP"; then
4028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4029$as_echo "$CMP" >&6; }
4030else
4031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
4033fi
4034
4035
4036  test -n "$CMP" && break
4037done
4038
4039
4040    if test "x$CMP" = x; then
4041        if test "xcmp" = x; then
4042          PROG_NAME=cmp
4043        else
4044          PROG_NAME=cmp
4045        fi
4046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048        as_fn_error $? "Cannot continue" "$LINENO" 5
4049    fi
4050
4051
4052
4053    for ac_prog in comm
4054do
4055  # Extract the first word of "$ac_prog", so it can be a program name with args.
4056set dummy $ac_prog; ac_word=$2
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if test "${ac_cv_path_COMM+set}" = set; then :
4060  $as_echo_n "(cached) " >&6
4061else
4062  case $COMM in
4063  [\\/]* | ?:[\\/]*)
4064  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4065  ;;
4066  *)
4067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH
4069do
4070  IFS=$as_save_IFS
4071  test -z "$as_dir" && as_dir=.
4072    for ac_exec_ext in '' $ac_executable_extensions; do
4073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076    break 2
4077  fi
4078done
4079  done
4080IFS=$as_save_IFS
4081
4082  ;;
4083esac
4084fi
4085COMM=$ac_cv_path_COMM
4086if test -n "$COMM"; then
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4088$as_echo "$COMM" >&6; }
4089else
4090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
4092fi
4093
4094
4095  test -n "$COMM" && break
4096done
4097
4098
4099    if test "x$COMM" = x; then
4100        if test "xcomm" = x; then
4101          PROG_NAME=comm
4102        else
4103          PROG_NAME=comm
4104        fi
4105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107        as_fn_error $? "Cannot continue" "$LINENO" 5
4108    fi
4109
4110
4111
4112    for ac_prog in cp
4113do
4114  # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
4118if test "${ac_cv_path_CP+set}" = set; then :
4119  $as_echo_n "(cached) " >&6
4120else
4121  case $CP in
4122  [\\/]* | ?:[\\/]*)
4123  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4124  ;;
4125  *)
4126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in $PATH
4128do
4129  IFS=$as_save_IFS
4130  test -z "$as_dir" && as_dir=.
4131    for ac_exec_ext in '' $ac_executable_extensions; do
4132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135    break 2
4136  fi
4137done
4138  done
4139IFS=$as_save_IFS
4140
4141  ;;
4142esac
4143fi
4144CP=$ac_cv_path_CP
4145if test -n "$CP"; then
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4147$as_echo "$CP" >&6; }
4148else
4149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
4151fi
4152
4153
4154  test -n "$CP" && break
4155done
4156
4157
4158    if test "x$CP" = x; then
4159        if test "xcp" = x; then
4160          PROG_NAME=cp
4161        else
4162          PROG_NAME=cp
4163        fi
4164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166        as_fn_error $? "Cannot continue" "$LINENO" 5
4167    fi
4168
4169
4170
4171    for ac_prog in cpio
4172do
4173  # Extract the first word of "$ac_prog", so it can be a program name with args.
4174set dummy $ac_prog; ac_word=$2
4175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176$as_echo_n "checking for $ac_word... " >&6; }
4177if test "${ac_cv_path_CPIO+set}" = set; then :
4178  $as_echo_n "(cached) " >&6
4179else
4180  case $CPIO in
4181  [\\/]* | ?:[\\/]*)
4182  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4183  ;;
4184  *)
4185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188  IFS=$as_save_IFS
4189  test -z "$as_dir" && as_dir=.
4190    for ac_exec_ext in '' $ac_executable_extensions; do
4191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194    break 2
4195  fi
4196done
4197  done
4198IFS=$as_save_IFS
4199
4200  ;;
4201esac
4202fi
4203CPIO=$ac_cv_path_CPIO
4204if test -n "$CPIO"; then
4205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4206$as_echo "$CPIO" >&6; }
4207else
4208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209$as_echo "no" >&6; }
4210fi
4211
4212
4213  test -n "$CPIO" && break
4214done
4215
4216
4217    if test "x$CPIO" = x; then
4218        if test "xcpio" = x; then
4219          PROG_NAME=cpio
4220        else
4221          PROG_NAME=cpio
4222        fi
4223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225        as_fn_error $? "Cannot continue" "$LINENO" 5
4226    fi
4227
4228
4229
4230    for ac_prog in cut
4231do
4232  # Extract the first word of "$ac_prog", so it can be a program name with args.
4233set dummy $ac_prog; ac_word=$2
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235$as_echo_n "checking for $ac_word... " >&6; }
4236if test "${ac_cv_path_CUT+set}" = set; then :
4237  $as_echo_n "(cached) " >&6
4238else
4239  case $CUT in
4240  [\\/]* | ?:[\\/]*)
4241  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4242  ;;
4243  *)
4244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247  IFS=$as_save_IFS
4248  test -z "$as_dir" && as_dir=.
4249    for ac_exec_ext in '' $ac_executable_extensions; do
4250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253    break 2
4254  fi
4255done
4256  done
4257IFS=$as_save_IFS
4258
4259  ;;
4260esac
4261fi
4262CUT=$ac_cv_path_CUT
4263if test -n "$CUT"; then
4264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4265$as_echo "$CUT" >&6; }
4266else
4267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268$as_echo "no" >&6; }
4269fi
4270
4271
4272  test -n "$CUT" && break
4273done
4274
4275
4276    if test "x$CUT" = x; then
4277        if test "xcut" = x; then
4278          PROG_NAME=cut
4279        else
4280          PROG_NAME=cut
4281        fi
4282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284        as_fn_error $? "Cannot continue" "$LINENO" 5
4285    fi
4286
4287
4288
4289    for ac_prog in date
4290do
4291  # Extract the first word of "$ac_prog", so it can be a program name with args.
4292set dummy $ac_prog; ac_word=$2
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294$as_echo_n "checking for $ac_word... " >&6; }
4295if test "${ac_cv_path_DATE+set}" = set; then :
4296  $as_echo_n "(cached) " >&6
4297else
4298  case $DATE in
4299  [\\/]* | ?:[\\/]*)
4300  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4301  ;;
4302  *)
4303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306  IFS=$as_save_IFS
4307  test -z "$as_dir" && as_dir=.
4308    for ac_exec_ext in '' $ac_executable_extensions; do
4309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312    break 2
4313  fi
4314done
4315  done
4316IFS=$as_save_IFS
4317
4318  ;;
4319esac
4320fi
4321DATE=$ac_cv_path_DATE
4322if test -n "$DATE"; then
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4324$as_echo "$DATE" >&6; }
4325else
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327$as_echo "no" >&6; }
4328fi
4329
4330
4331  test -n "$DATE" && break
4332done
4333
4334
4335    if test "x$DATE" = x; then
4336        if test "xdate" = x; then
4337          PROG_NAME=date
4338        else
4339          PROG_NAME=date
4340        fi
4341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343        as_fn_error $? "Cannot continue" "$LINENO" 5
4344    fi
4345
4346
4347
4348    for ac_prog in gdiff diff
4349do
4350  # Extract the first word of "$ac_prog", so it can be a program name with args.
4351set dummy $ac_prog; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if test "${ac_cv_path_DIFF+set}" = set; then :
4355  $as_echo_n "(cached) " >&6
4356else
4357  case $DIFF in
4358  [\\/]* | ?:[\\/]*)
4359  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4360  ;;
4361  *)
4362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH
4364do
4365  IFS=$as_save_IFS
4366  test -z "$as_dir" && as_dir=.
4367    for ac_exec_ext in '' $ac_executable_extensions; do
4368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371    break 2
4372  fi
4373done
4374  done
4375IFS=$as_save_IFS
4376
4377  ;;
4378esac
4379fi
4380DIFF=$ac_cv_path_DIFF
4381if test -n "$DIFF"; then
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4383$as_echo "$DIFF" >&6; }
4384else
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390  test -n "$DIFF" && break
4391done
4392
4393
4394    if test "x$DIFF" = x; then
4395        if test "xgdiff diff" = x; then
4396          PROG_NAME=diff
4397        else
4398          PROG_NAME=gdiff diff
4399        fi
4400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402        as_fn_error $? "Cannot continue" "$LINENO" 5
4403    fi
4404
4405
4406
4407    for ac_prog in dirname
4408do
4409  # Extract the first word of "$ac_prog", so it can be a program name with args.
4410set dummy $ac_prog; ac_word=$2
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412$as_echo_n "checking for $ac_word... " >&6; }
4413if test "${ac_cv_path_DIRNAME+set}" = set; then :
4414  $as_echo_n "(cached) " >&6
4415else
4416  case $DIRNAME in
4417  [\\/]* | ?:[\\/]*)
4418  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4419  ;;
4420  *)
4421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424  IFS=$as_save_IFS
4425  test -z "$as_dir" && as_dir=.
4426    for ac_exec_ext in '' $ac_executable_extensions; do
4427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430    break 2
4431  fi
4432done
4433  done
4434IFS=$as_save_IFS
4435
4436  ;;
4437esac
4438fi
4439DIRNAME=$ac_cv_path_DIRNAME
4440if test -n "$DIRNAME"; then
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4442$as_echo "$DIRNAME" >&6; }
4443else
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449  test -n "$DIRNAME" && break
4450done
4451
4452
4453    if test "x$DIRNAME" = x; then
4454        if test "xdirname" = x; then
4455          PROG_NAME=dirname
4456        else
4457          PROG_NAME=dirname
4458        fi
4459        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461        as_fn_error $? "Cannot continue" "$LINENO" 5
4462    fi
4463
4464
4465
4466    for ac_prog in echo
4467do
4468  # Extract the first word of "$ac_prog", so it can be a program name with args.
4469set dummy $ac_prog; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if test "${ac_cv_path_ECHO+set}" = set; then :
4473  $as_echo_n "(cached) " >&6
4474else
4475  case $ECHO in
4476  [\\/]* | ?:[\\/]*)
4477  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4478  ;;
4479  *)
4480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH
4482do
4483  IFS=$as_save_IFS
4484  test -z "$as_dir" && as_dir=.
4485    for ac_exec_ext in '' $ac_executable_extensions; do
4486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489    break 2
4490  fi
4491done
4492  done
4493IFS=$as_save_IFS
4494
4495  ;;
4496esac
4497fi
4498ECHO=$ac_cv_path_ECHO
4499if test -n "$ECHO"; then
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4501$as_echo "$ECHO" >&6; }
4502else
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507
4508  test -n "$ECHO" && break
4509done
4510
4511
4512    if test "x$ECHO" = x; then
4513        if test "xecho" = x; then
4514          PROG_NAME=echo
4515        else
4516          PROG_NAME=echo
4517        fi
4518        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520        as_fn_error $? "Cannot continue" "$LINENO" 5
4521    fi
4522
4523
4524
4525    for ac_prog in expr
4526do
4527  # Extract the first word of "$ac_prog", so it can be a program name with args.
4528set dummy $ac_prog; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if test "${ac_cv_path_EXPR+set}" = set; then :
4532  $as_echo_n "(cached) " >&6
4533else
4534  case $EXPR in
4535  [\\/]* | ?:[\\/]*)
4536  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4537  ;;
4538  *)
4539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in $PATH
4541do
4542  IFS=$as_save_IFS
4543  test -z "$as_dir" && as_dir=.
4544    for ac_exec_ext in '' $ac_executable_extensions; do
4545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548    break 2
4549  fi
4550done
4551  done
4552IFS=$as_save_IFS
4553
4554  ;;
4555esac
4556fi
4557EXPR=$ac_cv_path_EXPR
4558if test -n "$EXPR"; then
4559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4560$as_echo "$EXPR" >&6; }
4561else
4562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566
4567  test -n "$EXPR" && break
4568done
4569
4570
4571    if test "x$EXPR" = x; then
4572        if test "xexpr" = x; then
4573          PROG_NAME=expr
4574        else
4575          PROG_NAME=expr
4576        fi
4577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579        as_fn_error $? "Cannot continue" "$LINENO" 5
4580    fi
4581
4582
4583
4584    for ac_prog in file
4585do
4586  # Extract the first word of "$ac_prog", so it can be a program name with args.
4587set dummy $ac_prog; ac_word=$2
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589$as_echo_n "checking for $ac_word... " >&6; }
4590if test "${ac_cv_path_FILE+set}" = set; then :
4591  $as_echo_n "(cached) " >&6
4592else
4593  case $FILE in
4594  [\\/]* | ?:[\\/]*)
4595  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4596  ;;
4597  *)
4598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in $PATH
4600do
4601  IFS=$as_save_IFS
4602  test -z "$as_dir" && as_dir=.
4603    for ac_exec_ext in '' $ac_executable_extensions; do
4604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607    break 2
4608  fi
4609done
4610  done
4611IFS=$as_save_IFS
4612
4613  ;;
4614esac
4615fi
4616FILE=$ac_cv_path_FILE
4617if test -n "$FILE"; then
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4619$as_echo "$FILE" >&6; }
4620else
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622$as_echo "no" >&6; }
4623fi
4624
4625
4626  test -n "$FILE" && break
4627done
4628
4629
4630    if test "x$FILE" = x; then
4631        if test "xfile" = x; then
4632          PROG_NAME=file
4633        else
4634          PROG_NAME=file
4635        fi
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638        as_fn_error $? "Cannot continue" "$LINENO" 5
4639    fi
4640
4641
4642
4643    for ac_prog in find
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if test "${ac_cv_path_FIND+set}" = set; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $FIND in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675FIND=$ac_cv_path_FIND
4676if test -n "$FIND"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4678$as_echo "$FIND" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$FIND" && break
4686done
4687
4688
4689    if test "x$FIND" = x; then
4690        if test "xfind" = x; then
4691          PROG_NAME=find
4692        else
4693          PROG_NAME=find
4694        fi
4695        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697        as_fn_error $? "Cannot continue" "$LINENO" 5
4698    fi
4699
4700
4701
4702    for ac_prog in head
4703do
4704  # Extract the first word of "$ac_prog", so it can be a program name with args.
4705set dummy $ac_prog; ac_word=$2
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
4708if test "${ac_cv_path_HEAD+set}" = set; then :
4709  $as_echo_n "(cached) " >&6
4710else
4711  case $HEAD in
4712  [\\/]* | ?:[\\/]*)
4713  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4714  ;;
4715  *)
4716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719  IFS=$as_save_IFS
4720  test -z "$as_dir" && as_dir=.
4721    for ac_exec_ext in '' $ac_executable_extensions; do
4722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725    break 2
4726  fi
4727done
4728  done
4729IFS=$as_save_IFS
4730
4731  ;;
4732esac
4733fi
4734HEAD=$ac_cv_path_HEAD
4735if test -n "$HEAD"; then
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4737$as_echo "$HEAD" >&6; }
4738else
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740$as_echo "no" >&6; }
4741fi
4742
4743
4744  test -n "$HEAD" && break
4745done
4746
4747
4748    if test "x$HEAD" = x; then
4749        if test "xhead" = x; then
4750          PROG_NAME=head
4751        else
4752          PROG_NAME=head
4753        fi
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756        as_fn_error $? "Cannot continue" "$LINENO" 5
4757    fi
4758
4759
4760
4761    for ac_prog in ln
4762do
4763  # Extract the first word of "$ac_prog", so it can be a program name with args.
4764set dummy $ac_prog; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
4767if test "${ac_cv_path_LN+set}" = set; then :
4768  $as_echo_n "(cached) " >&6
4769else
4770  case $LN in
4771  [\\/]* | ?:[\\/]*)
4772  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4773  ;;
4774  *)
4775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH
4777do
4778  IFS=$as_save_IFS
4779  test -z "$as_dir" && as_dir=.
4780    for ac_exec_ext in '' $ac_executable_extensions; do
4781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784    break 2
4785  fi
4786done
4787  done
4788IFS=$as_save_IFS
4789
4790  ;;
4791esac
4792fi
4793LN=$ac_cv_path_LN
4794if test -n "$LN"; then
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4796$as_echo "$LN" >&6; }
4797else
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801
4802
4803  test -n "$LN" && break
4804done
4805
4806
4807    if test "x$LN" = x; then
4808        if test "xln" = x; then
4809          PROG_NAME=ln
4810        else
4811          PROG_NAME=ln
4812        fi
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815        as_fn_error $? "Cannot continue" "$LINENO" 5
4816    fi
4817
4818
4819
4820    for ac_prog in ls
4821do
4822  # Extract the first word of "$ac_prog", so it can be a program name with args.
4823set dummy $ac_prog; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if test "${ac_cv_path_LS+set}" = set; then :
4827  $as_echo_n "(cached) " >&6
4828else
4829  case $LS in
4830  [\\/]* | ?:[\\/]*)
4831  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4832  ;;
4833  *)
4834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837  IFS=$as_save_IFS
4838  test -z "$as_dir" && as_dir=.
4839    for ac_exec_ext in '' $ac_executable_extensions; do
4840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843    break 2
4844  fi
4845done
4846  done
4847IFS=$as_save_IFS
4848
4849  ;;
4850esac
4851fi
4852LS=$ac_cv_path_LS
4853if test -n "$LS"; then
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4855$as_echo "$LS" >&6; }
4856else
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859fi
4860
4861
4862  test -n "$LS" && break
4863done
4864
4865
4866    if test "x$LS" = x; then
4867        if test "xls" = x; then
4868          PROG_NAME=ls
4869        else
4870          PROG_NAME=ls
4871        fi
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874        as_fn_error $? "Cannot continue" "$LINENO" 5
4875    fi
4876
4877
4878
4879    for ac_prog in mkdir
4880do
4881  # Extract the first word of "$ac_prog", so it can be a program name with args.
4882set dummy $ac_prog; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if test "${ac_cv_path_MKDIR+set}" = set; then :
4886  $as_echo_n "(cached) " >&6
4887else
4888  case $MKDIR in
4889  [\\/]* | ?:[\\/]*)
4890  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4891  ;;
4892  *)
4893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896  IFS=$as_save_IFS
4897  test -z "$as_dir" && as_dir=.
4898    for ac_exec_ext in '' $ac_executable_extensions; do
4899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902    break 2
4903  fi
4904done
4905  done
4906IFS=$as_save_IFS
4907
4908  ;;
4909esac
4910fi
4911MKDIR=$ac_cv_path_MKDIR
4912if test -n "$MKDIR"; then
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4914$as_echo "$MKDIR" >&6; }
4915else
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920
4921  test -n "$MKDIR" && break
4922done
4923
4924
4925    if test "x$MKDIR" = x; then
4926        if test "xmkdir" = x; then
4927          PROG_NAME=mkdir
4928        else
4929          PROG_NAME=mkdir
4930        fi
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933        as_fn_error $? "Cannot continue" "$LINENO" 5
4934    fi
4935
4936
4937
4938    for ac_prog in mktemp
4939do
4940  # Extract the first word of "$ac_prog", so it can be a program name with args.
4941set dummy $ac_prog; ac_word=$2
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943$as_echo_n "checking for $ac_word... " >&6; }
4944if test "${ac_cv_path_MKTEMP+set}" = set; then :
4945  $as_echo_n "(cached) " >&6
4946else
4947  case $MKTEMP in
4948  [\\/]* | ?:[\\/]*)
4949  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4950  ;;
4951  *)
4952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in $PATH
4954do
4955  IFS=$as_save_IFS
4956  test -z "$as_dir" && as_dir=.
4957    for ac_exec_ext in '' $ac_executable_extensions; do
4958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961    break 2
4962  fi
4963done
4964  done
4965IFS=$as_save_IFS
4966
4967  ;;
4968esac
4969fi
4970MKTEMP=$ac_cv_path_MKTEMP
4971if test -n "$MKTEMP"; then
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4973$as_echo "$MKTEMP" >&6; }
4974else
4975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980  test -n "$MKTEMP" && break
4981done
4982
4983
4984    if test "x$MKTEMP" = x; then
4985        if test "xmktemp" = x; then
4986          PROG_NAME=mktemp
4987        else
4988          PROG_NAME=mktemp
4989        fi
4990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992        as_fn_error $? "Cannot continue" "$LINENO" 5
4993    fi
4994
4995
4996
4997    for ac_prog in mv
4998do
4999  # Extract the first word of "$ac_prog", so it can be a program name with args.
5000set dummy $ac_prog; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_path_MV+set}" = set; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $MV in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029MV=$ac_cv_path_MV
5030if test -n "$MV"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5032$as_echo "$MV" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039  test -n "$MV" && break
5040done
5041
5042
5043    if test "x$MV" = x; then
5044        if test "xmv" = x; then
5045          PROG_NAME=mv
5046        else
5047          PROG_NAME=mv
5048        fi
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051        as_fn_error $? "Cannot continue" "$LINENO" 5
5052    fi
5053
5054
5055
5056    for ac_prog in printf
5057do
5058  # Extract the first word of "$ac_prog", so it can be a program name with args.
5059set dummy $ac_prog; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if test "${ac_cv_path_PRINTF+set}" = set; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $PRINTF in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088PRINTF=$ac_cv_path_PRINTF
5089if test -n "$PRINTF"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5091$as_echo "$PRINTF" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098  test -n "$PRINTF" && break
5099done
5100
5101
5102    if test "x$PRINTF" = x; then
5103        if test "xprintf" = x; then
5104          PROG_NAME=printf
5105        else
5106          PROG_NAME=printf
5107        fi
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110        as_fn_error $? "Cannot continue" "$LINENO" 5
5111    fi
5112
5113
5114
5115    for ac_prog in pwd
5116do
5117  # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5122  $as_echo_n "(cached) " >&6
5123else
5124  case $THEPWDCMD in
5125  [\\/]* | ?:[\\/]*)
5126  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5127  ;;
5128  *)
5129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132  IFS=$as_save_IFS
5133  test -z "$as_dir" && as_dir=.
5134    for ac_exec_ext in '' $ac_executable_extensions; do
5135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138    break 2
5139  fi
5140done
5141  done
5142IFS=$as_save_IFS
5143
5144  ;;
5145esac
5146fi
5147THEPWDCMD=$ac_cv_path_THEPWDCMD
5148if test -n "$THEPWDCMD"; then
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5150$as_echo "$THEPWDCMD" >&6; }
5151else
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157  test -n "$THEPWDCMD" && break
5158done
5159
5160
5161    if test "x$THEPWDCMD" = x; then
5162        if test "xpwd" = x; then
5163          PROG_NAME=thepwdcmd
5164        else
5165          PROG_NAME=pwd
5166        fi
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169        as_fn_error $? "Cannot continue" "$LINENO" 5
5170    fi
5171
5172
5173
5174    for ac_prog in rm
5175do
5176  # Extract the first word of "$ac_prog", so it can be a program name with args.
5177set dummy $ac_prog; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if test "${ac_cv_path_RM+set}" = set; then :
5181  $as_echo_n "(cached) " >&6
5182else
5183  case $RM in
5184  [\\/]* | ?:[\\/]*)
5185  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186  ;;
5187  *)
5188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191  IFS=$as_save_IFS
5192  test -z "$as_dir" && as_dir=.
5193    for ac_exec_ext in '' $ac_executable_extensions; do
5194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197    break 2
5198  fi
5199done
5200  done
5201IFS=$as_save_IFS
5202
5203  ;;
5204esac
5205fi
5206RM=$ac_cv_path_RM
5207if test -n "$RM"; then
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209$as_echo "$RM" >&6; }
5210else
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
5213fi
5214
5215
5216  test -n "$RM" && break
5217done
5218
5219
5220    if test "x$RM" = x; then
5221        if test "xrm" = x; then
5222          PROG_NAME=rm
5223        else
5224          PROG_NAME=rm
5225        fi
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228        as_fn_error $? "Cannot continue" "$LINENO" 5
5229    fi
5230
5231
5232
5233    for ac_prog in sh
5234do
5235  # Extract the first word of "$ac_prog", so it can be a program name with args.
5236set dummy $ac_prog; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if test "${ac_cv_path_SH+set}" = set; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $SH in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265SH=$ac_cv_path_SH
5266if test -n "$SH"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268$as_echo "$SH" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275  test -n "$SH" && break
5276done
5277
5278
5279    if test "x$SH" = x; then
5280        if test "xsh" = x; then
5281          PROG_NAME=sh
5282        else
5283          PROG_NAME=sh
5284        fi
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287        as_fn_error $? "Cannot continue" "$LINENO" 5
5288    fi
5289
5290
5291
5292    for ac_prog in sort
5293do
5294  # Extract the first word of "$ac_prog", so it can be a program name with args.
5295set dummy $ac_prog; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if test "${ac_cv_path_SORT+set}" = set; then :
5299  $as_echo_n "(cached) " >&6
5300else
5301  case $SORT in
5302  [\\/]* | ?:[\\/]*)
5303  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304  ;;
5305  *)
5306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309  IFS=$as_save_IFS
5310  test -z "$as_dir" && as_dir=.
5311    for ac_exec_ext in '' $ac_executable_extensions; do
5312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315    break 2
5316  fi
5317done
5318  done
5319IFS=$as_save_IFS
5320
5321  ;;
5322esac
5323fi
5324SORT=$ac_cv_path_SORT
5325if test -n "$SORT"; then
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327$as_echo "$SORT" >&6; }
5328else
5329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332
5333
5334  test -n "$SORT" && break
5335done
5336
5337
5338    if test "x$SORT" = x; then
5339        if test "xsort" = x; then
5340          PROG_NAME=sort
5341        else
5342          PROG_NAME=sort
5343        fi
5344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346        as_fn_error $? "Cannot continue" "$LINENO" 5
5347    fi
5348
5349
5350
5351    for ac_prog in tail
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if test "${ac_cv_path_TAIL+set}" = set; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $TAIL in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383TAIL=$ac_cv_path_TAIL
5384if test -n "$TAIL"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386$as_echo "$TAIL" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$TAIL" && break
5394done
5395
5396
5397    if test "x$TAIL" = x; then
5398        if test "xtail" = x; then
5399          PROG_NAME=tail
5400        else
5401          PROG_NAME=tail
5402        fi
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405        as_fn_error $? "Cannot continue" "$LINENO" 5
5406    fi
5407
5408
5409
5410    for ac_prog in tar
5411do
5412  # Extract the first word of "$ac_prog", so it can be a program name with args.
5413set dummy $ac_prog; ac_word=$2
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415$as_echo_n "checking for $ac_word... " >&6; }
5416if test "${ac_cv_path_TAR+set}" = set; then :
5417  $as_echo_n "(cached) " >&6
5418else
5419  case $TAR in
5420  [\\/]* | ?:[\\/]*)
5421  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422  ;;
5423  *)
5424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425for as_dir in $PATH
5426do
5427  IFS=$as_save_IFS
5428  test -z "$as_dir" && as_dir=.
5429    for ac_exec_ext in '' $ac_executable_extensions; do
5430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433    break 2
5434  fi
5435done
5436  done
5437IFS=$as_save_IFS
5438
5439  ;;
5440esac
5441fi
5442TAR=$ac_cv_path_TAR
5443if test -n "$TAR"; then
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445$as_echo "$TAR" >&6; }
5446else
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450
5451
5452  test -n "$TAR" && break
5453done
5454
5455
5456    if test "x$TAR" = x; then
5457        if test "xtar" = x; then
5458          PROG_NAME=tar
5459        else
5460          PROG_NAME=tar
5461        fi
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464        as_fn_error $? "Cannot continue" "$LINENO" 5
5465    fi
5466
5467
5468
5469    for ac_prog in tee
5470do
5471  # Extract the first word of "$ac_prog", so it can be a program name with args.
5472set dummy $ac_prog; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if test "${ac_cv_path_TEE+set}" = set; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $TEE in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501TEE=$ac_cv_path_TEE
5502if test -n "$TEE"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504$as_echo "$TEE" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511  test -n "$TEE" && break
5512done
5513
5514
5515    if test "x$TEE" = x; then
5516        if test "xtee" = x; then
5517          PROG_NAME=tee
5518        else
5519          PROG_NAME=tee
5520        fi
5521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523        as_fn_error $? "Cannot continue" "$LINENO" 5
5524    fi
5525
5526
5527
5528    for ac_prog in touch
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if test "${ac_cv_path_TOUCH+set}" = set; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $TOUCH in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560TOUCH=$ac_cv_path_TOUCH
5561if test -n "$TOUCH"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563$as_echo "$TOUCH" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$TOUCH" && break
5571done
5572
5573
5574    if test "x$TOUCH" = x; then
5575        if test "xtouch" = x; then
5576          PROG_NAME=touch
5577        else
5578          PROG_NAME=touch
5579        fi
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582        as_fn_error $? "Cannot continue" "$LINENO" 5
5583    fi
5584
5585
5586
5587    for ac_prog in tr
5588do
5589  # Extract the first word of "$ac_prog", so it can be a program name with args.
5590set dummy $ac_prog; ac_word=$2
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592$as_echo_n "checking for $ac_word... " >&6; }
5593if test "${ac_cv_path_TR+set}" = set; then :
5594  $as_echo_n "(cached) " >&6
5595else
5596  case $TR in
5597  [\\/]* | ?:[\\/]*)
5598  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599  ;;
5600  *)
5601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602for as_dir in $PATH
5603do
5604  IFS=$as_save_IFS
5605  test -z "$as_dir" && as_dir=.
5606    for ac_exec_ext in '' $ac_executable_extensions; do
5607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610    break 2
5611  fi
5612done
5613  done
5614IFS=$as_save_IFS
5615
5616  ;;
5617esac
5618fi
5619TR=$ac_cv_path_TR
5620if test -n "$TR"; then
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622$as_echo "$TR" >&6; }
5623else
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625$as_echo "no" >&6; }
5626fi
5627
5628
5629  test -n "$TR" && break
5630done
5631
5632
5633    if test "x$TR" = x; then
5634        if test "xtr" = x; then
5635          PROG_NAME=tr
5636        else
5637          PROG_NAME=tr
5638        fi
5639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641        as_fn_error $? "Cannot continue" "$LINENO" 5
5642    fi
5643
5644
5645
5646    for ac_prog in uname
5647do
5648  # Extract the first word of "$ac_prog", so it can be a program name with args.
5649set dummy $ac_prog; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if test "${ac_cv_path_UNAME+set}" = set; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $UNAME in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678UNAME=$ac_cv_path_UNAME
5679if test -n "$UNAME"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681$as_echo "$UNAME" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688  test -n "$UNAME" && break
5689done
5690
5691
5692    if test "x$UNAME" = x; then
5693        if test "xuname" = x; then
5694          PROG_NAME=uname
5695        else
5696          PROG_NAME=uname
5697        fi
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700        as_fn_error $? "Cannot continue" "$LINENO" 5
5701    fi
5702
5703
5704
5705    for ac_prog in uniq
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if test "${ac_cv_path_UNIQ+set}" = set; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $UNIQ in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737UNIQ=$ac_cv_path_UNIQ
5738if test -n "$UNIQ"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740$as_echo "$UNIQ" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$UNIQ" && break
5748done
5749
5750
5751    if test "x$UNIQ" = x; then
5752        if test "xuniq" = x; then
5753          PROG_NAME=uniq
5754        else
5755          PROG_NAME=uniq
5756        fi
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759        as_fn_error $? "Cannot continue" "$LINENO" 5
5760    fi
5761
5762
5763
5764    for ac_prog in wc
5765do
5766  # Extract the first word of "$ac_prog", so it can be a program name with args.
5767set dummy $ac_prog; ac_word=$2
5768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769$as_echo_n "checking for $ac_word... " >&6; }
5770if test "${ac_cv_path_WC+set}" = set; then :
5771  $as_echo_n "(cached) " >&6
5772else
5773  case $WC in
5774  [\\/]* | ?:[\\/]*)
5775  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776  ;;
5777  *)
5778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793  ;;
5794esac
5795fi
5796WC=$ac_cv_path_WC
5797if test -n "$WC"; then
5798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799$as_echo "$WC" >&6; }
5800else
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802$as_echo "no" >&6; }
5803fi
5804
5805
5806  test -n "$WC" && break
5807done
5808
5809
5810    if test "x$WC" = x; then
5811        if test "xwc" = x; then
5812          PROG_NAME=wc
5813        else
5814          PROG_NAME=wc
5815        fi
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818        as_fn_error $? "Cannot continue" "$LINENO" 5
5819    fi
5820
5821
5822
5823    for ac_prog in which
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if test "${ac_cv_path_WHICH+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $WHICH in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855WHICH=$ac_cv_path_WHICH
5856if test -n "$WHICH"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858$as_echo "$WHICH" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$WHICH" && break
5866done
5867
5868
5869    if test "x$WHICH" = x; then
5870        if test "xwhich" = x; then
5871          PROG_NAME=which
5872        else
5873          PROG_NAME=which
5874        fi
5875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877        as_fn_error $? "Cannot continue" "$LINENO" 5
5878    fi
5879
5880
5881
5882    for ac_prog in xargs
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if test "${ac_cv_path_XARGS+set}" = set; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $XARGS in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914XARGS=$ac_cv_path_XARGS
5915if test -n "$XARGS"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917$as_echo "$XARGS" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$XARGS" && break
5925done
5926
5927
5928    if test "x$XARGS" = x; then
5929        if test "xxargs" = x; then
5930          PROG_NAME=xargs
5931        else
5932          PROG_NAME=xargs
5933        fi
5934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936        as_fn_error $? "Cannot continue" "$LINENO" 5
5937    fi
5938
5939
5940
5941# Then required tools that require some special treatment.
5942for ac_prog in gawk mawk nawk awk
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if test "${ac_cv_prog_AWK+set}" = set; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  if test -n "$AWK"; then
5952  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961    ac_cv_prog_AWK="$ac_prog"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AWK=$ac_cv_prog_AWK
5972if test -n "$AWK"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974$as_echo "$AWK" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$AWK" && break
5982done
5983
5984
5985    if test "x$AWK" = x; then
5986        if test "x" = x; then
5987          PROG_NAME=awk
5988        else
5989          PROG_NAME=
5990        fi
5991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993        as_fn_error $? "Cannot continue" "$LINENO" 5
5994    fi
5995
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998if test "${ac_cv_path_GREP+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  if test -z "$GREP"; then
6002  ac_path_GREP_found=false
6003  # Loop through the user's path and test for each of PROGNAME-LIST
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_prog in grep ggrep; do
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013# Check for GNU ac_path_GREP and select it if it is found.
6014  # Check for GNU $ac_path_GREP
6015case `"$ac_path_GREP" --version 2>&1` in
6016*GNU*)
6017  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018*)
6019  ac_count=0
6020  $as_echo_n 0123456789 >"conftest.in"
6021  while :
6022  do
6023    cat "conftest.in" "conftest.in" >"conftest.tmp"
6024    mv "conftest.tmp" "conftest.in"
6025    cp "conftest.in" "conftest.nl"
6026    $as_echo 'GREP' >> "conftest.nl"
6027    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029    as_fn_arith $ac_count + 1 && ac_count=$as_val
6030    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031      # Best one so far, save it but keep looking for a better one
6032      ac_cv_path_GREP="$ac_path_GREP"
6033      ac_path_GREP_max=$ac_count
6034    fi
6035    # 10*(2^10) chars as input seems more than enough
6036    test $ac_count -gt 10 && break
6037  done
6038  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039esac
6040
6041      $ac_path_GREP_found && break 3
6042    done
6043  done
6044  done
6045IFS=$as_save_IFS
6046  if test -z "$ac_cv_path_GREP"; then
6047    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048  fi
6049else
6050  ac_cv_path_GREP=$GREP
6051fi
6052
6053fi
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055$as_echo "$ac_cv_path_GREP" >&6; }
6056 GREP="$ac_cv_path_GREP"
6057
6058
6059
6060    if test "x$GREP" = x; then
6061        if test "x" = x; then
6062          PROG_NAME=grep
6063        else
6064          PROG_NAME=
6065        fi
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068        as_fn_error $? "Cannot continue" "$LINENO" 5
6069    fi
6070
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072$as_echo_n "checking for egrep... " >&6; }
6073if test "${ac_cv_path_EGREP+set}" = set; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077   then ac_cv_path_EGREP="$GREP -E"
6078   else
6079     if test -z "$EGREP"; then
6080  ac_path_EGREP_found=false
6081  # Loop through the user's path and test for each of PROGNAME-LIST
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_prog in egrep; do
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091# Check for GNU ac_path_EGREP and select it if it is found.
6092  # Check for GNU $ac_path_EGREP
6093case `"$ac_path_EGREP" --version 2>&1` in
6094*GNU*)
6095  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096*)
6097  ac_count=0
6098  $as_echo_n 0123456789 >"conftest.in"
6099  while :
6100  do
6101    cat "conftest.in" "conftest.in" >"conftest.tmp"
6102    mv "conftest.tmp" "conftest.in"
6103    cp "conftest.in" "conftest.nl"
6104    $as_echo 'EGREP' >> "conftest.nl"
6105    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107    as_fn_arith $ac_count + 1 && ac_count=$as_val
6108    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109      # Best one so far, save it but keep looking for a better one
6110      ac_cv_path_EGREP="$ac_path_EGREP"
6111      ac_path_EGREP_max=$ac_count
6112    fi
6113    # 10*(2^10) chars as input seems more than enough
6114    test $ac_count -gt 10 && break
6115  done
6116  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117esac
6118
6119      $ac_path_EGREP_found && break 3
6120    done
6121  done
6122  done
6123IFS=$as_save_IFS
6124  if test -z "$ac_cv_path_EGREP"; then
6125    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126  fi
6127else
6128  ac_cv_path_EGREP=$EGREP
6129fi
6130
6131   fi
6132fi
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134$as_echo "$ac_cv_path_EGREP" >&6; }
6135 EGREP="$ac_cv_path_EGREP"
6136
6137
6138
6139    if test "x$EGREP" = x; then
6140        if test "x" = x; then
6141          PROG_NAME=egrep
6142        else
6143          PROG_NAME=
6144        fi
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147        as_fn_error $? "Cannot continue" "$LINENO" 5
6148    fi
6149
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151$as_echo_n "checking for fgrep... " >&6; }
6152if test "${ac_cv_path_FGREP+set}" = set; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156   then ac_cv_path_FGREP="$GREP -F"
6157   else
6158     if test -z "$FGREP"; then
6159  ac_path_FGREP_found=false
6160  # Loop through the user's path and test for each of PROGNAME-LIST
6161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163do
6164  IFS=$as_save_IFS
6165  test -z "$as_dir" && as_dir=.
6166    for ac_prog in fgrep; do
6167    for ac_exec_ext in '' $ac_executable_extensions; do
6168      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170# Check for GNU ac_path_FGREP and select it if it is found.
6171  # Check for GNU $ac_path_FGREP
6172case `"$ac_path_FGREP" --version 2>&1` in
6173*GNU*)
6174  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175*)
6176  ac_count=0
6177  $as_echo_n 0123456789 >"conftest.in"
6178  while :
6179  do
6180    cat "conftest.in" "conftest.in" >"conftest.tmp"
6181    mv "conftest.tmp" "conftest.in"
6182    cp "conftest.in" "conftest.nl"
6183    $as_echo 'FGREP' >> "conftest.nl"
6184    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186    as_fn_arith $ac_count + 1 && ac_count=$as_val
6187    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188      # Best one so far, save it but keep looking for a better one
6189      ac_cv_path_FGREP="$ac_path_FGREP"
6190      ac_path_FGREP_max=$ac_count
6191    fi
6192    # 10*(2^10) chars as input seems more than enough
6193    test $ac_count -gt 10 && break
6194  done
6195  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196esac
6197
6198      $ac_path_FGREP_found && break 3
6199    done
6200  done
6201  done
6202IFS=$as_save_IFS
6203  if test -z "$ac_cv_path_FGREP"; then
6204    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205  fi
6206else
6207  ac_cv_path_FGREP=$FGREP
6208fi
6209
6210   fi
6211fi
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213$as_echo "$ac_cv_path_FGREP" >&6; }
6214 FGREP="$ac_cv_path_FGREP"
6215
6216
6217
6218    if test "x$FGREP" = x; then
6219        if test "x" = x; then
6220          PROG_NAME=fgrep
6221        else
6222          PROG_NAME=
6223        fi
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226        as_fn_error $? "Cannot continue" "$LINENO" 5
6227    fi
6228
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231if test "${ac_cv_path_SED+set}" = set; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235     for ac_i in 1 2 3 4 5 6 7; do
6236       ac_script="$ac_script$as_nl$ac_script"
6237     done
6238     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239     { ac_script=; unset ac_script;}
6240     if test -z "$SED"; then
6241  ac_path_SED_found=false
6242  # Loop through the user's path and test for each of PROGNAME-LIST
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_prog in sed gsed; do
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252# Check for GNU ac_path_SED and select it if it is found.
6253  # Check for GNU $ac_path_SED
6254case `"$ac_path_SED" --version 2>&1` in
6255*GNU*)
6256  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257*)
6258  ac_count=0
6259  $as_echo_n 0123456789 >"conftest.in"
6260  while :
6261  do
6262    cat "conftest.in" "conftest.in" >"conftest.tmp"
6263    mv "conftest.tmp" "conftest.in"
6264    cp "conftest.in" "conftest.nl"
6265    $as_echo '' >> "conftest.nl"
6266    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268    as_fn_arith $ac_count + 1 && ac_count=$as_val
6269    if test $ac_count -gt ${ac_path_SED_max-0}; then
6270      # Best one so far, save it but keep looking for a better one
6271      ac_cv_path_SED="$ac_path_SED"
6272      ac_path_SED_max=$ac_count
6273    fi
6274    # 10*(2^10) chars as input seems more than enough
6275    test $ac_count -gt 10 && break
6276  done
6277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278esac
6279
6280      $ac_path_SED_found && break 3
6281    done
6282  done
6283  done
6284IFS=$as_save_IFS
6285  if test -z "$ac_cv_path_SED"; then
6286    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287  fi
6288else
6289  ac_cv_path_SED=$SED
6290fi
6291
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294$as_echo "$ac_cv_path_SED" >&6; }
6295 SED="$ac_cv_path_SED"
6296  rm -f conftest.sed
6297
6298
6299    if test "x$SED" = x; then
6300        if test "x" = x; then
6301          PROG_NAME=sed
6302        else
6303          PROG_NAME=
6304        fi
6305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307        as_fn_error $? "Cannot continue" "$LINENO" 5
6308    fi
6309
6310
6311for ac_prog in nawk gawk awk
6312do
6313  # Extract the first word of "$ac_prog", so it can be a program name with args.
6314set dummy $ac_prog; ac_word=$2
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316$as_echo_n "checking for $ac_word... " >&6; }
6317if test "${ac_cv_path_NAWK+set}" = set; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  case $NAWK in
6321  [\\/]* | ?:[\\/]*)
6322  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323  ;;
6324  *)
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334    break 2
6335  fi
6336done
6337  done
6338IFS=$as_save_IFS
6339
6340  ;;
6341esac
6342fi
6343NAWK=$ac_cv_path_NAWK
6344if test -n "$NAWK"; then
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346$as_echo "$NAWK" >&6; }
6347else
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
6350fi
6351
6352
6353  test -n "$NAWK" && break
6354done
6355
6356
6357    if test "x$NAWK" = x; then
6358        if test "x" = x; then
6359          PROG_NAME=nawk
6360        else
6361          PROG_NAME=
6362        fi
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365        as_fn_error $? "Cannot continue" "$LINENO" 5
6366    fi
6367
6368
6369# Always force rm.
6370RM="$RM -f"
6371
6372# These are not required on all platforms
6373# Extract the first word of "cygpath", so it can be a program name with args.
6374set dummy cygpath; ac_word=$2
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376$as_echo_n "checking for $ac_word... " >&6; }
6377if test "${ac_cv_path_CYGPATH+set}" = set; then :
6378  $as_echo_n "(cached) " >&6
6379else
6380  case $CYGPATH in
6381  [\\/]* | ?:[\\/]*)
6382  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6383  ;;
6384  *)
6385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386for as_dir in $PATH
6387do
6388  IFS=$as_save_IFS
6389  test -z "$as_dir" && as_dir=.
6390    for ac_exec_ext in '' $ac_executable_extensions; do
6391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6392    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394    break 2
6395  fi
6396done
6397  done
6398IFS=$as_save_IFS
6399
6400  ;;
6401esac
6402fi
6403CYGPATH=$ac_cv_path_CYGPATH
6404if test -n "$CYGPATH"; then
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6406$as_echo "$CYGPATH" >&6; }
6407else
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412
6413# Extract the first word of "readlink", so it can be a program name with args.
6414set dummy readlink; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if test "${ac_cv_path_READLINK+set}" = set; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $READLINK in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6432    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443READLINK=$ac_cv_path_READLINK
6444if test -n "$READLINK"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6446$as_echo "$READLINK" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453# Extract the first word of "df", so it can be a program name with args.
6454set dummy df; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if test "${ac_cv_path_DF+set}" = set; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $DF in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6472    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483DF=$ac_cv_path_DF
6484if test -n "$DF"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6486$as_echo "$DF" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493# Extract the first word of "SetFile", so it can be a program name with args.
6494set dummy SetFile; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if test "${ac_cv_path_SETFILE+set}" = set; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $SETFILE in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6512    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523SETFILE=$ac_cv_path_SETFILE
6524if test -n "$SETFILE"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6526$as_echo "$SETFILE" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533
6534
6535# Now we can determine OpenJDK build and target platforms. This is required to
6536# have early on.
6537# Make sure we can run config.sub.
6538$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6539  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6540
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6542$as_echo_n "checking build system type... " >&6; }
6543if test "${ac_cv_build+set}" = set; then :
6544  $as_echo_n "(cached) " >&6
6545else
6546  ac_build_alias=$build_alias
6547test "x$ac_build_alias" = x &&
6548  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6549test "x$ac_build_alias" = x &&
6550  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6551ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6552  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6553
6554fi
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6556$as_echo "$ac_cv_build" >&6; }
6557case $ac_cv_build in
6558*-*-*) ;;
6559*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6560esac
6561build=$ac_cv_build
6562ac_save_IFS=$IFS; IFS='-'
6563set x $ac_cv_build
6564shift
6565build_cpu=$1
6566build_vendor=$2
6567shift; shift
6568# Remember, the first character of IFS is used to create $*,
6569# except with old shells:
6570build_os=$*
6571IFS=$ac_save_IFS
6572case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6573
6574
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6576$as_echo_n "checking host system type... " >&6; }
6577if test "${ac_cv_host+set}" = set; then :
6578  $as_echo_n "(cached) " >&6
6579else
6580  if test "x$host_alias" = x; then
6581  ac_cv_host=$ac_cv_build
6582else
6583  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6584    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6585fi
6586
6587fi
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6589$as_echo "$ac_cv_host" >&6; }
6590case $ac_cv_host in
6591*-*-*) ;;
6592*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6593esac
6594host=$ac_cv_host
6595ac_save_IFS=$IFS; IFS='-'
6596set x $ac_cv_host
6597shift
6598host_cpu=$1
6599host_vendor=$2
6600shift; shift
6601# Remember, the first character of IFS is used to create $*,
6602# except with old shells:
6603host_os=$*
6604IFS=$ac_save_IFS
6605case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6606
6607
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6609$as_echo_n "checking target system type... " >&6; }
6610if test "${ac_cv_target+set}" = set; then :
6611  $as_echo_n "(cached) " >&6
6612else
6613  if test "x$target_alias" = x; then
6614  ac_cv_target=$ac_cv_host
6615else
6616  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6617    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6618fi
6619
6620fi
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6622$as_echo "$ac_cv_target" >&6; }
6623case $ac_cv_target in
6624*-*-*) ;;
6625*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6626esac
6627target=$ac_cv_target
6628ac_save_IFS=$IFS; IFS='-'
6629set x $ac_cv_target
6630shift
6631target_cpu=$1
6632target_vendor=$2
6633shift; shift
6634# Remember, the first character of IFS is used to create $*,
6635# except with old shells:
6636target_os=$*
6637IFS=$ac_save_IFS
6638case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6639
6640
6641# The aliases save the names the user supplied, while $host etc.
6642# will get canonicalized.
6643test -n "$target_alias" &&
6644  test "$program_prefix$program_suffix$program_transform_name" = \
6645    NONENONEs,x,x, &&
6646  program_prefix=${target_alias}-
6647
6648# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6649# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6650# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6651# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6652# to use the configure naming style.
6653
6654
6655
6656
6657
6658    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6659    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6660    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6661    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6662    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6663    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6664
6665
6666
6667    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6668
6669  case "$build_os" in
6670    *linux*)
6671      VAR_OS=linux
6672      VAR_OS_API=posix
6673      VAR_OS_ENV=linux
6674      ;;
6675    *solaris*)
6676      VAR_OS=solaris
6677      VAR_OS_API=posix
6678      VAR_OS_ENV=solaris
6679      ;;
6680    *darwin*)
6681      VAR_OS=macosx
6682      VAR_OS_API=posix
6683      VAR_OS_ENV=macosx
6684      ;;
6685    *bsd*)
6686      VAR_OS=bsd
6687      VAR_OS_API=posix
6688      VAR_OS_ENV=bsd
6689      ;;
6690    *cygwin*)
6691      VAR_OS=windows
6692      VAR_OS_API=winapi
6693      VAR_OS_ENV=windows.cygwin
6694      ;;
6695    *mingw*)
6696      VAR_OS=windows
6697      VAR_OS_API=winapi
6698      VAR_OS_ENV=windows.msys
6699      ;;
6700    *)
6701      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6702      ;;
6703  esac
6704
6705
6706  # First argument is the cpu name from the trip/quad
6707  case "$build_cpu" in
6708    x86_64)
6709      VAR_CPU=x86_64
6710      VAR_CPU_ARCH=x86
6711      VAR_CPU_BITS=64
6712      VAR_CPU_ENDIAN=little
6713      ;;
6714    i?86)
6715      VAR_CPU=x86
6716      VAR_CPU_ARCH=x86
6717      VAR_CPU_BITS=32
6718      VAR_CPU_ENDIAN=little
6719      ;;
6720    arm*)
6721      VAR_CPU=arm
6722      VAR_CPU_ARCH=arm
6723      VAR_CPU_BITS=32
6724      VAR_CPU_ENDIAN=little
6725      ;;
6726    powerpc)
6727      VAR_CPU=ppc
6728      VAR_CPU_ARCH=ppc
6729      VAR_CPU_BITS=32
6730      VAR_CPU_ENDIAN=big
6731       ;;
6732    powerpc64)
6733      VAR_CPU=ppc64
6734      VAR_CPU_ARCH=ppc
6735      VAR_CPU_BITS=64
6736      VAR_CPU_ENDIAN=big
6737       ;;
6738    sparc)
6739      VAR_CPU=sparc
6740      VAR_CPU_ARCH=sparc
6741      VAR_CPU_BITS=32
6742      VAR_CPU_ENDIAN=big
6743       ;;
6744    sparcv9)
6745      VAR_CPU=sparcv9
6746      VAR_CPU_ARCH=sparc
6747      VAR_CPU_BITS=64
6748      VAR_CPU_ENDIAN=big
6749       ;;
6750    *)
6751      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6752      ;;
6753  esac
6754
6755    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6756    OPENJDK_BUILD_OS="$VAR_OS"
6757    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6758    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6759    OPENJDK_BUILD_CPU="$VAR_CPU"
6760    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6761    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6762    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6763
6764
6765
6766
6767
6768
6769
6770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6771$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6773$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6774
6775    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6776
6777  case "$host_os" in
6778    *linux*)
6779      VAR_OS=linux
6780      VAR_OS_API=posix
6781      VAR_OS_ENV=linux
6782      ;;
6783    *solaris*)
6784      VAR_OS=solaris
6785      VAR_OS_API=posix
6786      VAR_OS_ENV=solaris
6787      ;;
6788    *darwin*)
6789      VAR_OS=macosx
6790      VAR_OS_API=posix
6791      VAR_OS_ENV=macosx
6792      ;;
6793    *bsd*)
6794      VAR_OS=bsd
6795      VAR_OS_API=posix
6796      VAR_OS_ENV=bsd
6797      ;;
6798    *cygwin*)
6799      VAR_OS=windows
6800      VAR_OS_API=winapi
6801      VAR_OS_ENV=windows.cygwin
6802      ;;
6803    *mingw*)
6804      VAR_OS=windows
6805      VAR_OS_API=winapi
6806      VAR_OS_ENV=windows.msys
6807      ;;
6808    *)
6809      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6810      ;;
6811  esac
6812
6813
6814  # First argument is the cpu name from the trip/quad
6815  case "$host_cpu" in
6816    x86_64)
6817      VAR_CPU=x86_64
6818      VAR_CPU_ARCH=x86
6819      VAR_CPU_BITS=64
6820      VAR_CPU_ENDIAN=little
6821      ;;
6822    i?86)
6823      VAR_CPU=x86
6824      VAR_CPU_ARCH=x86
6825      VAR_CPU_BITS=32
6826      VAR_CPU_ENDIAN=little
6827      ;;
6828    arm*)
6829      VAR_CPU=arm
6830      VAR_CPU_ARCH=arm
6831      VAR_CPU_BITS=32
6832      VAR_CPU_ENDIAN=little
6833      ;;
6834    powerpc)
6835      VAR_CPU=ppc
6836      VAR_CPU_ARCH=ppc
6837      VAR_CPU_BITS=32
6838      VAR_CPU_ENDIAN=big
6839       ;;
6840    powerpc64)
6841      VAR_CPU=ppc64
6842      VAR_CPU_ARCH=ppc
6843      VAR_CPU_BITS=64
6844      VAR_CPU_ENDIAN=big
6845       ;;
6846    sparc)
6847      VAR_CPU=sparc
6848      VAR_CPU_ARCH=sparc
6849      VAR_CPU_BITS=32
6850      VAR_CPU_ENDIAN=big
6851       ;;
6852    sparcv9)
6853      VAR_CPU=sparcv9
6854      VAR_CPU_ARCH=sparc
6855      VAR_CPU_BITS=64
6856      VAR_CPU_ENDIAN=big
6857       ;;
6858    *)
6859      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6860      ;;
6861  esac
6862
6863    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6864    OPENJDK_TARGET_OS="$VAR_OS"
6865    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6866    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6867    OPENJDK_TARGET_CPU="$VAR_CPU"
6868    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6869    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6870    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6871
6872
6873
6874
6875
6876
6877
6878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6879$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6881$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6882
6883
6884
6885# Check whether --with-target-bits was given.
6886if test "${with_target_bits+set}" = set; then :
6887  withval=$with_target_bits;
6888fi
6889
6890
6891  # We have three types of compiles:
6892  # native  == normal compilation, target system == build system
6893  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6894  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6895  #
6896  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6897    # We're doing a proper cross-compilation
6898    COMPILE_TYPE="cross"
6899  else
6900    COMPILE_TYPE="native"
6901  fi
6902
6903  if test "x$with_target_bits" != x; then
6904    if test "x$COMPILE_TYPE" = "xcross"; then
6905      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6906    fi
6907
6908    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6909      # A reduced build is requested
6910      COMPILE_TYPE="reduced"
6911      OPENJDK_TARGET_CPU_BITS=32
6912      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6913        OPENJDK_TARGET_CPU=x86
6914      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6915        OPENJDK_TARGET_CPU=sparc
6916      else
6917        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6918      fi
6919    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6920      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
6921    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6922      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6923$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6924    else
6925      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6926    fi
6927  fi
6928
6929
6930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6931$as_echo_n "checking compilation type... " >&6; }
6932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6933$as_echo "$COMPILE_TYPE" >&6; }
6934
6935
6936    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6937       REQUIRED_OS_NAME=SunOS
6938       REQUIRED_OS_VERSION=5.10
6939    fi
6940    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6941       REQUIRED_OS_NAME=Linux
6942       REQUIRED_OS_VERSION=2.6
6943    fi
6944    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6945        REQUIRED_OS_NAME=Windows
6946        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6947            REQUIRED_OS_VERSION=5.2
6948        else
6949            REQUIRED_OS_VERSION=5.1
6950        fi
6951    fi
6952    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6953        REQUIRED_OS_NAME=Darwin
6954        REQUIRED_OS_VERSION=11.2
6955    fi
6956
6957
6958
6959
6960
6961    # Also store the legacy naming of the cpu.
6962    # Ie i586 and amd64 instead of x86 and x86_64
6963    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6964    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6965      OPENJDK_TARGET_CPU_LEGACY="i586"
6966    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6967      # On all platforms except MacOSX replace x86_64 with amd64.
6968      OPENJDK_TARGET_CPU_LEGACY="amd64"
6969    fi
6970
6971
6972    # And the second legacy naming of the cpu.
6973    # Ie i386 and amd64 instead of x86 and x86_64.
6974    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6975    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6976      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6977    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6978      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6979    fi
6980
6981
6982    # This is the name of the cpu (but using i386 and amd64 instead of
6983    # x86 and x86_64, respectively), preceeded by a /, to be used when
6984    # locating libraries. On macosx, it's empty, though.
6985    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6986    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6987        OPENJDK_TARGET_CPU_LIBDIR=""
6988    fi
6989
6990
6991    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6992    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6993    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6994    OPENJDK_TARGET_CPU_ISADIR=""
6995    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6996      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6997          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6998      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6999          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7000      fi
7001    fi
7002
7003
7004    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7005    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7006    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7007      # On linux only, we replace x86 with i386.
7008      OPENJDK_TARGET_CPU_OSARCH="i386"
7009    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7010      # On all platforms except macosx, we replace x86_64 with amd64.
7011      OPENJDK_TARGET_CPU_OSARCH="amd64"
7012    fi
7013
7014
7015    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7016    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7017      OPENJDK_TARGET_CPU_JLI="i386"
7018    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019      # On all platforms except macosx, we replace x86_64 with amd64.
7020      OPENJDK_TARGET_CPU_JLI="amd64"
7021    fi
7022    # Now setup the -D flags for building libjli.
7023    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7024    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7025      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7026        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7027      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7028        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7029      fi
7030    fi
7031
7032
7033    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7034    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7035        OPENJDK_TARGET_OS_API_DIR="solaris"
7036    fi
7037    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7038        OPENJDK_TARGET_OS_API_DIR="windows"
7039    fi
7040
7041
7042    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7043        A_LP64="LP64:="
7044        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7045        # unpack200.exe
7046        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7047            ADD_LP64="-D_LP64=1"
7048        fi
7049    fi
7050    LP64=$A_LP64
7051
7052
7053    if test "x$COMPILE_TYPE" = "xcross"; then
7054      # FIXME: ... or should this include reduced builds..?
7055      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7056    else
7057      DEFINE_CROSS_COMPILE_ARCH=""
7058    fi
7059
7060
7061
7062
7063# Continue setting up basic stuff. Most remaining code require fundamental tools.
7064
7065# Locate the directory of this script.
7066SCRIPT="$0"
7067
7068    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7069        # Follow a chain of symbolic links. Use readlink
7070        # where it exists, else fall back to horribly
7071        # complicated shell code.
7072        if test "x$READLINK_TESTED" != yes; then
7073            # On MacOSX there is a readlink tool with a different
7074            # purpose than the GNU readlink tool. Check the found readlink.
7075            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7076            if test "x$ISGNU" = x; then
7077                 # A readlink that we do not know how to use.
7078                 # Are there other non-GNU readlinks out there?
7079                 READLINK_TESTED=yes
7080                 READLINK=
7081            fi
7082        fi
7083
7084        if test "x$READLINK" != x; then
7085            SCRIPT=`$READLINK -f $SCRIPT`
7086        else
7087            # Save the current directory for restoring afterwards
7088            STARTDIR=$PWD
7089            COUNTER=0
7090            sym_link_dir=`$DIRNAME $SCRIPT`
7091            sym_link_file=`$BASENAME $SCRIPT`
7092            # Use the system pwd and not the shell builtin to resolve directory symlinks
7093            cd $sym_link_dir
7094            cd `$THEPWDCMD`
7095            sym_link_dir=`$THEPWDCMD`
7096            # Resolve file symlinks
7097            while test $COUNTER -lt 20; do
7098                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7099                if test "x$ISLINK" == x; then
7100                    # This is not a symbolic link! We are done!
7101                    break
7102                fi
7103                # Again resolve directory symlinks since the target of the just found
7104                # link could be in a different directory
7105                cd `$DIRNAME $ISLINK`
7106                sym_link_dir=`$THEPWDCMD`
7107                sym_link_file=`$BASENAME $ISLINK`
7108                let COUNTER=COUNTER+1
7109            done
7110            cd $STARTDIR
7111            SCRIPT=$sym_link_dir/$sym_link_file
7112        fi
7113    fi
7114
7115AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7116
7117# Where is the source? It is located two levels above the configure script.
7118CURDIR="$PWD"
7119cd "$AUTOCONF_DIR/../.."
7120SRC_ROOT="`$THEPWDCMD`"
7121
7122if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7123  PATH_SEP=";"
7124
7125  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7126  if test $SRC_ROOT_LENGTH -gt 100; then
7127      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7128  fi
7129
7130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7132$as_echo_n "checking cygwin release... " >&6; }
7133    CYGWIN_VERSION=`$UNAME -r`
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7135$as_echo "$CYGWIN_VERSION" >&6; }
7136    WINDOWS_ENV_VENDOR='cygwin'
7137    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7138
7139    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7140    if test "x$CYGWIN_VERSION_OK" = x; then
7141      { $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
7142$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;}
7143      as_fn_error $? "Cannot continue" "$LINENO" 5
7144    fi
7145    if test "x$CYGPATH" = x; then
7146        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7147    fi
7148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7149$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7150    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7151    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7152    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7153    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7155$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7156    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7157    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7158    if test "x$test_cygdrive_prefix" = x; then
7159        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7160    fi
7161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7163$as_echo_n "checking msys release... " >&6; }
7164    MSYS_VERSION=`$UNAME -r`
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7166$as_echo "$MSYS_VERSION" >&6; }
7167
7168    WINDOWS_ENV_VENDOR='msys'
7169    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7170
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7172$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7173    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7174    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7175
7176  windows_path="$MSYS_ROOT_PATH"
7177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7178    unix_path=`$CYGPATH -u "$windows_path"`
7179    MSYS_ROOT_PATH="$unix_path"
7180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7182    MSYS_ROOT_PATH="$unix_path"
7183  fi
7184
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7186$as_echo "$MSYS_ROOT_PATH" >&6; }
7187    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7188  else
7189    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7190  fi
7191
7192  # Test if windows or unix (cygwin/msys) find is first in path.
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7194$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7195  FIND_BINARY_OUTPUT=`find --version 2>&1`
7196  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7198$as_echo "unix style" >&6; }
7199  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7201$as_echo "Windows" >&6; }
7202    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7203$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7204    { $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
7205$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7206    as_fn_error $? "Cannot continue" "$LINENO" 5
7207  else
7208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7209$as_echo "unknown" >&6; }
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7211$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7212  fi
7213
7214else
7215  PATH_SEP=":"
7216fi
7217
7218
7219
7220cd "$CURDIR"
7221
7222
7223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7224
7225  # Input might be given as Windows format, start by converting to
7226  # unix format.
7227  path="$SRC_ROOT"
7228  new_path=`$CYGPATH -u "$path"`
7229
7230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7233  # "foo.exe" is OK but "foo" is an error.
7234  #
7235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7236  # It is also a way to make sure we got the proper file name for the real test later on.
7237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7238  if test "x$test_shortpath" = x; then
7239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7240$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7241    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7242  fi
7243
7244  # Call helper function which possibly converts this using DOS-style short mode.
7245  # If so, the updated path is stored in $new_path.
7246
7247  input_path="$new_path"
7248  # Check if we need to convert this using DOS-style short mode. If the path
7249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7250  # take no chances and rewrite it.
7251  # Note: m4 eats our [], so we need to use [ and ] instead.
7252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7253  if test "x$has_forbidden_chars" != x; then
7254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7258      # Going to short mode and back again did indeed matter. Since short mode is
7259      # case insensitive, let's make it lowercase to improve readability.
7260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7261      # Now convert it back to Unix-stile (cygpath)
7262      input_path=`$CYGPATH -u "$shortmode_path"`
7263      new_path="$input_path"
7264    fi
7265  fi
7266
7267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7268  if test "x$test_cygdrive_prefix" = x; then
7269    # As a simple fix, exclude /usr/bin since it's not a real path.
7270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7272      # a path prefixed by /cygdrive for fixpath to work.
7273      new_path="$CYGWIN_ROOT_PATH$input_path"
7274    fi
7275  fi
7276
7277
7278  if test "x$path" != "x$new_path"; then
7279    SRC_ROOT="$new_path"
7280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7281$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7282  fi
7283
7284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7285
7286  path="$SRC_ROOT"
7287  has_colon=`$ECHO $path | $GREP ^.:`
7288  new_path="$path"
7289  if test "x$has_colon" = x; then
7290    # Not in mixed or Windows style, start by that.
7291    new_path=`cmd //c echo $path`
7292  fi
7293
7294
7295  input_path="$new_path"
7296  # Check if we need to convert this using DOS-style short mode. If the path
7297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7298  # take no chances and rewrite it.
7299  # Note: m4 eats our [], so we need to use [ and ] instead.
7300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7301  if test "x$has_forbidden_chars" != x; then
7302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7304  fi
7305
7306
7307  windows_path="$new_path"
7308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7309    unix_path=`$CYGPATH -u "$windows_path"`
7310    new_path="$unix_path"
7311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7313    new_path="$unix_path"
7314  fi
7315
7316  if test "x$path" != "x$new_path"; then
7317    SRC_ROOT="$new_path"
7318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7319$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7320  fi
7321
7322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7324
7325  else
7326    # We're on a posix platform. Hooray! :)
7327    path="$SRC_ROOT"
7328
7329    if test ! -f "$path" && test ! -d "$path"; then
7330      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7331    fi
7332
7333    has_space=`$ECHO "$path" | $GREP " "`
7334    if test "x$has_space" != x; then
7335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7336$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7337      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7338    fi
7339  fi
7340
7341
7342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7343
7344  # Input might be given as Windows format, start by converting to
7345  # unix format.
7346  path="$CURDIR"
7347  new_path=`$CYGPATH -u "$path"`
7348
7349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7352  # "foo.exe" is OK but "foo" is an error.
7353  #
7354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7355  # It is also a way to make sure we got the proper file name for the real test later on.
7356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7357  if test "x$test_shortpath" = x; then
7358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7359$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7360    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7361  fi
7362
7363  # Call helper function which possibly converts this using DOS-style short mode.
7364  # If so, the updated path is stored in $new_path.
7365
7366  input_path="$new_path"
7367  # Check if we need to convert this using DOS-style short mode. If the path
7368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7369  # take no chances and rewrite it.
7370  # Note: m4 eats our [], so we need to use [ and ] instead.
7371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7372  if test "x$has_forbidden_chars" != x; then
7373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7377      # Going to short mode and back again did indeed matter. Since short mode is
7378      # case insensitive, let's make it lowercase to improve readability.
7379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7380      # Now convert it back to Unix-stile (cygpath)
7381      input_path=`$CYGPATH -u "$shortmode_path"`
7382      new_path="$input_path"
7383    fi
7384  fi
7385
7386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7387  if test "x$test_cygdrive_prefix" = x; then
7388    # As a simple fix, exclude /usr/bin since it's not a real path.
7389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7391      # a path prefixed by /cygdrive for fixpath to work.
7392      new_path="$CYGWIN_ROOT_PATH$input_path"
7393    fi
7394  fi
7395
7396
7397  if test "x$path" != "x$new_path"; then
7398    CURDIR="$new_path"
7399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7400$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7401  fi
7402
7403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7404
7405  path="$CURDIR"
7406  has_colon=`$ECHO $path | $GREP ^.:`
7407  new_path="$path"
7408  if test "x$has_colon" = x; then
7409    # Not in mixed or Windows style, start by that.
7410    new_path=`cmd //c echo $path`
7411  fi
7412
7413
7414  input_path="$new_path"
7415  # Check if we need to convert this using DOS-style short mode. If the path
7416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7417  # take no chances and rewrite it.
7418  # Note: m4 eats our [], so we need to use [ and ] instead.
7419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7420  if test "x$has_forbidden_chars" != x; then
7421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7423  fi
7424
7425
7426  windows_path="$new_path"
7427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7428    unix_path=`$CYGPATH -u "$windows_path"`
7429    new_path="$unix_path"
7430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7432    new_path="$unix_path"
7433  fi
7434
7435  if test "x$path" != "x$new_path"; then
7436    CURDIR="$new_path"
7437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7438$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7439  fi
7440
7441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7443
7444  else
7445    # We're on a posix platform. Hooray! :)
7446    path="$CURDIR"
7447
7448    if test ! -f "$path" && test ! -d "$path"; then
7449      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7450    fi
7451
7452    has_space=`$ECHO "$path" | $GREP " "`
7453    if test "x$has_space" != x; then
7454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7455$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7456      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7457    fi
7458  fi
7459
7460
7461if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7462    # Add extra search paths on solaris for utilities like ar and as etc...
7463    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7464fi
7465
7466# You can force the sys-root if the sys-root encoded into the cross compiler tools
7467# is not correct.
7468
7469# Check whether --with-sys-root was given.
7470if test "${with_sys_root+set}" = set; then :
7471  withval=$with_sys_root;
7472fi
7473
7474
7475if test "x$with_sys_root" != x; then
7476  SYS_ROOT=$with_sys_root
7477else
7478  SYS_ROOT=/
7479fi
7480
7481
7482
7483# Check whether --with-tools-dir was given.
7484if test "${with_tools_dir+set}" = set; then :
7485  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7486fi
7487
7488
7489
7490# Check whether --with-devkit was given.
7491if test "${with_devkit+set}" = set; then :
7492  withval=$with_devkit;
7493    if test "x$with_sys_root" != x; then
7494      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7495    fi
7496    if test "x$with_tools_dir" != x; then
7497      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7498    fi
7499    TOOLS_DIR=$with_devkit/bin
7500    SYS_ROOT=$with_devkit/$host_alias/libc
7501
7502fi
7503
7504
7505
7506
7507# Setup default logging of stdout and stderr to build.log in the output root.
7508BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7509BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7510BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7511
7512
7513
7514
7515
7516# Check if it's a pure open build or if custom sources are to be used.
7517
7518  # Check whether --enable-openjdk-only was given.
7519if test "${enable_openjdk_only+set}" = set; then :
7520  enableval=$enable_openjdk_only;
7521else
7522  enable_openjdk_only="no"
7523fi
7524
7525
7526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7527$as_echo_n "checking for presence of closed sources... " >&6; }
7528  if test -d "$SRC_ROOT/jdk/src/closed"; then
7529    CLOSED_SOURCE_PRESENT=yes
7530  else
7531    CLOSED_SOURCE_PRESENT=no
7532  fi
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7534$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7535
7536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7537$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7538  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7540$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7541
7542  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7543    OPENJDK=true
7544    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7545      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7546$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7547    fi
7548  else
7549    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7550      OPENJDK=true
7551    else
7552      OPENJDK=false
7553    fi
7554  fi
7555
7556  if test "x$OPENJDK" = "xtrue"; then
7557    SET_OPENJDK="OPENJDK=true"
7558  fi
7559
7560
7561
7562
7563# These are needed to be able to create a configuration name (and thus the output directory)
7564
7565###############################################################################
7566#
7567# Check which variant of the JDK that we want to build.
7568# Currently we have:
7569#    normal:   standard edition
7570# but the custom make system may add other variants
7571#
7572# Effectively the JDK variant gives a name to a specific set of
7573# modules to compile into the JDK. In the future, these modules
7574# might even be Jigsaw modules.
7575#
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7577$as_echo_n "checking which variant of the JDK to build... " >&6; }
7578
7579# Check whether --with-jdk-variant was given.
7580if test "${with_jdk_variant+set}" = set; then :
7581  withval=$with_jdk_variant;
7582fi
7583
7584
7585if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7586    JDK_VARIANT="normal"
7587else
7588    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7589fi
7590
7591
7592
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7594$as_echo "$JDK_VARIANT" >&6; }
7595
7596
7597
7598###############################################################################
7599#
7600# Check which variants of the JVM that we want to build.
7601# Currently we have:
7602#    server: normal interpreter and a tiered C1/C2 compiler
7603#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7604#    minimal1: reduced form of client with optional VM services and features stripped out
7605#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7606#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7607#    zero: no machine code interpreter, no compiler
7608#    zeroshark: zero interpreter and shark/llvm compiler backend
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7610$as_echo_n "checking which variants of the JVM to build... " >&6; }
7611
7612# Check whether --with-jvm-variants was given.
7613if test "${with_jvm_variants+set}" = set; then :
7614  withval=$with_jvm_variants;
7615fi
7616
7617
7618if test "x$with_jvm_variants" = x; then
7619     with_jvm_variants="server"
7620fi
7621
7622JVM_VARIANTS=",$with_jvm_variants,"
7623TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7624
7625if test "x$TEST_VARIANTS" != "x,"; then
7626   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7627fi
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7629$as_echo "$with_jvm_variants" >&6; }
7630
7631JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7632JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7633JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7634JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7635JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7636JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7637
7638if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7639    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7640        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7641    fi
7642fi
7643if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7644    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7645        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7646    fi
7647fi
7648if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7649    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7650        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7651    fi
7652fi
7653
7654# Replace the commas with AND for use in the build directory name.
7655ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7656COUNT_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/'`
7657if test "x$COUNT_VARIANTS" != "x,1"; then
7658    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7659else
7660    BUILDING_MULTIPLE_JVM_VARIANTS=no
7661fi
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7672   MACOSX_UNIVERSAL="true"
7673fi
7674
7675
7676
7677
7678
7679###############################################################################
7680#
7681# Set the debug level
7682#    release: no debug information, all optimizations, no asserts.
7683#    fastdebug: debug information (-g), all optimizations, all asserts
7684#    slowdebug: debug information (-g), no optimizations, all asserts
7685#
7686DEBUG_LEVEL="release"
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7688$as_echo_n "checking which debug level to use... " >&6; }
7689# Check whether --enable-debug was given.
7690if test "${enable_debug+set}" = set; then :
7691  enableval=$enable_debug;
7692        ENABLE_DEBUG="${enableval}"
7693        DEBUG_LEVEL="fastdebug"
7694
7695else
7696  ENABLE_DEBUG="no"
7697fi
7698
7699
7700
7701# Check whether --with-debug-level was given.
7702if test "${with_debug_level+set}" = set; then :
7703  withval=$with_debug_level;
7704        DEBUG_LEVEL="${withval}"
7705        if test "x$ENABLE_DEBUG" = xyes; then
7706			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7707        fi
7708
7709fi
7710
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7712$as_echo "$DEBUG_LEVEL" >&6; }
7713
7714if test "x$DEBUG_LEVEL" != xrelease && \
7715   test "x$DEBUG_LEVEL" != xfastdebug && \
7716   test "x$DEBUG_LEVEL" != xslowdebug; then
7717   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7718fi
7719
7720
7721###############################################################################
7722#
7723# Setup legacy vars/targets and new vars to deal with different debug levels.
7724#
7725
7726case $DEBUG_LEVEL in
7727      release )
7728          VARIANT="OPT"
7729          FASTDEBUG="false"
7730          DEBUG_CLASSFILES="false"
7731          BUILD_VARIANT_RELEASE=""
7732          HOTSPOT_DEBUG_LEVEL="product"
7733          HOTSPOT_EXPORT="product"
7734           ;;
7735      fastdebug )
7736          VARIANT="DBG"
7737          FASTDEBUG="true"
7738          DEBUG_CLASSFILES="true"
7739          BUILD_VARIANT_RELEASE="-fastdebug"
7740          HOTSPOT_DEBUG_LEVEL="fastdebug"
7741          HOTSPOT_EXPORT="fastdebug"
7742           ;;
7743      slowdebug )
7744          VARIANT="DBG"
7745          FASTDEBUG="false"
7746          DEBUG_CLASSFILES="true"
7747          BUILD_VARIANT_RELEASE="-debug"
7748          HOTSPOT_DEBUG_LEVEL="jvmg"
7749          HOTSPOT_EXPORT="debug"
7750           ;;
7751esac
7752
7753#####
7754# Generate the legacy makefile targets for hotspot.
7755# The hotspot api for selecting the build artifacts, really, needs to be improved.
7756# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7757# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7758# But until then ...
7759HOTSPOT_TARGET=""
7760
7761if test "x$JVM_VARIANT_SERVER" = xtrue; then
7762    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7763fi
7764
7765if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7766    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7767fi
7768
7769if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7770    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7771fi
7772
7773if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7774    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7775fi
7776
7777if test "x$JVM_VARIANT_ZERO" = xtrue; then
7778    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7779fi
7780
7781if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7782    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7783fi
7784
7785HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7786
7787# On Macosx universal binaries are produced, but they only contain
7788# 64 bit intel. This invalidates control of which jvms are built
7789# from configure, but only server is valid anyway. Fix this
7790# when hotspot makefiles are rewritten.
7791if test "x$MACOSX_UNIVERSAL" = xtrue; then
7792    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7793fi
7794
7795#####
7796
7797
7798
7799
7800
7801
7802
7803
7804# With basic setup done, call the custom early hook.
7805
7806
7807# To properly create a configuration name, we need to have the OpenJDK target
7808# and options (variants and debug level) parsed.
7809
7810
7811
7812# Check whether --with-conf-name was given.
7813if test "${with_conf_name+set}" = set; then :
7814  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7815fi
7816
7817
7818# Test from where we are running configure, in or outside of src root.
7819# To enable comparison of directories, CURDIR needs to be symlink free
7820# just like SRC_ROOT already is
7821NOSYM_CURDIR="$CURDIR"
7822
7823    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7824        # Follow a chain of symbolic links. Use readlink
7825        # where it exists, else fall back to horribly
7826        # complicated shell code.
7827        if test "x$READLINK_TESTED" != yes; then
7828            # On MacOSX there is a readlink tool with a different
7829            # purpose than the GNU readlink tool. Check the found readlink.
7830            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7831            if test "x$ISGNU" = x; then
7832                 # A readlink that we do not know how to use.
7833                 # Are there other non-GNU readlinks out there?
7834                 READLINK_TESTED=yes
7835                 READLINK=
7836            fi
7837        fi
7838
7839        if test "x$READLINK" != x; then
7840            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7841        else
7842            # Save the current directory for restoring afterwards
7843            STARTDIR=$PWD
7844            COUNTER=0
7845            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7846            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7847            # Use the system pwd and not the shell builtin to resolve directory symlinks
7848            cd $sym_link_dir
7849            cd `$THEPWDCMD`
7850            sym_link_dir=`$THEPWDCMD`
7851            # Resolve file symlinks
7852            while test $COUNTER -lt 20; do
7853                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7854                if test "x$ISLINK" == x; then
7855                    # This is not a symbolic link! We are done!
7856                    break
7857                fi
7858                # Again resolve directory symlinks since the target of the just found
7859                # link could be in a different directory
7860                cd `$DIRNAME $ISLINK`
7861                sym_link_dir=`$THEPWDCMD`
7862                sym_link_file=`$BASENAME $ISLINK`
7863                let COUNTER=COUNTER+1
7864            done
7865            cd $STARTDIR
7866            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7867        fi
7868    fi
7869
7870if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7871        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7872        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7873    # We are running configure from the src root.
7874    # Create a default ./build/target-variant-debuglevel output root.
7875    if test "x${CONF_NAME}" = x; then
7876        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7877    fi
7878    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7879    $MKDIR -p "$OUTPUT_ROOT"
7880    if test ! -d "$OUTPUT_ROOT"; then
7881        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7882    fi
7883else
7884    # We are running configure from outside of the src dir.
7885    # Then use the current directory as output dir!
7886    # If configuration is situated in normal build directory, just use the build
7887    # directory name as configuration name, otherwise use the complete path.
7888    if test "x${CONF_NAME}" = x; then
7889        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7890    fi
7891    OUTPUT_ROOT="$CURDIR"
7892
7893    # WARNING: This might be a bad thing to do. You need to be sure you want to
7894    # have a configuration in this directory. Do some sanity checks!
7895
7896    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7897      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7898      # other files
7899      files_present=`$LS $OUTPUT_ROOT`
7900      # Configure has already touched config.log and confdefs.h in the current dir when this check
7901      # is performed.
7902      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7903                                             | $TR -d '\n'`
7904      if test "x$filtered_files" != x; then
7905        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7906$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7908$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7909        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7910$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7911        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7912$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7913        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7914$as_echo "$as_me: seriously mess up just about everything." >&6;}
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7916$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7918$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7919        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7920      fi
7921    fi
7922fi
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7924$as_echo_n "checking what configuration name to use... " >&6; }
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7926$as_echo "$CONF_NAME" >&6; }
7927
7928
7929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7930
7931  # Input might be given as Windows format, start by converting to
7932  # unix format.
7933  path="$OUTPUT_ROOT"
7934  new_path=`$CYGPATH -u "$path"`
7935
7936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7939  # "foo.exe" is OK but "foo" is an error.
7940  #
7941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7942  # It is also a way to make sure we got the proper file name for the real test later on.
7943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7944  if test "x$test_shortpath" = x; then
7945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7946$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7947    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7948  fi
7949
7950  # Call helper function which possibly converts this using DOS-style short mode.
7951  # If so, the updated path is stored in $new_path.
7952
7953  input_path="$new_path"
7954  # Check if we need to convert this using DOS-style short mode. If the path
7955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7956  # take no chances and rewrite it.
7957  # Note: m4 eats our [], so we need to use [ and ] instead.
7958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7959  if test "x$has_forbidden_chars" != x; then
7960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7964      # Going to short mode and back again did indeed matter. Since short mode is
7965      # case insensitive, let's make it lowercase to improve readability.
7966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7967      # Now convert it back to Unix-stile (cygpath)
7968      input_path=`$CYGPATH -u "$shortmode_path"`
7969      new_path="$input_path"
7970    fi
7971  fi
7972
7973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7974  if test "x$test_cygdrive_prefix" = x; then
7975    # As a simple fix, exclude /usr/bin since it's not a real path.
7976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7978      # a path prefixed by /cygdrive for fixpath to work.
7979      new_path="$CYGWIN_ROOT_PATH$input_path"
7980    fi
7981  fi
7982
7983
7984  if test "x$path" != "x$new_path"; then
7985    OUTPUT_ROOT="$new_path"
7986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7987$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7988  fi
7989
7990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7991
7992  path="$OUTPUT_ROOT"
7993  has_colon=`$ECHO $path | $GREP ^.:`
7994  new_path="$path"
7995  if test "x$has_colon" = x; then
7996    # Not in mixed or Windows style, start by that.
7997    new_path=`cmd //c echo $path`
7998  fi
7999
8000
8001  input_path="$new_path"
8002  # Check if we need to convert this using DOS-style short mode. If the path
8003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8004  # take no chances and rewrite it.
8005  # Note: m4 eats our [], so we need to use [ and ] instead.
8006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8007  if test "x$has_forbidden_chars" != x; then
8008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8010  fi
8011
8012
8013  windows_path="$new_path"
8014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8015    unix_path=`$CYGPATH -u "$windows_path"`
8016    new_path="$unix_path"
8017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8019    new_path="$unix_path"
8020  fi
8021
8022  if test "x$path" != "x$new_path"; then
8023    OUTPUT_ROOT="$new_path"
8024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8025$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8026  fi
8027
8028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8030
8031  else
8032    # We're on a posix platform. Hooray! :)
8033    path="$OUTPUT_ROOT"
8034
8035    if test ! -f "$path" && test ! -d "$path"; then
8036      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8037    fi
8038
8039    has_space=`$ECHO "$path" | $GREP " "`
8040    if test "x$has_space" != x; then
8041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8042$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8043      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8044    fi
8045  fi
8046
8047
8048SPEC=$OUTPUT_ROOT/spec.gmk
8049
8050CONF_NAME=$CONF_NAME
8051
8052OUTPUT_ROOT=$OUTPUT_ROOT
8053
8054
8055# Most of the probed defines are put into config.h
8056ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8057
8058# The spec.gmk file contains all variables for the make system.
8059ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8060
8061# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8062ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8063
8064# The bootcycle-spec.gmk file contains support for boot cycle builds.
8065ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8066
8067# The compare.sh is used to compare the build output to other builds.
8068ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8069
8070# Spec.sh is currently used by compare-objects.sh
8071ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8072
8073# The generated Makefile knows where the spec.gmk is and where the source is.
8074# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8075# which will look for generated configurations
8076ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8077
8078
8079# Save the arguments given to us
8080echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8081
8082
8083# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8084
8085    for ac_prog in apt-get yum port pkgutil pkgadd
8086do
8087  # Extract the first word of "$ac_prog", so it can be a program name with args.
8088set dummy $ac_prog; ac_word=$2
8089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090$as_echo_n "checking for $ac_word... " >&6; }
8091if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8092  $as_echo_n "(cached) " >&6
8093else
8094  if test -n "$PKGHANDLER"; then
8095  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8096else
8097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098for as_dir in $PATH
8099do
8100  IFS=$as_save_IFS
8101  test -z "$as_dir" && as_dir=.
8102    for ac_exec_ext in '' $ac_executable_extensions; do
8103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8104    ac_cv_prog_PKGHANDLER="$ac_prog"
8105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106    break 2
8107  fi
8108done
8109  done
8110IFS=$as_save_IFS
8111
8112fi
8113fi
8114PKGHANDLER=$ac_cv_prog_PKGHANDLER
8115if test -n "$PKGHANDLER"; then
8116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8117$as_echo "$PKGHANDLER" >&6; }
8118else
8119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
8121fi
8122
8123
8124  test -n "$PKGHANDLER" && break
8125done
8126
8127
8128
8129# Setup tools that requires more complex handling, or that is not needed by the configure script.
8130
8131
8132  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8133  if test "x$MAKE" != x; then
8134    # User has supplied a make, test it.
8135    if test ! -f "$MAKE"; then
8136      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8137    fi
8138
8139  MAKE_CANDIDATE=""$MAKE""
8140  DESCRIPTION="user supplied MAKE=$MAKE"
8141  if test "x$MAKE_CANDIDATE" != x; then
8142    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8143$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8144    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8145    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8146    if test "x$IS_GNU_MAKE" = x; then
8147      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8148$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8149    else
8150      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8151      if test "x$IS_MODERN_MAKE" = x; then
8152        { $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
8153$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;}
8154      else
8155        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8156          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8157            MAKE_EXPECTED_ENV='cygwin'
8158          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8159            MAKE_EXPECTED_ENV='msys'
8160          else
8161            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8162          fi
8163          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8164          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8165        else
8166          # Not relevant for non-Windows
8167          IS_MAKE_CORRECT_ENV=true
8168        fi
8169        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8170          { $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
8171$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;}
8172        else
8173          FOUND_MAKE=$MAKE_CANDIDATE
8174
8175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8176
8177  # First separate the path from the arguments. This will split at the first
8178  # space.
8179  complete="$FOUND_MAKE"
8180  path="${complete%% *}"
8181  tmp="$complete EOL"
8182  arguments="${tmp#* }"
8183
8184  # Input might be given as Windows format, start by converting to
8185  # unix format.
8186  new_path=`$CYGPATH -u "$path"`
8187
8188  # Now try to locate executable using which
8189  new_path=`$WHICH "$new_path" 2> /dev/null`
8190  # bat and cmd files are not always considered executable in cygwin causing which
8191  # to not find them
8192  if test "x$new_path" = x \
8193           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8194           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8195    new_path=`$CYGPATH -u "$path"`
8196  fi
8197  if test "x$new_path" = x; then
8198    # Oops. Which didn't find the executable.
8199    # The splitting of arguments from the executable at a space might have been incorrect,
8200    # since paths with space are more likely in Windows. Give it another try with the whole
8201    # argument.
8202    path="$complete"
8203    arguments="EOL"
8204    new_path=`$CYGPATH -u "$path"`
8205    new_path=`$WHICH "$new_path" 2> /dev/null`
8206    # bat and cmd files are not always considered executable in cygwin causing which
8207    # to not find them
8208    if test "x$new_path" = x \
8209             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8210             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8211      new_path=`$CYGPATH -u "$path"`
8212    fi
8213    if test "x$new_path" = x; then
8214      # It's still not found. Now this is an unrecoverable error.
8215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8217      has_space=`$ECHO "$complete" | $GREP " "`
8218      if test "x$has_space" != x; then
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8221      fi
8222      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8223    fi
8224  fi
8225
8226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8229  # "foo.exe" is OK but "foo" is an error.
8230  #
8231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8232  # It is also a way to make sure we got the proper file name for the real test later on.
8233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8234  if test "x$test_shortpath" = x; then
8235    # Short path failed, file does not exist as specified.
8236    # Try adding .exe or .cmd
8237    if test -f "${new_path}.exe"; then
8238       input_to_shortpath="${new_path}.exe"
8239    elif test -f "${new_path}.cmd"; then
8240       input_to_shortpath="${new_path}.cmd"
8241    else
8242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8246      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8247    fi
8248  else
8249    input_to_shortpath="$new_path"
8250  fi
8251
8252  # Call helper function which possibly converts this using DOS-style short mode.
8253  # If so, the updated path is stored in $new_path.
8254  new_path="$input_to_shortpath"
8255
8256  input_path="$input_to_shortpath"
8257  # Check if we need to convert this using DOS-style short mode. If the path
8258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8259  # take no chances and rewrite it.
8260  # Note: m4 eats our [], so we need to use [ and ] instead.
8261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8262  if test "x$has_forbidden_chars" != x; then
8263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8267      # Going to short mode and back again did indeed matter. Since short mode is
8268      # case insensitive, let's make it lowercase to improve readability.
8269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8270      # Now convert it back to Unix-stile (cygpath)
8271      input_path=`$CYGPATH -u "$shortmode_path"`
8272      new_path="$input_path"
8273    fi
8274  fi
8275
8276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8277  if test "x$test_cygdrive_prefix" = x; then
8278    # As a simple fix, exclude /usr/bin since it's not a real path.
8279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8281      # a path prefixed by /cygdrive for fixpath to work.
8282      new_path="$CYGWIN_ROOT_PATH$input_path"
8283    fi
8284  fi
8285
8286  # remove trailing .exe if any
8287  new_path="${new_path/%.exe/}"
8288
8289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8290
8291  # First separate the path from the arguments. This will split at the first
8292  # space.
8293  complete="$FOUND_MAKE"
8294  path="${complete%% *}"
8295  tmp="$complete EOL"
8296  arguments="${tmp#* }"
8297
8298  # Input might be given as Windows format, start by converting to
8299  # unix format.
8300  new_path="$path"
8301
8302  windows_path="$new_path"
8303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8304    unix_path=`$CYGPATH -u "$windows_path"`
8305    new_path="$unix_path"
8306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8308    new_path="$unix_path"
8309  fi
8310
8311
8312  # Now try to locate executable using which
8313  new_path=`$WHICH "$new_path" 2> /dev/null`
8314
8315  if test "x$new_path" = x; then
8316    # Oops. Which didn't find the executable.
8317    # The splitting of arguments from the executable at a space might have been incorrect,
8318    # since paths with space are more likely in Windows. Give it another try with the whole
8319    # argument.
8320    path="$complete"
8321    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
8335
8336    if test "x$new_path" = x; then
8337      # It's still not found. Now this is an unrecoverable error.
8338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8339$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8340      has_space=`$ECHO "$complete" | $GREP " "`
8341      if test "x$has_space" != x; then
8342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8344      fi
8345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8346    fi
8347  fi
8348
8349  # Now new_path has a complete unix path to the binary
8350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8351    # Keep paths in /bin as-is, but remove trailing .exe if any
8352    new_path="${new_path/%.exe/}"
8353    # Do not save /bin paths to all_fixpath_prefixes!
8354  else
8355    # Not in mixed or Windows style, start by that.
8356    new_path=`cmd //c echo $new_path`
8357
8358  input_path="$new_path"
8359  # Check if we need to convert this using DOS-style short mode. If the path
8360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8361  # take no chances and rewrite it.
8362  # Note: m4 eats our [], so we need to use [ and ] instead.
8363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8364  if test "x$has_forbidden_chars" != x; then
8365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8367  fi
8368
8369    # Output is in $new_path
8370
8371  windows_path="$new_path"
8372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8373    unix_path=`$CYGPATH -u "$windows_path"`
8374    new_path="$unix_path"
8375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8377    new_path="$unix_path"
8378  fi
8379
8380    # remove trailing .exe if any
8381    new_path="${new_path/%.exe/}"
8382
8383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8385  fi
8386
8387  else
8388    # We're on a posix platform. Hooray! :)
8389    # First separate the path from the arguments. This will split at the first
8390    # space.
8391    complete="$FOUND_MAKE"
8392    path="${complete%% *}"
8393    tmp="$complete EOL"
8394    arguments="${tmp#* }"
8395
8396    # Cannot rely on the command "which" here since it doesn't always work.
8397    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8398    if test -z "$is_absolute_path"; then
8399      # Path to executable is not absolute. Find it.
8400      IFS_save="$IFS"
8401      IFS=:
8402      for p in $PATH; do
8403        if test -f "$p/$path" && test -x "$p/$path"; then
8404          new_path="$p/$path"
8405          break
8406        fi
8407      done
8408      IFS="$IFS_save"
8409    else
8410      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8411$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8412      new_path="$path"
8413    fi
8414
8415    if test "x$new_path" = x; then
8416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8417$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8418        has_space=`$ECHO "$complete" | $GREP " "`
8419        if test "x$has_space" != x; then
8420          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8421$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8422        fi
8423        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8424      fi
8425  fi
8426
8427      # Now join together the path and the arguments once again
8428      if test "x$arguments" != xEOL; then
8429        new_complete="$new_path ${arguments% *}"
8430      else
8431        new_complete="$new_path"
8432      fi
8433
8434  if test "x$complete" != "x$new_complete"; then
8435      FOUND_MAKE="$new_complete"
8436      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8437$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8438    fi
8439
8440        fi
8441      fi
8442    fi
8443  fi
8444
8445    if test "x$FOUND_MAKE" = x; then
8446      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8447    fi
8448  else
8449    # Try our hardest to locate a correct version of GNU make
8450    for ac_prog in gmake
8451do
8452  # Extract the first word of "$ac_prog", so it can be a program name with args.
8453set dummy $ac_prog; ac_word=$2
8454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455$as_echo_n "checking for $ac_word... " >&6; }
8456if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8457  $as_echo_n "(cached) " >&6
8458else
8459  case $CHECK_GMAKE in
8460  [\\/]* | ?:[\\/]*)
8461  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8462  ;;
8463  *)
8464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465for as_dir in $PATH
8466do
8467  IFS=$as_save_IFS
8468  test -z "$as_dir" && as_dir=.
8469    for ac_exec_ext in '' $ac_executable_extensions; do
8470  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8471    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473    break 2
8474  fi
8475done
8476  done
8477IFS=$as_save_IFS
8478
8479  ;;
8480esac
8481fi
8482CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8483if test -n "$CHECK_GMAKE"; then
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8485$as_echo "$CHECK_GMAKE" >&6; }
8486else
8487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488$as_echo "no" >&6; }
8489fi
8490
8491
8492  test -n "$CHECK_GMAKE" && break
8493done
8494
8495
8496  MAKE_CANDIDATE=""$CHECK_GMAKE""
8497  DESCRIPTION="gmake in PATH"
8498  if test "x$MAKE_CANDIDATE" != x; then
8499    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8500$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8501    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8502    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8503    if test "x$IS_GNU_MAKE" = x; then
8504      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8505$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8506    else
8507      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8508      if test "x$IS_MODERN_MAKE" = x; then
8509        { $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
8510$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;}
8511      else
8512        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8513          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8514            MAKE_EXPECTED_ENV='cygwin'
8515          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8516            MAKE_EXPECTED_ENV='msys'
8517          else
8518            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8519          fi
8520          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8521          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8522        else
8523          # Not relevant for non-Windows
8524          IS_MAKE_CORRECT_ENV=true
8525        fi
8526        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8527          { $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
8528$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;}
8529        else
8530          FOUND_MAKE=$MAKE_CANDIDATE
8531
8532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8533
8534  # First separate the path from the arguments. This will split at the first
8535  # space.
8536  complete="$FOUND_MAKE"
8537  path="${complete%% *}"
8538  tmp="$complete EOL"
8539  arguments="${tmp#* }"
8540
8541  # Input might be given as Windows format, start by converting to
8542  # unix format.
8543  new_path=`$CYGPATH -u "$path"`
8544
8545  # Now try to locate executable using which
8546  new_path=`$WHICH "$new_path" 2> /dev/null`
8547  # bat and cmd files are not always considered executable in cygwin causing which
8548  # to not find them
8549  if test "x$new_path" = x \
8550           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8551           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8552    new_path=`$CYGPATH -u "$path"`
8553  fi
8554  if test "x$new_path" = x; then
8555    # Oops. Which didn't find the executable.
8556    # The splitting of arguments from the executable at a space might have been incorrect,
8557    # since paths with space are more likely in Windows. Give it another try with the whole
8558    # argument.
8559    path="$complete"
8560    arguments="EOL"
8561    new_path=`$CYGPATH -u "$path"`
8562    new_path=`$WHICH "$new_path" 2> /dev/null`
8563    # bat and cmd files are not always considered executable in cygwin causing which
8564    # to not find them
8565    if test "x$new_path" = x \
8566             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8567             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8568      new_path=`$CYGPATH -u "$path"`
8569    fi
8570    if test "x$new_path" = x; then
8571      # It's still not found. Now this is an unrecoverable error.
8572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8574      has_space=`$ECHO "$complete" | $GREP " "`
8575      if test "x$has_space" != x; then
8576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8578      fi
8579      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8580    fi
8581  fi
8582
8583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8586  # "foo.exe" is OK but "foo" is an error.
8587  #
8588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8589  # It is also a way to make sure we got the proper file name for the real test later on.
8590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8591  if test "x$test_shortpath" = x; then
8592    # Short path failed, file does not exist as specified.
8593    # Try adding .exe or .cmd
8594    if test -f "${new_path}.exe"; then
8595       input_to_shortpath="${new_path}.exe"
8596    elif test -f "${new_path}.cmd"; then
8597       input_to_shortpath="${new_path}.cmd"
8598    else
8599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8600$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8603      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8604    fi
8605  else
8606    input_to_shortpath="$new_path"
8607  fi
8608
8609  # Call helper function which possibly converts this using DOS-style short mode.
8610  # If so, the updated path is stored in $new_path.
8611  new_path="$input_to_shortpath"
8612
8613  input_path="$input_to_shortpath"
8614  # Check if we need to convert this using DOS-style short mode. If the path
8615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8616  # take no chances and rewrite it.
8617  # Note: m4 eats our [], so we need to use [ and ] instead.
8618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8619  if test "x$has_forbidden_chars" != x; then
8620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8624      # Going to short mode and back again did indeed matter. Since short mode is
8625      # case insensitive, let's make it lowercase to improve readability.
8626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8627      # Now convert it back to Unix-stile (cygpath)
8628      input_path=`$CYGPATH -u "$shortmode_path"`
8629      new_path="$input_path"
8630    fi
8631  fi
8632
8633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8634  if test "x$test_cygdrive_prefix" = x; then
8635    # As a simple fix, exclude /usr/bin since it's not a real path.
8636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8638      # a path prefixed by /cygdrive for fixpath to work.
8639      new_path="$CYGWIN_ROOT_PATH$input_path"
8640    fi
8641  fi
8642
8643  # remove trailing .exe if any
8644  new_path="${new_path/%.exe/}"
8645
8646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8647
8648  # First separate the path from the arguments. This will split at the first
8649  # space.
8650  complete="$FOUND_MAKE"
8651  path="${complete%% *}"
8652  tmp="$complete EOL"
8653  arguments="${tmp#* }"
8654
8655  # Input might be given as Windows format, start by converting to
8656  # unix format.
8657  new_path="$path"
8658
8659  windows_path="$new_path"
8660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8661    unix_path=`$CYGPATH -u "$windows_path"`
8662    new_path="$unix_path"
8663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8665    new_path="$unix_path"
8666  fi
8667
8668
8669  # Now try to locate executable using which
8670  new_path=`$WHICH "$new_path" 2> /dev/null`
8671
8672  if test "x$new_path" = x; then
8673    # Oops. Which didn't find the executable.
8674    # The splitting of arguments from the executable at a space might have been incorrect,
8675    # since paths with space are more likely in Windows. Give it another try with the whole
8676    # argument.
8677    path="$complete"
8678    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
8692
8693    if test "x$new_path" = x; then
8694      # It's still not found. Now this is an unrecoverable error.
8695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8697      has_space=`$ECHO "$complete" | $GREP " "`
8698      if test "x$has_space" != x; then
8699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8701      fi
8702      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8703    fi
8704  fi
8705
8706  # Now new_path has a complete unix path to the binary
8707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8708    # Keep paths in /bin as-is, but remove trailing .exe if any
8709    new_path="${new_path/%.exe/}"
8710    # Do not save /bin paths to all_fixpath_prefixes!
8711  else
8712    # Not in mixed or Windows style, start by that.
8713    new_path=`cmd //c echo $new_path`
8714
8715  input_path="$new_path"
8716  # Check if we need to convert this using DOS-style short mode. If the path
8717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8718  # take no chances and rewrite it.
8719  # Note: m4 eats our [], so we need to use [ and ] instead.
8720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8721  if test "x$has_forbidden_chars" != x; then
8722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8724  fi
8725
8726    # Output is in $new_path
8727
8728  windows_path="$new_path"
8729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8730    unix_path=`$CYGPATH -u "$windows_path"`
8731    new_path="$unix_path"
8732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8734    new_path="$unix_path"
8735  fi
8736
8737    # remove trailing .exe if any
8738    new_path="${new_path/%.exe/}"
8739
8740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8742  fi
8743
8744  else
8745    # We're on a posix platform. Hooray! :)
8746    # First separate the path from the arguments. This will split at the first
8747    # space.
8748    complete="$FOUND_MAKE"
8749    path="${complete%% *}"
8750    tmp="$complete EOL"
8751    arguments="${tmp#* }"
8752
8753    # Cannot rely on the command "which" here since it doesn't always work.
8754    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8755    if test -z "$is_absolute_path"; then
8756      # Path to executable is not absolute. Find it.
8757      IFS_save="$IFS"
8758      IFS=:
8759      for p in $PATH; do
8760        if test -f "$p/$path" && test -x "$p/$path"; then
8761          new_path="$p/$path"
8762          break
8763        fi
8764      done
8765      IFS="$IFS_save"
8766    else
8767      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8768$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8769      new_path="$path"
8770    fi
8771
8772    if test "x$new_path" = x; then
8773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8774$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8775        has_space=`$ECHO "$complete" | $GREP " "`
8776        if test "x$has_space" != x; then
8777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8779        fi
8780        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8781      fi
8782  fi
8783
8784      # Now join together the path and the arguments once again
8785      if test "x$arguments" != xEOL; then
8786        new_complete="$new_path ${arguments% *}"
8787      else
8788        new_complete="$new_path"
8789      fi
8790
8791  if test "x$complete" != "x$new_complete"; then
8792      FOUND_MAKE="$new_complete"
8793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8794$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8795    fi
8796
8797        fi
8798      fi
8799    fi
8800  fi
8801
8802
8803    if test "x$FOUND_MAKE" = x; then
8804      for ac_prog in make
8805do
8806  # Extract the first word of "$ac_prog", so it can be a program name with args.
8807set dummy $ac_prog; ac_word=$2
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809$as_echo_n "checking for $ac_word... " >&6; }
8810if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8811  $as_echo_n "(cached) " >&6
8812else
8813  case $CHECK_MAKE in
8814  [\\/]* | ?:[\\/]*)
8815  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8816  ;;
8817  *)
8818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821  IFS=$as_save_IFS
8822  test -z "$as_dir" && as_dir=.
8823    for ac_exec_ext in '' $ac_executable_extensions; do
8824  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8825    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827    break 2
8828  fi
8829done
8830  done
8831IFS=$as_save_IFS
8832
8833  ;;
8834esac
8835fi
8836CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8837if test -n "$CHECK_MAKE"; then
8838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8839$as_echo "$CHECK_MAKE" >&6; }
8840else
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842$as_echo "no" >&6; }
8843fi
8844
8845
8846  test -n "$CHECK_MAKE" && break
8847done
8848
8849
8850  MAKE_CANDIDATE=""$CHECK_MAKE""
8851  DESCRIPTION="make in PATH"
8852  if test "x$MAKE_CANDIDATE" != x; then
8853    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8854$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8855    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8856    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8857    if test "x$IS_GNU_MAKE" = x; then
8858      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8859$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8860    else
8861      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8862      if test "x$IS_MODERN_MAKE" = x; then
8863        { $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
8864$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;}
8865      else
8866        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8867          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8868            MAKE_EXPECTED_ENV='cygwin'
8869          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8870            MAKE_EXPECTED_ENV='msys'
8871          else
8872            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8873          fi
8874          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8875          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8876        else
8877          # Not relevant for non-Windows
8878          IS_MAKE_CORRECT_ENV=true
8879        fi
8880        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8881          { $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
8882$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;}
8883        else
8884          FOUND_MAKE=$MAKE_CANDIDATE
8885
8886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8887
8888  # First separate the path from the arguments. This will split at the first
8889  # space.
8890  complete="$FOUND_MAKE"
8891  path="${complete%% *}"
8892  tmp="$complete EOL"
8893  arguments="${tmp#* }"
8894
8895  # Input might be given as Windows format, start by converting to
8896  # unix format.
8897  new_path=`$CYGPATH -u "$path"`
8898
8899  # Now try to locate executable using which
8900  new_path=`$WHICH "$new_path" 2> /dev/null`
8901  # bat and cmd files are not always considered executable in cygwin causing which
8902  # to not find them
8903  if test "x$new_path" = x \
8904           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8906    new_path=`$CYGPATH -u "$path"`
8907  fi
8908  if test "x$new_path" = x; then
8909    # Oops. Which didn't find the executable.
8910    # The splitting of arguments from the executable at a space might have been incorrect,
8911    # since paths with space are more likely in Windows. Give it another try with the whole
8912    # argument.
8913    path="$complete"
8914    arguments="EOL"
8915    new_path=`$CYGPATH -u "$path"`
8916    new_path=`$WHICH "$new_path" 2> /dev/null`
8917    # bat and cmd files are not always considered executable in cygwin causing which
8918    # to not find them
8919    if test "x$new_path" = x \
8920             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8922      new_path=`$CYGPATH -u "$path"`
8923    fi
8924    if test "x$new_path" = x; then
8925      # It's still not found. Now this is an unrecoverable error.
8926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8928      has_space=`$ECHO "$complete" | $GREP " "`
8929      if test "x$has_space" != x; then
8930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8932      fi
8933      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8934    fi
8935  fi
8936
8937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8940  # "foo.exe" is OK but "foo" is an error.
8941  #
8942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8943  # It is also a way to make sure we got the proper file name for the real test later on.
8944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8945  if test "x$test_shortpath" = x; then
8946    # Short path failed, file does not exist as specified.
8947    # Try adding .exe or .cmd
8948    if test -f "${new_path}.exe"; then
8949       input_to_shortpath="${new_path}.exe"
8950    elif test -f "${new_path}.cmd"; then
8951       input_to_shortpath="${new_path}.cmd"
8952    else
8953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8954$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8957      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8958    fi
8959  else
8960    input_to_shortpath="$new_path"
8961  fi
8962
8963  # Call helper function which possibly converts this using DOS-style short mode.
8964  # If so, the updated path is stored in $new_path.
8965  new_path="$input_to_shortpath"
8966
8967  input_path="$input_to_shortpath"
8968  # Check if we need to convert this using DOS-style short mode. If the path
8969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8970  # take no chances and rewrite it.
8971  # Note: m4 eats our [], so we need to use [ and ] instead.
8972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8973  if test "x$has_forbidden_chars" != x; then
8974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8978      # Going to short mode and back again did indeed matter. Since short mode is
8979      # case insensitive, let's make it lowercase to improve readability.
8980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8981      # Now convert it back to Unix-stile (cygpath)
8982      input_path=`$CYGPATH -u "$shortmode_path"`
8983      new_path="$input_path"
8984    fi
8985  fi
8986
8987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8988  if test "x$test_cygdrive_prefix" = x; then
8989    # As a simple fix, exclude /usr/bin since it's not a real path.
8990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8992      # a path prefixed by /cygdrive for fixpath to work.
8993      new_path="$CYGWIN_ROOT_PATH$input_path"
8994    fi
8995  fi
8996
8997  # remove trailing .exe if any
8998  new_path="${new_path/%.exe/}"
8999
9000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9001
9002  # First separate the path from the arguments. This will split at the first
9003  # space.
9004  complete="$FOUND_MAKE"
9005  path="${complete%% *}"
9006  tmp="$complete EOL"
9007  arguments="${tmp#* }"
9008
9009  # Input might be given as Windows format, start by converting to
9010  # unix format.
9011  new_path="$path"
9012
9013  windows_path="$new_path"
9014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9015    unix_path=`$CYGPATH -u "$windows_path"`
9016    new_path="$unix_path"
9017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9019    new_path="$unix_path"
9020  fi
9021
9022
9023  # Now try to locate executable using which
9024  new_path=`$WHICH "$new_path" 2> /dev/null`
9025
9026  if test "x$new_path" = x; then
9027    # Oops. Which didn't find the executable.
9028    # The splitting of arguments from the executable at a space might have been incorrect,
9029    # since paths with space are more likely in Windows. Give it another try with the whole
9030    # argument.
9031    path="$complete"
9032    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
9046
9047    if test "x$new_path" = x; then
9048      # It's still not found. Now this is an unrecoverable error.
9049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9051      has_space=`$ECHO "$complete" | $GREP " "`
9052      if test "x$has_space" != x; then
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9055      fi
9056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9057    fi
9058  fi
9059
9060  # Now new_path has a complete unix path to the binary
9061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9062    # Keep paths in /bin as-is, but remove trailing .exe if any
9063    new_path="${new_path/%.exe/}"
9064    # Do not save /bin paths to all_fixpath_prefixes!
9065  else
9066    # Not in mixed or Windows style, start by that.
9067    new_path=`cmd //c echo $new_path`
9068
9069  input_path="$new_path"
9070  # Check if we need to convert this using DOS-style short mode. If the path
9071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9072  # take no chances and rewrite it.
9073  # Note: m4 eats our [], so we need to use [ and ] instead.
9074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9075  if test "x$has_forbidden_chars" != x; then
9076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9078  fi
9079
9080    # Output is in $new_path
9081
9082  windows_path="$new_path"
9083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9084    unix_path=`$CYGPATH -u "$windows_path"`
9085    new_path="$unix_path"
9086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9088    new_path="$unix_path"
9089  fi
9090
9091    # remove trailing .exe if any
9092    new_path="${new_path/%.exe/}"
9093
9094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9096  fi
9097
9098  else
9099    # We're on a posix platform. Hooray! :)
9100    # First separate the path from the arguments. This will split at the first
9101    # space.
9102    complete="$FOUND_MAKE"
9103    path="${complete%% *}"
9104    tmp="$complete EOL"
9105    arguments="${tmp#* }"
9106
9107    # Cannot rely on the command "which" here since it doesn't always work.
9108    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9109    if test -z "$is_absolute_path"; then
9110      # Path to executable is not absolute. Find it.
9111      IFS_save="$IFS"
9112      IFS=:
9113      for p in $PATH; do
9114        if test -f "$p/$path" && test -x "$p/$path"; then
9115          new_path="$p/$path"
9116          break
9117        fi
9118      done
9119      IFS="$IFS_save"
9120    else
9121      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9122$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9123      new_path="$path"
9124    fi
9125
9126    if test "x$new_path" = x; then
9127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9129        has_space=`$ECHO "$complete" | $GREP " "`
9130        if test "x$has_space" != x; then
9131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9133        fi
9134        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9135      fi
9136  fi
9137
9138      # Now join together the path and the arguments once again
9139      if test "x$arguments" != xEOL; then
9140        new_complete="$new_path ${arguments% *}"
9141      else
9142        new_complete="$new_path"
9143      fi
9144
9145  if test "x$complete" != "x$new_complete"; then
9146      FOUND_MAKE="$new_complete"
9147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9148$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9149    fi
9150
9151        fi
9152      fi
9153    fi
9154  fi
9155
9156    fi
9157
9158    if test "x$FOUND_MAKE" = x; then
9159      if test "x$TOOLS_DIR" != x; then
9160        # We have a tools-dir, check that as well before giving up.
9161        OLD_PATH=$PATH
9162        PATH=$TOOLS_DIR:$PATH
9163        for ac_prog in gmake
9164do
9165  # Extract the first word of "$ac_prog", so it can be a program name with args.
9166set dummy $ac_prog; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $CHECK_TOOLSDIR_GMAKE in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9184    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9196if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9198$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9206done
9207
9208
9209  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9210  DESCRIPTION="gmake in tools-dir"
9211  if test "x$MAKE_CANDIDATE" != x; then
9212    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9213$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9214    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9215    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9216    if test "x$IS_GNU_MAKE" = x; then
9217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9218$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9219    else
9220      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9221      if test "x$IS_MODERN_MAKE" = x; then
9222        { $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
9223$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;}
9224      else
9225        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9226          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9227            MAKE_EXPECTED_ENV='cygwin'
9228          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9229            MAKE_EXPECTED_ENV='msys'
9230          else
9231            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9232          fi
9233          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9234          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9235        else
9236          # Not relevant for non-Windows
9237          IS_MAKE_CORRECT_ENV=true
9238        fi
9239        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9240          { $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
9241$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;}
9242        else
9243          FOUND_MAKE=$MAKE_CANDIDATE
9244
9245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9246
9247  # First separate the path from the arguments. This will split at the first
9248  # space.
9249  complete="$FOUND_MAKE"
9250  path="${complete%% *}"
9251  tmp="$complete EOL"
9252  arguments="${tmp#* }"
9253
9254  # Input might be given as Windows format, start by converting to
9255  # unix format.
9256  new_path=`$CYGPATH -u "$path"`
9257
9258  # Now try to locate executable using which
9259  new_path=`$WHICH "$new_path" 2> /dev/null`
9260  # bat and cmd files are not always considered executable in cygwin causing which
9261  # to not find them
9262  if test "x$new_path" = x \
9263           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9264           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9265    new_path=`$CYGPATH -u "$path"`
9266  fi
9267  if test "x$new_path" = x; then
9268    # Oops. Which didn't find the executable.
9269    # The splitting of arguments from the executable at a space might have been incorrect,
9270    # since paths with space are more likely in Windows. Give it another try with the whole
9271    # argument.
9272    path="$complete"
9273    arguments="EOL"
9274    new_path=`$CYGPATH -u "$path"`
9275    new_path=`$WHICH "$new_path" 2> /dev/null`
9276    # bat and cmd files are not always considered executable in cygwin causing which
9277    # to not find them
9278    if test "x$new_path" = x \
9279             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9280             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9281      new_path=`$CYGPATH -u "$path"`
9282    fi
9283    if test "x$new_path" = x; then
9284      # It's still not found. Now this is an unrecoverable error.
9285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9286$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9287      has_space=`$ECHO "$complete" | $GREP " "`
9288      if test "x$has_space" != x; then
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9291      fi
9292      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9293    fi
9294  fi
9295
9296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9299  # "foo.exe" is OK but "foo" is an error.
9300  #
9301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9302  # It is also a way to make sure we got the proper file name for the real test later on.
9303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9304  if test "x$test_shortpath" = x; then
9305    # Short path failed, file does not exist as specified.
9306    # Try adding .exe or .cmd
9307    if test -f "${new_path}.exe"; then
9308       input_to_shortpath="${new_path}.exe"
9309    elif test -f "${new_path}.cmd"; then
9310       input_to_shortpath="${new_path}.cmd"
9311    else
9312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9316      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9317    fi
9318  else
9319    input_to_shortpath="$new_path"
9320  fi
9321
9322  # Call helper function which possibly converts this using DOS-style short mode.
9323  # If so, the updated path is stored in $new_path.
9324  new_path="$input_to_shortpath"
9325
9326  input_path="$input_to_shortpath"
9327  # Check if we need to convert this using DOS-style short mode. If the path
9328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9329  # take no chances and rewrite it.
9330  # Note: m4 eats our [], so we need to use [ and ] instead.
9331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9332  if test "x$has_forbidden_chars" != x; then
9333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9337      # Going to short mode and back again did indeed matter. Since short mode is
9338      # case insensitive, let's make it lowercase to improve readability.
9339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9340      # Now convert it back to Unix-stile (cygpath)
9341      input_path=`$CYGPATH -u "$shortmode_path"`
9342      new_path="$input_path"
9343    fi
9344  fi
9345
9346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9347  if test "x$test_cygdrive_prefix" = x; then
9348    # As a simple fix, exclude /usr/bin since it's not a real path.
9349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9351      # a path prefixed by /cygdrive for fixpath to work.
9352      new_path="$CYGWIN_ROOT_PATH$input_path"
9353    fi
9354  fi
9355
9356  # remove trailing .exe if any
9357  new_path="${new_path/%.exe/}"
9358
9359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9360
9361  # First separate the path from the arguments. This will split at the first
9362  # space.
9363  complete="$FOUND_MAKE"
9364  path="${complete%% *}"
9365  tmp="$complete EOL"
9366  arguments="${tmp#* }"
9367
9368  # Input might be given as Windows format, start by converting to
9369  # unix format.
9370  new_path="$path"
9371
9372  windows_path="$new_path"
9373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9374    unix_path=`$CYGPATH -u "$windows_path"`
9375    new_path="$unix_path"
9376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9378    new_path="$unix_path"
9379  fi
9380
9381
9382  # Now try to locate executable using which
9383  new_path=`$WHICH "$new_path" 2> /dev/null`
9384
9385  if test "x$new_path" = x; then
9386    # Oops. Which didn't find the executable.
9387    # The splitting of arguments from the executable at a space might have been incorrect,
9388    # since paths with space are more likely in Windows. Give it another try with the whole
9389    # argument.
9390    path="$complete"
9391    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
9405
9406    if test "x$new_path" = x; then
9407      # It's still not found. Now this is an unrecoverable error.
9408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9410      has_space=`$ECHO "$complete" | $GREP " "`
9411      if test "x$has_space" != x; then
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9414      fi
9415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9416    fi
9417  fi
9418
9419  # Now new_path has a complete unix path to the binary
9420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9421    # Keep paths in /bin as-is, but remove trailing .exe if any
9422    new_path="${new_path/%.exe/}"
9423    # Do not save /bin paths to all_fixpath_prefixes!
9424  else
9425    # Not in mixed or Windows style, start by that.
9426    new_path=`cmd //c echo $new_path`
9427
9428  input_path="$new_path"
9429  # Check if we need to convert this using DOS-style short mode. If the path
9430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9431  # take no chances and rewrite it.
9432  # Note: m4 eats our [], so we need to use [ and ] instead.
9433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9434  if test "x$has_forbidden_chars" != x; then
9435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9437  fi
9438
9439    # Output is in $new_path
9440
9441  windows_path="$new_path"
9442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9443    unix_path=`$CYGPATH -u "$windows_path"`
9444    new_path="$unix_path"
9445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9447    new_path="$unix_path"
9448  fi
9449
9450    # remove trailing .exe if any
9451    new_path="${new_path/%.exe/}"
9452
9453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9455  fi
9456
9457  else
9458    # We're on a posix platform. Hooray! :)
9459    # First separate the path from the arguments. This will split at the first
9460    # space.
9461    complete="$FOUND_MAKE"
9462    path="${complete%% *}"
9463    tmp="$complete EOL"
9464    arguments="${tmp#* }"
9465
9466    # Cannot rely on the command "which" here since it doesn't always work.
9467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9468    if test -z "$is_absolute_path"; then
9469      # Path to executable is not absolute. Find it.
9470      IFS_save="$IFS"
9471      IFS=:
9472      for p in $PATH; do
9473        if test -f "$p/$path" && test -x "$p/$path"; then
9474          new_path="$p/$path"
9475          break
9476        fi
9477      done
9478      IFS="$IFS_save"
9479    else
9480      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9481$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9482      new_path="$path"
9483    fi
9484
9485    if test "x$new_path" = x; then
9486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9488        has_space=`$ECHO "$complete" | $GREP " "`
9489        if test "x$has_space" != x; then
9490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9492        fi
9493        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9494      fi
9495  fi
9496
9497      # Now join together the path and the arguments once again
9498      if test "x$arguments" != xEOL; then
9499        new_complete="$new_path ${arguments% *}"
9500      else
9501        new_complete="$new_path"
9502      fi
9503
9504  if test "x$complete" != "x$new_complete"; then
9505      FOUND_MAKE="$new_complete"
9506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9507$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9508    fi
9509
9510        fi
9511      fi
9512    fi
9513  fi
9514
9515        if test "x$FOUND_MAKE" = x; then
9516          for ac_prog in make
9517do
9518  # Extract the first word of "$ac_prog", so it can be a program name with args.
9519set dummy $ac_prog; ac_word=$2
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9521$as_echo_n "checking for $ac_word... " >&6; }
9522if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9523  $as_echo_n "(cached) " >&6
9524else
9525  case $CHECK_TOOLSDIR_MAKE in
9526  [\\/]* | ?:[\\/]*)
9527  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9528  ;;
9529  *)
9530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9531for as_dir in $PATH
9532do
9533  IFS=$as_save_IFS
9534  test -z "$as_dir" && as_dir=.
9535    for ac_exec_ext in '' $ac_executable_extensions; do
9536  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9537    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9539    break 2
9540  fi
9541done
9542  done
9543IFS=$as_save_IFS
9544
9545  ;;
9546esac
9547fi
9548CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9549if test -n "$CHECK_TOOLSDIR_MAKE"; then
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9551$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9552else
9553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
9555fi
9556
9557
9558  test -n "$CHECK_TOOLSDIR_MAKE" && break
9559done
9560
9561
9562  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9563  DESCRIPTION="make in tools-dir"
9564  if test "x$MAKE_CANDIDATE" != x; then
9565    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9566$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9567    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9568    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9569    if test "x$IS_GNU_MAKE" = x; then
9570      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9571$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9572    else
9573      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9574      if test "x$IS_MODERN_MAKE" = x; then
9575        { $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
9576$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;}
9577      else
9578        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9579          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9580            MAKE_EXPECTED_ENV='cygwin'
9581          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9582            MAKE_EXPECTED_ENV='msys'
9583          else
9584            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9585          fi
9586          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9587          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9588        else
9589          # Not relevant for non-Windows
9590          IS_MAKE_CORRECT_ENV=true
9591        fi
9592        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9593          { $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
9594$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;}
9595        else
9596          FOUND_MAKE=$MAKE_CANDIDATE
9597
9598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9599
9600  # First separate the path from the arguments. This will split at the first
9601  # space.
9602  complete="$FOUND_MAKE"
9603  path="${complete%% *}"
9604  tmp="$complete EOL"
9605  arguments="${tmp#* }"
9606
9607  # Input might be given as Windows format, start by converting to
9608  # unix format.
9609  new_path=`$CYGPATH -u "$path"`
9610
9611  # Now try to locate executable using which
9612  new_path=`$WHICH "$new_path" 2> /dev/null`
9613  # bat and cmd files are not always considered executable in cygwin causing which
9614  # to not find them
9615  if test "x$new_path" = x \
9616           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9617           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9618    new_path=`$CYGPATH -u "$path"`
9619  fi
9620  if test "x$new_path" = x; then
9621    # Oops. Which didn't find the executable.
9622    # The splitting of arguments from the executable at a space might have been incorrect,
9623    # since paths with space are more likely in Windows. Give it another try with the whole
9624    # argument.
9625    path="$complete"
9626    arguments="EOL"
9627    new_path=`$CYGPATH -u "$path"`
9628    new_path=`$WHICH "$new_path" 2> /dev/null`
9629    # bat and cmd files are not always considered executable in cygwin causing which
9630    # to not find them
9631    if test "x$new_path" = x \
9632             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9633             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9634      new_path=`$CYGPATH -u "$path"`
9635    fi
9636    if test "x$new_path" = x; then
9637      # It's still not found. Now this is an unrecoverable error.
9638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9640      has_space=`$ECHO "$complete" | $GREP " "`
9641      if test "x$has_space" != x; then
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9644      fi
9645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9646    fi
9647  fi
9648
9649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9652  # "foo.exe" is OK but "foo" is an error.
9653  #
9654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9655  # It is also a way to make sure we got the proper file name for the real test later on.
9656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9657  if test "x$test_shortpath" = x; then
9658    # Short path failed, file does not exist as specified.
9659    # Try adding .exe or .cmd
9660    if test -f "${new_path}.exe"; then
9661       input_to_shortpath="${new_path}.exe"
9662    elif test -f "${new_path}.cmd"; then
9663       input_to_shortpath="${new_path}.cmd"
9664    else
9665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9670    fi
9671  else
9672    input_to_shortpath="$new_path"
9673  fi
9674
9675  # Call helper function which possibly converts this using DOS-style short mode.
9676  # If so, the updated path is stored in $new_path.
9677  new_path="$input_to_shortpath"
9678
9679  input_path="$input_to_shortpath"
9680  # Check if we need to convert this using DOS-style short mode. If the path
9681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9682  # take no chances and rewrite it.
9683  # Note: m4 eats our [], so we need to use [ and ] instead.
9684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9685  if test "x$has_forbidden_chars" != x; then
9686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9690      # Going to short mode and back again did indeed matter. Since short mode is
9691      # case insensitive, let's make it lowercase to improve readability.
9692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9693      # Now convert it back to Unix-stile (cygpath)
9694      input_path=`$CYGPATH -u "$shortmode_path"`
9695      new_path="$input_path"
9696    fi
9697  fi
9698
9699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9700  if test "x$test_cygdrive_prefix" = x; then
9701    # As a simple fix, exclude /usr/bin since it's not a real path.
9702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9704      # a path prefixed by /cygdrive for fixpath to work.
9705      new_path="$CYGWIN_ROOT_PATH$input_path"
9706    fi
9707  fi
9708
9709  # remove trailing .exe if any
9710  new_path="${new_path/%.exe/}"
9711
9712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9713
9714  # First separate the path from the arguments. This will split at the first
9715  # space.
9716  complete="$FOUND_MAKE"
9717  path="${complete%% *}"
9718  tmp="$complete EOL"
9719  arguments="${tmp#* }"
9720
9721  # Input might be given as Windows format, start by converting to
9722  # unix format.
9723  new_path="$path"
9724
9725  windows_path="$new_path"
9726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9727    unix_path=`$CYGPATH -u "$windows_path"`
9728    new_path="$unix_path"
9729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9731    new_path="$unix_path"
9732  fi
9733
9734
9735  # Now try to locate executable using which
9736  new_path=`$WHICH "$new_path" 2> /dev/null`
9737
9738  if test "x$new_path" = x; then
9739    # Oops. Which didn't find the executable.
9740    # The splitting of arguments from the executable at a space might have been incorrect,
9741    # since paths with space are more likely in Windows. Give it another try with the whole
9742    # argument.
9743    path="$complete"
9744    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
9758
9759    if test "x$new_path" = x; then
9760      # It's still not found. Now this is an unrecoverable error.
9761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9763      has_space=`$ECHO "$complete" | $GREP " "`
9764      if test "x$has_space" != x; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9767      fi
9768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9769    fi
9770  fi
9771
9772  # Now new_path has a complete unix path to the binary
9773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9774    # Keep paths in /bin as-is, but remove trailing .exe if any
9775    new_path="${new_path/%.exe/}"
9776    # Do not save /bin paths to all_fixpath_prefixes!
9777  else
9778    # Not in mixed or Windows style, start by that.
9779    new_path=`cmd //c echo $new_path`
9780
9781  input_path="$new_path"
9782  # Check if we need to convert this using DOS-style short mode. If the path
9783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9784  # take no chances and rewrite it.
9785  # Note: m4 eats our [], so we need to use [ and ] instead.
9786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9787  if test "x$has_forbidden_chars" != x; then
9788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9790  fi
9791
9792    # Output is in $new_path
9793
9794  windows_path="$new_path"
9795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9796    unix_path=`$CYGPATH -u "$windows_path"`
9797    new_path="$unix_path"
9798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9800    new_path="$unix_path"
9801  fi
9802
9803    # remove trailing .exe if any
9804    new_path="${new_path/%.exe/}"
9805
9806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9808  fi
9809
9810  else
9811    # We're on a posix platform. Hooray! :)
9812    # First separate the path from the arguments. This will split at the first
9813    # space.
9814    complete="$FOUND_MAKE"
9815    path="${complete%% *}"
9816    tmp="$complete EOL"
9817    arguments="${tmp#* }"
9818
9819    # Cannot rely on the command "which" here since it doesn't always work.
9820    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9821    if test -z "$is_absolute_path"; then
9822      # Path to executable is not absolute. Find it.
9823      IFS_save="$IFS"
9824      IFS=:
9825      for p in $PATH; do
9826        if test -f "$p/$path" && test -x "$p/$path"; then
9827          new_path="$p/$path"
9828          break
9829        fi
9830      done
9831      IFS="$IFS_save"
9832    else
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9834$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9835      new_path="$path"
9836    fi
9837
9838    if test "x$new_path" = x; then
9839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9841        has_space=`$ECHO "$complete" | $GREP " "`
9842        if test "x$has_space" != x; then
9843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9845        fi
9846        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9847      fi
9848  fi
9849
9850      # Now join together the path and the arguments once again
9851      if test "x$arguments" != xEOL; then
9852        new_complete="$new_path ${arguments% *}"
9853      else
9854        new_complete="$new_path"
9855      fi
9856
9857  if test "x$complete" != "x$new_complete"; then
9858      FOUND_MAKE="$new_complete"
9859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9860$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9861    fi
9862
9863        fi
9864      fi
9865    fi
9866  fi
9867
9868        fi
9869        PATH=$OLD_PATH
9870      fi
9871    fi
9872
9873    if test "x$FOUND_MAKE" = x; then
9874      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
9875    fi
9876  fi
9877
9878  MAKE=$FOUND_MAKE
9879
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9881$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9882
9883
9884
9885    # Test if find supports -delete
9886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9887$as_echo_n "checking if find supports -delete... " >&6; }
9888    FIND_DELETE="-delete"
9889
9890    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9891
9892    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9893
9894    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9895    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9896        # No, it does not.
9897        rm $DELETEDIR/TestIfFindSupportsDelete
9898        FIND_DELETE="-exec rm \{\} \+"
9899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
9901    else
9902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9903$as_echo "yes" >&6; }
9904    fi
9905    rmdir $DELETEDIR
9906
9907
9908
9909# These tools might not be installed by default,
9910# need hint on how to install them.
9911
9912    for ac_prog in unzip
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if test "${ac_cv_path_UNZIP+set}" = set; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $UNZIP in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9933    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944UNZIP=$ac_cv_path_UNZIP
9945if test -n "$UNZIP"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9947$as_echo "$UNZIP" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$UNZIP" && break
9955done
9956
9957
9958    if test "x$UNZIP" = x; then
9959        if test "xunzip" = x; then
9960          PROG_NAME=unzip
9961        else
9962          PROG_NAME=unzip
9963        fi
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9966        as_fn_error $? "Cannot continue" "$LINENO" 5
9967    fi
9968
9969
9970
9971    for ac_prog in zip
9972do
9973  # Extract the first word of "$ac_prog", so it can be a program name with args.
9974set dummy $ac_prog; ac_word=$2
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9976$as_echo_n "checking for $ac_word... " >&6; }
9977if test "${ac_cv_path_ZIP+set}" = set; then :
9978  $as_echo_n "(cached) " >&6
9979else
9980  case $ZIP in
9981  [\\/]* | ?:[\\/]*)
9982  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9983  ;;
9984  *)
9985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9986for as_dir in $PATH
9987do
9988  IFS=$as_save_IFS
9989  test -z "$as_dir" && as_dir=.
9990    for ac_exec_ext in '' $ac_executable_extensions; do
9991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9992    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9994    break 2
9995  fi
9996done
9997  done
9998IFS=$as_save_IFS
9999
10000  ;;
10001esac
10002fi
10003ZIP=$ac_cv_path_ZIP
10004if test -n "$ZIP"; then
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10006$as_echo "$ZIP" >&6; }
10007else
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
10010fi
10011
10012
10013  test -n "$ZIP" && break
10014done
10015
10016
10017    if test "x$ZIP" = x; then
10018        if test "xzip" = x; then
10019          PROG_NAME=zip
10020        else
10021          PROG_NAME=zip
10022        fi
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10025        as_fn_error $? "Cannot continue" "$LINENO" 5
10026    fi
10027
10028
10029
10030# Non-required basic tools
10031
10032# Extract the first word of "ldd", so it can be a program name with args.
10033set dummy ldd; ac_word=$2
10034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10035$as_echo_n "checking for $ac_word... " >&6; }
10036if test "${ac_cv_path_LDD+set}" = set; then :
10037  $as_echo_n "(cached) " >&6
10038else
10039  case $LDD in
10040  [\\/]* | ?:[\\/]*)
10041  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10042  ;;
10043  *)
10044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10045for as_dir in $PATH
10046do
10047  IFS=$as_save_IFS
10048  test -z "$as_dir" && as_dir=.
10049    for ac_exec_ext in '' $ac_executable_extensions; do
10050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10051    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10053    break 2
10054  fi
10055done
10056  done
10057IFS=$as_save_IFS
10058
10059  ;;
10060esac
10061fi
10062LDD=$ac_cv_path_LDD
10063if test -n "$LDD"; then
10064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10065$as_echo "$LDD" >&6; }
10066else
10067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
10069fi
10070
10071
10072if test "x$LDD" = "x"; then
10073    # List shared lib dependencies is used for
10074    # debug output and checking for forbidden dependencies.
10075    # We can build without it.
10076    LDD="true"
10077fi
10078# Extract the first word of "otool", so it can be a program name with args.
10079set dummy otool; ac_word=$2
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10081$as_echo_n "checking for $ac_word... " >&6; }
10082if test "${ac_cv_path_OTOOL+set}" = set; then :
10083  $as_echo_n "(cached) " >&6
10084else
10085  case $OTOOL in
10086  [\\/]* | ?:[\\/]*)
10087  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10088  ;;
10089  *)
10090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10091for as_dir in $PATH
10092do
10093  IFS=$as_save_IFS
10094  test -z "$as_dir" && as_dir=.
10095    for ac_exec_ext in '' $ac_executable_extensions; do
10096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10097    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10099    break 2
10100  fi
10101done
10102  done
10103IFS=$as_save_IFS
10104
10105  ;;
10106esac
10107fi
10108OTOOL=$ac_cv_path_OTOOL
10109if test -n "$OTOOL"; then
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10111$as_echo "$OTOOL" >&6; }
10112else
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118if test "x$OTOOL" = "x"; then
10119   OTOOL="true"
10120fi
10121for ac_prog in readelf greadelf
10122do
10123  # Extract the first word of "$ac_prog", so it can be a program name with args.
10124set dummy $ac_prog; ac_word=$2
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126$as_echo_n "checking for $ac_word... " >&6; }
10127if test "${ac_cv_path_READELF+set}" = set; then :
10128  $as_echo_n "(cached) " >&6
10129else
10130  case $READELF in
10131  [\\/]* | ?:[\\/]*)
10132  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10133  ;;
10134  *)
10135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136for as_dir in $PATH
10137do
10138  IFS=$as_save_IFS
10139  test -z "$as_dir" && as_dir=.
10140    for ac_exec_ext in '' $ac_executable_extensions; do
10141  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10142    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10144    break 2
10145  fi
10146done
10147  done
10148IFS=$as_save_IFS
10149
10150  ;;
10151esac
10152fi
10153READELF=$ac_cv_path_READELF
10154if test -n "$READELF"; then
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10156$as_echo "$READELF" >&6; }
10157else
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160fi
10161
10162
10163  test -n "$READELF" && break
10164done
10165
10166# Extract the first word of "hg", so it can be a program name with args.
10167set dummy hg; ac_word=$2
10168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10169$as_echo_n "checking for $ac_word... " >&6; }
10170if test "${ac_cv_path_HG+set}" = set; then :
10171  $as_echo_n "(cached) " >&6
10172else
10173  case $HG in
10174  [\\/]* | ?:[\\/]*)
10175  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10176  ;;
10177  *)
10178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10179for as_dir in $PATH
10180do
10181  IFS=$as_save_IFS
10182  test -z "$as_dir" && as_dir=.
10183    for ac_exec_ext in '' $ac_executable_extensions; do
10184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10185    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10187    break 2
10188  fi
10189done
10190  done
10191IFS=$as_save_IFS
10192
10193  ;;
10194esac
10195fi
10196HG=$ac_cv_path_HG
10197if test -n "$HG"; then
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10199$as_echo "$HG" >&6; }
10200else
10201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202$as_echo "no" >&6; }
10203fi
10204
10205
10206# Extract the first word of "stat", so it can be a program name with args.
10207set dummy stat; ac_word=$2
10208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10209$as_echo_n "checking for $ac_word... " >&6; }
10210if test "${ac_cv_path_STAT+set}" = set; then :
10211  $as_echo_n "(cached) " >&6
10212else
10213  case $STAT in
10214  [\\/]* | ?:[\\/]*)
10215  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10216  ;;
10217  *)
10218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10219for as_dir in $PATH
10220do
10221  IFS=$as_save_IFS
10222  test -z "$as_dir" && as_dir=.
10223    for ac_exec_ext in '' $ac_executable_extensions; do
10224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10225    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10227    break 2
10228  fi
10229done
10230  done
10231IFS=$as_save_IFS
10232
10233  ;;
10234esac
10235fi
10236STAT=$ac_cv_path_STAT
10237if test -n "$STAT"; then
10238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10239$as_echo "$STAT" >&6; }
10240else
10241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10242$as_echo "no" >&6; }
10243fi
10244
10245
10246# Extract the first word of "time", so it can be a program name with args.
10247set dummy time; ac_word=$2
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249$as_echo_n "checking for $ac_word... " >&6; }
10250if test "${ac_cv_path_TIME+set}" = set; then :
10251  $as_echo_n "(cached) " >&6
10252else
10253  case $TIME in
10254  [\\/]* | ?:[\\/]*)
10255  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10256  ;;
10257  *)
10258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259for as_dir in $PATH
10260do
10261  IFS=$as_save_IFS
10262  test -z "$as_dir" && as_dir=.
10263    for ac_exec_ext in '' $ac_executable_extensions; do
10264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10265    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267    break 2
10268  fi
10269done
10270  done
10271IFS=$as_save_IFS
10272
10273  ;;
10274esac
10275fi
10276TIME=$ac_cv_path_TIME
10277if test -n "$TIME"; then
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10279$as_echo "$TIME" >&6; }
10280else
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286
10287if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10288
10289    for ac_prog in comm
10290do
10291  # Extract the first word of "$ac_prog", so it can be a program name with args.
10292set dummy $ac_prog; ac_word=$2
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10294$as_echo_n "checking for $ac_word... " >&6; }
10295if test "${ac_cv_path_COMM+set}" = set; then :
10296  $as_echo_n "(cached) " >&6
10297else
10298  case $COMM in
10299  [\\/]* | ?:[\\/]*)
10300  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10301  ;;
10302  *)
10303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10304for as_dir in $PATH
10305do
10306  IFS=$as_save_IFS
10307  test -z "$as_dir" && as_dir=.
10308    for ac_exec_ext in '' $ac_executable_extensions; do
10309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10310    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10312    break 2
10313  fi
10314done
10315  done
10316IFS=$as_save_IFS
10317
10318  ;;
10319esac
10320fi
10321COMM=$ac_cv_path_COMM
10322if test -n "$COMM"; then
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10324$as_echo "$COMM" >&6; }
10325else
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330
10331  test -n "$COMM" && break
10332done
10333
10334
10335    if test "x$COMM" = x; then
10336        if test "xcomm" = x; then
10337          PROG_NAME=comm
10338        else
10339          PROG_NAME=comm
10340        fi
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10343        as_fn_error $? "Cannot continue" "$LINENO" 5
10344    fi
10345
10346
10347fi
10348
10349
10350# Check if pkg-config is available.
10351
10352
10353if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10354	if test -n "$ac_tool_prefix"; then
10355  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10356set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $PKG_CONFIG in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10374    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10386if test -n "$PKG_CONFIG"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10388$as_echo "$PKG_CONFIG" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395fi
10396if test -z "$ac_cv_path_PKG_CONFIG"; then
10397  ac_pt_PKG_CONFIG=$PKG_CONFIG
10398  # Extract the first word of "pkg-config", so it can be a program name with args.
10399set dummy pkg-config; ac_word=$2
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10401$as_echo_n "checking for $ac_word... " >&6; }
10402if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10403  $as_echo_n "(cached) " >&6
10404else
10405  case $ac_pt_PKG_CONFIG in
10406  [\\/]* | ?:[\\/]*)
10407  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10408  ;;
10409  *)
10410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10411for as_dir in $PATH
10412do
10413  IFS=$as_save_IFS
10414  test -z "$as_dir" && as_dir=.
10415    for ac_exec_ext in '' $ac_executable_extensions; do
10416  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10417    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10419    break 2
10420  fi
10421done
10422  done
10423IFS=$as_save_IFS
10424
10425  ;;
10426esac
10427fi
10428ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10429if test -n "$ac_pt_PKG_CONFIG"; then
10430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10431$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10432else
10433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
10435fi
10436
10437  if test "x$ac_pt_PKG_CONFIG" = x; then
10438    PKG_CONFIG=""
10439  else
10440    case $cross_compiling:$ac_tool_warned in
10441yes:)
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10443$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10444ac_tool_warned=yes ;;
10445esac
10446    PKG_CONFIG=$ac_pt_PKG_CONFIG
10447  fi
10448else
10449  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10450fi
10451
10452fi
10453if test -n "$PKG_CONFIG"; then
10454	_pkg_min_version=0.9.0
10455	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10456$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10457	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10458		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10459$as_echo "yes" >&6; }
10460	else
10461		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462$as_echo "no" >&6; }
10463		PKG_CONFIG=""
10464	fi
10465
10466fi
10467
10468# After basic tools have been setup, we can check build os specific details.
10469
10470###############################################################################
10471
10472# Note that this is the build platform OS version!
10473
10474OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10475OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10476OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10477OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10478
10479
10480
10481
10482
10483# Setup builddeps, for automatic downloading of tools we need.
10484# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10485# boot-jdk setup, but we need to have basic tools setup first.
10486
10487
10488# Check whether --with-builddeps-conf was given.
10489if test "${with_builddeps_conf+set}" = set; then :
10490  withval=$with_builddeps_conf;
10491fi
10492
10493
10494
10495# Check whether --with-builddeps-server was given.
10496if test "${with_builddeps_server+set}" = set; then :
10497  withval=$with_builddeps_server;
10498fi
10499
10500
10501
10502# Check whether --with-builddeps-dir was given.
10503if test "${with_builddeps_dir+set}" = set; then :
10504  withval=$with_builddeps_dir;
10505else
10506  with_builddeps_dir=/localhome/builddeps
10507fi
10508
10509
10510
10511# Check whether --with-builddeps-group was given.
10512if test "${with_builddeps_group+set}" = set; then :
10513  withval=$with_builddeps_group;
10514fi
10515
10516
10517
10518
10519    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10520        if test "x$with_builddeps_conf" != x; then
10521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10522$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10523            builddepsfile=$with_builddeps_conf
10524            if test -s $builddepsfile; then
10525                . $builddepsfile
10526                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10527$as_echo "loaded!" >&6; }
10528            else
10529               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10530           fi
10531        else
10532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10533$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10534            builddepsfile=`mktemp`
10535            touch $builddepsfile
10536            # Put all found confs into a single file.
10537            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10538            # Source the file to acquire the variables
10539            if test -s $builddepsfile; then
10540                . $builddepsfile
10541                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10542$as_echo "found at least one!" >&6; }
10543            else
10544               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10545           fi
10546        fi
10547        # Create build and target names that use _ instead of "-" and ".".
10548        # This is necessary to use them in variable names.
10549        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10550        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10551        # Extract rewrite information for build and target
10552        eval rewritten_build=\${REWRITE_${build_var}}
10553        if test "x$rewritten_build" = x; then
10554            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10555            echo Build stays the same $rewritten_build
10556        else
10557            echo Rewriting build for builddeps into $rewritten_build
10558        fi
10559        eval rewritten_target=\${REWRITE_${target_var}}
10560        if test "x$rewritten_target" = x; then
10561            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10562            echo Target stays the same $rewritten_target
10563        else
10564            echo Rewriting target for builddeps into $rewritten_target
10565        fi
10566        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10567        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10568    fi
10569    for ac_prog in 7z unzip
10570do
10571  # Extract the first word of "$ac_prog", so it can be a program name with args.
10572set dummy $ac_prog; ac_word=$2
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10574$as_echo_n "checking for $ac_word... " >&6; }
10575if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10576  $as_echo_n "(cached) " >&6
10577else
10578  if test -n "$BDEPS_UNZIP"; then
10579  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10580else
10581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10582for as_dir in $PATH
10583do
10584  IFS=$as_save_IFS
10585  test -z "$as_dir" && as_dir=.
10586    for ac_exec_ext in '' $ac_executable_extensions; do
10587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10588    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10590    break 2
10591  fi
10592done
10593  done
10594IFS=$as_save_IFS
10595
10596fi
10597fi
10598BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10599if test -n "$BDEPS_UNZIP"; then
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10601$as_echo "$BDEPS_UNZIP" >&6; }
10602else
10603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
10605fi
10606
10607
10608  test -n "$BDEPS_UNZIP" && break
10609done
10610
10611    if test "x$BDEPS_UNZIP" = x7z; then
10612        BDEPS_UNZIP="7z x"
10613    fi
10614
10615    for ac_prog in wget lftp ftp
10616do
10617  # Extract the first word of "$ac_prog", so it can be a program name with args.
10618set dummy $ac_prog; ac_word=$2
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10620$as_echo_n "checking for $ac_word... " >&6; }
10621if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10622  $as_echo_n "(cached) " >&6
10623else
10624  if test -n "$BDEPS_FTP"; then
10625  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10626else
10627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10628for as_dir in $PATH
10629do
10630  IFS=$as_save_IFS
10631  test -z "$as_dir" && as_dir=.
10632    for ac_exec_ext in '' $ac_executable_extensions; do
10633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10634    ac_cv_prog_BDEPS_FTP="$ac_prog"
10635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10636    break 2
10637  fi
10638done
10639  done
10640IFS=$as_save_IFS
10641
10642fi
10643fi
10644BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10645if test -n "$BDEPS_FTP"; then
10646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10647$as_echo "$BDEPS_FTP" >&6; }
10648else
10649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
10651fi
10652
10653
10654  test -n "$BDEPS_FTP" && break
10655done
10656
10657
10658
10659###############################################################################
10660#
10661# Determine OpenJDK variants, options and version numbers.
10662#
10663###############################################################################
10664
10665# We need build & target for this.
10666
10667
10668###############################################################################
10669#
10670# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10671# We always build headless support.
10672#
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10674$as_echo_n "checking headful support... " >&6; }
10675# Check whether --enable-headful was given.
10676if test "${enable_headful+set}" = set; then :
10677  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10678else
10679  SUPPORT_HEADFUL=yes
10680fi
10681
10682
10683SUPPORT_HEADLESS=yes
10684BUILD_HEADLESS="BUILD_HEADLESS:=true"
10685
10686if test "x$SUPPORT_HEADFUL" = xyes; then
10687    # We are building both headful and headless.
10688    headful_msg="inlude support for both headful and headless"
10689fi
10690
10691if test "x$SUPPORT_HEADFUL" = xno; then
10692    # Thus we are building headless only.
10693    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10694    headful_msg="headless only"
10695fi
10696
10697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10698$as_echo "$headful_msg" >&6; }
10699
10700
10701
10702
10703
10704# Control wether Hotspot runs Queens test after build.
10705# Check whether --enable-hotspot-test-in-build was given.
10706if test "${enable_hotspot_test_in_build+set}" = set; then :
10707  enableval=$enable_hotspot_test_in_build;
10708else
10709  enable_hotspot_test_in_build=no
10710fi
10711
10712if test "x$enable_hotspot_test_in_build" = "xyes"; then
10713    TEST_IN_BUILD=true
10714else
10715    TEST_IN_BUILD=false
10716fi
10717
10718
10719###############################################################################
10720#
10721# Choose cacerts source file
10722#
10723
10724# Check whether --with-cacerts-file was given.
10725if test "${with_cacerts_file+set}" = set; then :
10726  withval=$with_cacerts_file;
10727fi
10728
10729if test "x$with_cacerts_file" != x; then
10730    CACERTS_FILE=$with_cacerts_file
10731else
10732    if test "x$OPENJDK" = "xtrue"; then
10733        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10734    else
10735        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10736    fi
10737fi
10738
10739
10740###############################################################################
10741#
10742# Enable or disable unlimited crypto
10743#
10744# Check whether --enable-unlimited-crypto was given.
10745if test "${enable_unlimited_crypto+set}" = set; then :
10746  enableval=$enable_unlimited_crypto;
10747else
10748  enable_unlimited_crypto=no
10749fi
10750
10751if test "x$enable_unlimited_crypto" = "xyes"; then
10752    UNLIMITED_CRYPTO=true
10753else
10754    UNLIMITED_CRYPTO=false
10755fi
10756
10757
10758###############################################################################
10759#
10760# Compress jars
10761#
10762COMPRESS_JARS=false
10763
10764
10765
10766
10767# Source the version numbers
10768. $AUTOCONF_DIR/version-numbers
10769
10770# Get the settings from parameters
10771
10772# Check whether --with-milestone was given.
10773if test "${with_milestone+set}" = set; then :
10774  withval=$with_milestone;
10775fi
10776
10777if test "x$with_milestone" = xyes; then
10778  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10779elif test "x$with_milestone" != x; then
10780    MILESTONE="$with_milestone"
10781else
10782  MILESTONE=internal
10783fi
10784
10785
10786# Check whether --with-build-number was given.
10787if test "${with_build_number+set}" = set; then :
10788  withval=$with_build_number;
10789fi
10790
10791if test "x$with_build_number" = xyes; then
10792  as_fn_error $? "Build number must have a value" "$LINENO" 5
10793elif test "x$with_build_number" != x; then
10794  JDK_BUILD_NUMBER="$with_build_number"
10795fi
10796if test "x$JDK_BUILD_NUMBER" = x; then
10797  JDK_BUILD_NUMBER=b00
10798fi
10799
10800
10801# Check whether --with-user-release-suffix was given.
10802if test "${with_user_release_suffix+set}" = set; then :
10803  withval=$with_user_release_suffix;
10804fi
10805
10806if test "x$with_user_release_suffix" = xyes; then
10807  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10808elif test "x$with_user_release_suffix" != x; then
10809  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10810else
10811  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10812  # Avoid [:alnum:] since it depends on the locale.
10813  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10814  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10815fi
10816
10817
10818# Now set the JDK version, milestone, build number etc.
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833COPYRIGHT_YEAR=`date +'%Y'`
10834
10835
10836if test "x$JDK_UPDATE_VERSION" != x; then
10837  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10838else
10839  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10840fi
10841
10842
10843COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10844
10845
10846
10847###############################################################################
10848#
10849# Setup BootJDK, used to bootstrap the build.
10850#
10851###############################################################################
10852
10853
10854BOOT_JDK_FOUND=no
10855
10856# Check whether --with-boot-jdk was given.
10857if test "${with_boot_jdk+set}" = set; then :
10858  withval=$with_boot_jdk;
10859fi
10860
10861
10862# We look for the Boot JDK through various means, going from more certain to
10863# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10864# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10865# must check if this is indeed valid; otherwise we'll continue looking.
10866
10867# Test: Is bootjdk explicitely set by command line arguments?
10868
10869  if test "x$BOOT_JDK_FOUND" = xno; then
10870    # Now execute the test
10871
10872if test "x$with_boot_jdk" != x; then
10873    BOOT_JDK=$with_boot_jdk
10874    BOOT_JDK_FOUND=maybe
10875    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10876$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10877fi
10878
10879
10880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10882      # Do we have a bin/java?
10883      if test ! -x "$BOOT_JDK/bin/java"; then
10884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10886        BOOT_JDK_FOUND=no
10887      else
10888        # Do we have a bin/javac?
10889        if test ! -x "$BOOT_JDK/bin/javac"; then
10890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10894          BOOT_JDK_FOUND=no
10895        else
10896          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10897          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10900            BOOT_JDK_FOUND=no
10901          else
10902            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10904
10905            # Extra M4 quote needed to protect [] in grep expression.
10906            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10907            if test "x$FOUND_VERSION_78" = x; then
10908              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10910              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10911$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10912              BOOT_JDK_FOUND=no
10913            else
10914              # We're done! :-)
10915              BOOT_JDK_FOUND=yes
10916
10917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10918
10919  # Input might be given as Windows format, start by converting to
10920  # unix format.
10921  path="$BOOT_JDK"
10922  new_path=`$CYGPATH -u "$path"`
10923
10924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10927  # "foo.exe" is OK but "foo" is an error.
10928  #
10929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10930  # It is also a way to make sure we got the proper file name for the real test later on.
10931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10932  if test "x$test_shortpath" = x; then
10933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10935    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10936  fi
10937
10938  # Call helper function which possibly converts this using DOS-style short mode.
10939  # If so, the updated path is stored in $new_path.
10940
10941  input_path="$new_path"
10942  # Check if we need to convert this using DOS-style short mode. If the path
10943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10944  # take no chances and rewrite it.
10945  # Note: m4 eats our [], so we need to use [ and ] instead.
10946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10947  if test "x$has_forbidden_chars" != x; then
10948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10952      # Going to short mode and back again did indeed matter. Since short mode is
10953      # case insensitive, let's make it lowercase to improve readability.
10954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10955      # Now convert it back to Unix-stile (cygpath)
10956      input_path=`$CYGPATH -u "$shortmode_path"`
10957      new_path="$input_path"
10958    fi
10959  fi
10960
10961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10962  if test "x$test_cygdrive_prefix" = x; then
10963    # As a simple fix, exclude /usr/bin since it's not a real path.
10964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10966      # a path prefixed by /cygdrive for fixpath to work.
10967      new_path="$CYGWIN_ROOT_PATH$input_path"
10968    fi
10969  fi
10970
10971
10972  if test "x$path" != "x$new_path"; then
10973    BOOT_JDK="$new_path"
10974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10976  fi
10977
10978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10979
10980  path="$BOOT_JDK"
10981  has_colon=`$ECHO $path | $GREP ^.:`
10982  new_path="$path"
10983  if test "x$has_colon" = x; then
10984    # Not in mixed or Windows style, start by that.
10985    new_path=`cmd //c echo $path`
10986  fi
10987
10988
10989  input_path="$new_path"
10990  # Check if we need to convert this using DOS-style short mode. If the path
10991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10992  # take no chances and rewrite it.
10993  # Note: m4 eats our [], so we need to use [ and ] instead.
10994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10995  if test "x$has_forbidden_chars" != x; then
10996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10998  fi
10999
11000
11001  windows_path="$new_path"
11002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11003    unix_path=`$CYGPATH -u "$windows_path"`
11004    new_path="$unix_path"
11005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11007    new_path="$unix_path"
11008  fi
11009
11010  if test "x$path" != "x$new_path"; then
11011    BOOT_JDK="$new_path"
11012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11014  fi
11015
11016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11018
11019  else
11020    # We're on a posix platform. Hooray! :)
11021    path="$BOOT_JDK"
11022
11023    if test ! -f "$path" && test ! -d "$path"; then
11024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11025    fi
11026
11027    has_space=`$ECHO "$path" | $GREP " "`
11028    if test "x$has_space" != x; then
11029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11031      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11032    fi
11033  fi
11034
11035              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11036$as_echo_n "checking for Boot JDK... " >&6; }
11037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11038$as_echo "$BOOT_JDK" >&6; }
11039              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11040$as_echo_n "checking Boot JDK version... " >&6; }
11041              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11042              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11043$as_echo "$BOOT_JDK_VERSION" >&6; }
11044            fi # end check jdk version
11045          fi # end check rt.jar
11046        fi # end check javac
11047      fi # end check java
11048    fi # end check boot jdk found
11049  fi
11050
11051if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11052  # Having specified an argument which is incorrect will produce an instant failure;
11053  # we should not go on looking
11054  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11055fi
11056
11057# Test: Is bootjdk available from builddeps?
11058
11059  if test "x$BOOT_JDK_FOUND" = xno; then
11060    # Now execute the test
11061
11062
11063
11064    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11065        # Source the builddeps file again, to make sure it uses the latest variables!
11066        . $builddepsfile
11067        # Look for a target and build machine specific resource!
11068        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11069        if test "x$resource" = x; then
11070            # Ok, lets instead look for a target specific resource
11071            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11072        fi
11073        if test "x$resource" = x; then
11074            # Ok, lets instead look for a build specific resource
11075            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11076        fi
11077        if test "x$resource" = x; then
11078            # Ok, lets instead look for a generic resource
11079            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11080            resource=${builddep_bootjdk}
11081        fi
11082        if test "x$resource" != x; then
11083            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11084$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11085	    # If the resource in the builddeps.conf file is an existing directory,
11086	    # for example /java/linux/cups
11087	    if test -d ${resource}; then
11088	       depdir=${resource}
11089	    else
11090
11091# bootjdk is for example mymodule
11092# $resource is for example libs/general/libmymod_1_2_3.zip
11093# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11094# $with_builddeps_dir is for example /localhome/builddeps
11095# depdir is the name of the variable into which we store the depdir, eg MYMOD
11096# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11097# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11098    filename=`basename $resource`
11099    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11100    filebase=${filename%%.*}
11101    extension=${filename#*.}
11102    installdir=$with_builddeps_dir/$filebase
11103    if test ! -f $installdir/$filename.unpacked; then
11104        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11105$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11106        if test ! -d $installdir; then
11107            mkdir -p $installdir
11108        fi
11109        if test ! -d $installdir; then
11110            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11111        fi
11112        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11113        touch $tmpfile
11114        if test ! -f $tmpfile; then
11115            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11116        fi
11117
11118    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11119    # $tmpfile is the local file name for the downloaded file.
11120    VALID_TOOL=no
11121    if test "x$BDEPS_FTP" = xwget; then
11122       VALID_TOOL=yes
11123       wget -O $tmpfile $with_builddeps_server/$resource
11124    fi
11125    if test "x$BDEPS_FTP" = xlftp; then
11126       VALID_TOOL=yes
11127       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11128    fi
11129    if test "x$BDEPS_FTP" = xftp; then
11130        VALID_TOOL=yes
11131        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11132        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11133        FTPUSERPWD=${FTPSERVER%%@*}
11134        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11135            FTPUSER=${userpwd%%:*}
11136            FTPPWD=${userpwd#*@}
11137            FTPSERVER=${FTPSERVER#*@}
11138        else
11139            FTPUSER=ftp
11140            FTPPWD=ftp
11141        fi
11142        # the "pass" command does not work on some
11143        # ftp clients (read ftp.exe) but if it works,
11144        # passive mode is better!
11145        (\
11146            echo "user $FTPUSER $FTPPWD"        ;\
11147            echo "pass"                         ;\
11148            echo "bin"                          ;\
11149            echo "get $FTPPATH $tmpfile"              ;\
11150        ) | ftp -in $FTPSERVER
11151    fi
11152    if test "x$VALID_TOOL" != xyes; then
11153       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11154    fi
11155
11156        mv $tmpfile $installdir/$filename
11157        if test ! -s $installdir/$filename; then
11158            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11159        fi
11160        case "$extension" in
11161            zip)  echo "Unzipping $installdir/$filename..."
11162               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11163            ;;
11164            tar.gz) echo "Untaring $installdir/$filename..."
11165               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11166            ;;
11167            tgz) echo "Untaring $installdir/$filename..."
11168               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11169            ;;
11170            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11171            ;;
11172        esac
11173    fi
11174    if test -f $installdir/$filename.unpacked; then
11175        depdir=$installdir
11176    fi
11177
11178	    fi
11179            # Source the builddeps file again, because in the previous command, the depdir
11180            # was updated to point at the current build dependency install directory.
11181            . $builddepsfile
11182            # Now extract variables from the builddeps.conf files.
11183            theroot=${builddep_bootjdk_ROOT}
11184            thecflags=${builddep_bootjdk_CFLAGS}
11185            thelibs=${builddep_bootjdk_LIBS}
11186            if test "x$depdir" = x; then
11187                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11188            fi
11189            BOOT_JDK=$depdir
11190            if test "x$theroot" != x; then
11191               BOOT_JDK="$theroot"
11192            fi
11193            if test "x$thecflags" != x; then
11194               BOOT_JDK_CFLAGS="$thecflags"
11195            fi
11196            if test "x$thelibs" != x; then
11197               BOOT_JDK_LIBS="$thelibs"
11198            fi
11199            BOOT_JDK_FOUND=maybe
11200            else BOOT_JDK_FOUND=no
11201
11202        fi
11203        else BOOT_JDK_FOUND=no
11204
11205    fi
11206
11207
11208
11209    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11210    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11211      # Do we have a bin/java?
11212      if test ! -x "$BOOT_JDK/bin/java"; then
11213        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11215        BOOT_JDK_FOUND=no
11216      else
11217        # Do we have a bin/javac?
11218        if test ! -x "$BOOT_JDK/bin/javac"; then
11219          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11221          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11222$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11223          BOOT_JDK_FOUND=no
11224        else
11225          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11226          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11227            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11229            BOOT_JDK_FOUND=no
11230          else
11231            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11232            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11233
11234            # Extra M4 quote needed to protect [] in grep expression.
11235            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11236            if test "x$FOUND_VERSION_78" = x; then
11237              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11239              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11240$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11241              BOOT_JDK_FOUND=no
11242            else
11243              # We're done! :-)
11244              BOOT_JDK_FOUND=yes
11245
11246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11247
11248  # Input might be given as Windows format, start by converting to
11249  # unix format.
11250  path="$BOOT_JDK"
11251  new_path=`$CYGPATH -u "$path"`
11252
11253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11256  # "foo.exe" is OK but "foo" is an error.
11257  #
11258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11259  # It is also a way to make sure we got the proper file name for the real test later on.
11260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11261  if test "x$test_shortpath" = x; then
11262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11264    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11265  fi
11266
11267  # Call helper function which possibly converts this using DOS-style short mode.
11268  # If so, the updated path is stored in $new_path.
11269
11270  input_path="$new_path"
11271  # Check if we need to convert this using DOS-style short mode. If the path
11272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11273  # take no chances and rewrite it.
11274  # Note: m4 eats our [], so we need to use [ and ] instead.
11275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11276  if test "x$has_forbidden_chars" != x; then
11277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11281      # Going to short mode and back again did indeed matter. Since short mode is
11282      # case insensitive, let's make it lowercase to improve readability.
11283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11284      # Now convert it back to Unix-stile (cygpath)
11285      input_path=`$CYGPATH -u "$shortmode_path"`
11286      new_path="$input_path"
11287    fi
11288  fi
11289
11290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11291  if test "x$test_cygdrive_prefix" = x; then
11292    # As a simple fix, exclude /usr/bin since it's not a real path.
11293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11295      # a path prefixed by /cygdrive for fixpath to work.
11296      new_path="$CYGWIN_ROOT_PATH$input_path"
11297    fi
11298  fi
11299
11300
11301  if test "x$path" != "x$new_path"; then
11302    BOOT_JDK="$new_path"
11303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11305  fi
11306
11307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11308
11309  path="$BOOT_JDK"
11310  has_colon=`$ECHO $path | $GREP ^.:`
11311  new_path="$path"
11312  if test "x$has_colon" = x; then
11313    # Not in mixed or Windows style, start by that.
11314    new_path=`cmd //c echo $path`
11315  fi
11316
11317
11318  input_path="$new_path"
11319  # Check if we need to convert this using DOS-style short mode. If the path
11320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11321  # take no chances and rewrite it.
11322  # Note: m4 eats our [], so we need to use [ and ] instead.
11323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11324  if test "x$has_forbidden_chars" != x; then
11325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11327  fi
11328
11329
11330  windows_path="$new_path"
11331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11332    unix_path=`$CYGPATH -u "$windows_path"`
11333    new_path="$unix_path"
11334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11336    new_path="$unix_path"
11337  fi
11338
11339  if test "x$path" != "x$new_path"; then
11340    BOOT_JDK="$new_path"
11341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11343  fi
11344
11345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11347
11348  else
11349    # We're on a posix platform. Hooray! :)
11350    path="$BOOT_JDK"
11351
11352    if test ! -f "$path" && test ! -d "$path"; then
11353      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11354    fi
11355
11356    has_space=`$ECHO "$path" | $GREP " "`
11357    if test "x$has_space" != x; then
11358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11360      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11361    fi
11362  fi
11363
11364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11365$as_echo_n "checking for Boot JDK... " >&6; }
11366              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11367$as_echo "$BOOT_JDK" >&6; }
11368              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11369$as_echo_n "checking Boot JDK version... " >&6; }
11370              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11371              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11372$as_echo "$BOOT_JDK_VERSION" >&6; }
11373            fi # end check jdk version
11374          fi # end check rt.jar
11375        fi # end check javac
11376      fi # end check java
11377    fi # end check boot jdk found
11378  fi
11379
11380
11381# Test: Is $JAVA_HOME set?
11382
11383  if test "x$BOOT_JDK_FOUND" = xno; then
11384    # Now execute the test
11385
11386    if test "x$JAVA_HOME" != x; then
11387        JAVA_HOME_PROCESSED="$JAVA_HOME"
11388
11389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11390
11391  # Input might be given as Windows format, start by converting to
11392  # unix format.
11393  path="$JAVA_HOME_PROCESSED"
11394  new_path=`$CYGPATH -u "$path"`
11395
11396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11399  # "foo.exe" is OK but "foo" is an error.
11400  #
11401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11402  # It is also a way to make sure we got the proper file name for the real test later on.
11403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11404  if test "x$test_shortpath" = x; then
11405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11406$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11407    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11408  fi
11409
11410  # Call helper function which possibly converts this using DOS-style short mode.
11411  # If so, the updated path is stored in $new_path.
11412
11413  input_path="$new_path"
11414  # Check if we need to convert this using DOS-style short mode. If the path
11415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11416  # take no chances and rewrite it.
11417  # Note: m4 eats our [], so we need to use [ and ] instead.
11418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11419  if test "x$has_forbidden_chars" != x; then
11420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11424      # Going to short mode and back again did indeed matter. Since short mode is
11425      # case insensitive, let's make it lowercase to improve readability.
11426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11427      # Now convert it back to Unix-stile (cygpath)
11428      input_path=`$CYGPATH -u "$shortmode_path"`
11429      new_path="$input_path"
11430    fi
11431  fi
11432
11433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11434  if test "x$test_cygdrive_prefix" = x; then
11435    # As a simple fix, exclude /usr/bin since it's not a real path.
11436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11438      # a path prefixed by /cygdrive for fixpath to work.
11439      new_path="$CYGWIN_ROOT_PATH$input_path"
11440    fi
11441  fi
11442
11443
11444  if test "x$path" != "x$new_path"; then
11445    JAVA_HOME_PROCESSED="$new_path"
11446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11447$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11448  fi
11449
11450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11451
11452  path="$JAVA_HOME_PROCESSED"
11453  has_colon=`$ECHO $path | $GREP ^.:`
11454  new_path="$path"
11455  if test "x$has_colon" = x; then
11456    # Not in mixed or Windows style, start by that.
11457    new_path=`cmd //c echo $path`
11458  fi
11459
11460
11461  input_path="$new_path"
11462  # Check if we need to convert this using DOS-style short mode. If the path
11463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11464  # take no chances and rewrite it.
11465  # Note: m4 eats our [], so we need to use [ and ] instead.
11466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11467  if test "x$has_forbidden_chars" != x; then
11468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11470  fi
11471
11472
11473  windows_path="$new_path"
11474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11475    unix_path=`$CYGPATH -u "$windows_path"`
11476    new_path="$unix_path"
11477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11479    new_path="$unix_path"
11480  fi
11481
11482  if test "x$path" != "x$new_path"; then
11483    JAVA_HOME_PROCESSED="$new_path"
11484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11485$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11486  fi
11487
11488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11490
11491  else
11492    # We're on a posix platform. Hooray! :)
11493    path="$JAVA_HOME_PROCESSED"
11494
11495    if test ! -f "$path" && test ! -d "$path"; then
11496      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11497    fi
11498
11499    has_space=`$ECHO "$path" | $GREP " "`
11500    if test "x$has_space" != x; then
11501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11502$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11503      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11504    fi
11505  fi
11506
11507        if test ! -d "$JAVA_HOME_PROCESSED"; then
11508            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11509$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11510        else
11511          # Aha, the user has set a JAVA_HOME
11512          # let us use that as the Boot JDK.
11513          BOOT_JDK="$JAVA_HOME_PROCESSED"
11514          BOOT_JDK_FOUND=maybe
11515          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11516$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11517        fi
11518    fi
11519
11520
11521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11523      # Do we have a bin/java?
11524      if test ! -x "$BOOT_JDK/bin/java"; then
11525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11527        BOOT_JDK_FOUND=no
11528      else
11529        # Do we have a bin/javac?
11530        if test ! -x "$BOOT_JDK/bin/javac"; then
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11535          BOOT_JDK_FOUND=no
11536        else
11537          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11538          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11541            BOOT_JDK_FOUND=no
11542          else
11543            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11544            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11545
11546            # Extra M4 quote needed to protect [] in grep expression.
11547            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11548            if test "x$FOUND_VERSION_78" = x; then
11549              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11551              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11552$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11553              BOOT_JDK_FOUND=no
11554            else
11555              # We're done! :-)
11556              BOOT_JDK_FOUND=yes
11557
11558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11559
11560  # Input might be given as Windows format, start by converting to
11561  # unix format.
11562  path="$BOOT_JDK"
11563  new_path=`$CYGPATH -u "$path"`
11564
11565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11568  # "foo.exe" is OK but "foo" is an error.
11569  #
11570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11571  # It is also a way to make sure we got the proper file name for the real test later on.
11572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11573  if test "x$test_shortpath" = x; then
11574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11577  fi
11578
11579  # Call helper function which possibly converts this using DOS-style short mode.
11580  # If so, the updated path is stored in $new_path.
11581
11582  input_path="$new_path"
11583  # Check if we need to convert this using DOS-style short mode. If the path
11584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11585  # take no chances and rewrite it.
11586  # Note: m4 eats our [], so we need to use [ and ] instead.
11587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11588  if test "x$has_forbidden_chars" != x; then
11589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11593      # Going to short mode and back again did indeed matter. Since short mode is
11594      # case insensitive, let's make it lowercase to improve readability.
11595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11596      # Now convert it back to Unix-stile (cygpath)
11597      input_path=`$CYGPATH -u "$shortmode_path"`
11598      new_path="$input_path"
11599    fi
11600  fi
11601
11602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11603  if test "x$test_cygdrive_prefix" = x; then
11604    # As a simple fix, exclude /usr/bin since it's not a real path.
11605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11607      # a path prefixed by /cygdrive for fixpath to work.
11608      new_path="$CYGWIN_ROOT_PATH$input_path"
11609    fi
11610  fi
11611
11612
11613  if test "x$path" != "x$new_path"; then
11614    BOOT_JDK="$new_path"
11615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11617  fi
11618
11619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11620
11621  path="$BOOT_JDK"
11622  has_colon=`$ECHO $path | $GREP ^.:`
11623  new_path="$path"
11624  if test "x$has_colon" = x; then
11625    # Not in mixed or Windows style, start by that.
11626    new_path=`cmd //c echo $path`
11627  fi
11628
11629
11630  input_path="$new_path"
11631  # Check if we need to convert this using DOS-style short mode. If the path
11632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11633  # take no chances and rewrite it.
11634  # Note: m4 eats our [], so we need to use [ and ] instead.
11635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11636  if test "x$has_forbidden_chars" != x; then
11637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11639  fi
11640
11641
11642  windows_path="$new_path"
11643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11644    unix_path=`$CYGPATH -u "$windows_path"`
11645    new_path="$unix_path"
11646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11648    new_path="$unix_path"
11649  fi
11650
11651  if test "x$path" != "x$new_path"; then
11652    BOOT_JDK="$new_path"
11653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11655  fi
11656
11657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11659
11660  else
11661    # We're on a posix platform. Hooray! :)
11662    path="$BOOT_JDK"
11663
11664    if test ! -f "$path" && test ! -d "$path"; then
11665      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11666    fi
11667
11668    has_space=`$ECHO "$path" | $GREP " "`
11669    if test "x$has_space" != x; then
11670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11672      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11673    fi
11674  fi
11675
11676              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11677$as_echo_n "checking for Boot JDK... " >&6; }
11678              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11679$as_echo "$BOOT_JDK" >&6; }
11680              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11681$as_echo_n "checking Boot JDK version... " >&6; }
11682              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11683              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11684$as_echo "$BOOT_JDK_VERSION" >&6; }
11685            fi # end check jdk version
11686          fi # end check rt.jar
11687        fi # end check javac
11688      fi # end check java
11689    fi # end check boot jdk found
11690  fi
11691
11692
11693# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11694
11695  if test "x$BOOT_JDK_FOUND" = xno; then
11696    # Now execute the test
11697
11698    if test -x /usr/libexec/java_home; then
11699        BOOT_JDK=`/usr/libexec/java_home`
11700        BOOT_JDK_FOUND=maybe
11701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11702$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11703    fi
11704
11705
11706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11708      # Do we have a bin/java?
11709      if test ! -x "$BOOT_JDK/bin/java"; then
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11712        BOOT_JDK_FOUND=no
11713      else
11714        # Do we have a bin/javac?
11715        if test ! -x "$BOOT_JDK/bin/javac"; then
11716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11720          BOOT_JDK_FOUND=no
11721        else
11722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11726            BOOT_JDK_FOUND=no
11727          else
11728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11730
11731            # Extra M4 quote needed to protect [] in grep expression.
11732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11733            if test "x$FOUND_VERSION_78" = x; then
11734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11738              BOOT_JDK_FOUND=no
11739            else
11740              # We're done! :-)
11741              BOOT_JDK_FOUND=yes
11742
11743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11744
11745  # Input might be given as Windows format, start by converting to
11746  # unix format.
11747  path="$BOOT_JDK"
11748  new_path=`$CYGPATH -u "$path"`
11749
11750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11753  # "foo.exe" is OK but "foo" is an error.
11754  #
11755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11756  # It is also a way to make sure we got the proper file name for the real test later on.
11757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11758  if test "x$test_shortpath" = x; then
11759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11762  fi
11763
11764  # Call helper function which possibly converts this using DOS-style short mode.
11765  # If so, the updated path is stored in $new_path.
11766
11767  input_path="$new_path"
11768  # Check if we need to convert this using DOS-style short mode. If the path
11769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11770  # take no chances and rewrite it.
11771  # Note: m4 eats our [], so we need to use [ and ] instead.
11772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11773  if test "x$has_forbidden_chars" != x; then
11774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11778      # Going to short mode and back again did indeed matter. Since short mode is
11779      # case insensitive, let's make it lowercase to improve readability.
11780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11781      # Now convert it back to Unix-stile (cygpath)
11782      input_path=`$CYGPATH -u "$shortmode_path"`
11783      new_path="$input_path"
11784    fi
11785  fi
11786
11787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11788  if test "x$test_cygdrive_prefix" = x; then
11789    # As a simple fix, exclude /usr/bin since it's not a real path.
11790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11792      # a path prefixed by /cygdrive for fixpath to work.
11793      new_path="$CYGWIN_ROOT_PATH$input_path"
11794    fi
11795  fi
11796
11797
11798  if test "x$path" != "x$new_path"; then
11799    BOOT_JDK="$new_path"
11800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11802  fi
11803
11804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11805
11806  path="$BOOT_JDK"
11807  has_colon=`$ECHO $path | $GREP ^.:`
11808  new_path="$path"
11809  if test "x$has_colon" = x; then
11810    # Not in mixed or Windows style, start by that.
11811    new_path=`cmd //c echo $path`
11812  fi
11813
11814
11815  input_path="$new_path"
11816  # Check if we need to convert this using DOS-style short mode. If the path
11817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11818  # take no chances and rewrite it.
11819  # Note: m4 eats our [], so we need to use [ and ] instead.
11820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11821  if test "x$has_forbidden_chars" != x; then
11822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11824  fi
11825
11826
11827  windows_path="$new_path"
11828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11829    unix_path=`$CYGPATH -u "$windows_path"`
11830    new_path="$unix_path"
11831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11833    new_path="$unix_path"
11834  fi
11835
11836  if test "x$path" != "x$new_path"; then
11837    BOOT_JDK="$new_path"
11838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11840  fi
11841
11842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11844
11845  else
11846    # We're on a posix platform. Hooray! :)
11847    path="$BOOT_JDK"
11848
11849    if test ! -f "$path" && test ! -d "$path"; then
11850      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11851    fi
11852
11853    has_space=`$ECHO "$path" | $GREP " "`
11854    if test "x$has_space" != x; then
11855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11858    fi
11859  fi
11860
11861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11862$as_echo_n "checking for Boot JDK... " >&6; }
11863              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11864$as_echo "$BOOT_JDK" >&6; }
11865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11866$as_echo_n "checking Boot JDK version... " >&6; }
11867              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11869$as_echo "$BOOT_JDK_VERSION" >&6; }
11870            fi # end check jdk version
11871          fi # end check rt.jar
11872        fi # end check javac
11873      fi # end check java
11874    fi # end check boot jdk found
11875  fi
11876
11877
11878# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11879
11880  if test "x$BOOT_JDK_FOUND" = xno; then
11881    # Now execute the test
11882
11883    # Extract the first word of "javac", so it can be a program name with args.
11884set dummy javac; ac_word=$2
11885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11886$as_echo_n "checking for $ac_word... " >&6; }
11887if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11888  $as_echo_n "(cached) " >&6
11889else
11890  case $JAVAC_CHECK in
11891  [\\/]* | ?:[\\/]*)
11892  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11893  ;;
11894  *)
11895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11896for as_dir in $PATH
11897do
11898  IFS=$as_save_IFS
11899  test -z "$as_dir" && as_dir=.
11900    for ac_exec_ext in '' $ac_executable_extensions; do
11901  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11902    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11904    break 2
11905  fi
11906done
11907  done
11908IFS=$as_save_IFS
11909
11910  ;;
11911esac
11912fi
11913JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11914if test -n "$JAVAC_CHECK"; then
11915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11916$as_echo "$JAVAC_CHECK" >&6; }
11917else
11918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11919$as_echo "no" >&6; }
11920fi
11921
11922
11923    # Extract the first word of "java", so it can be a program name with args.
11924set dummy java; ac_word=$2
11925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11926$as_echo_n "checking for $ac_word... " >&6; }
11927if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11928  $as_echo_n "(cached) " >&6
11929else
11930  case $JAVA_CHECK in
11931  [\\/]* | ?:[\\/]*)
11932  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11933  ;;
11934  *)
11935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11936for as_dir in $PATH
11937do
11938  IFS=$as_save_IFS
11939  test -z "$as_dir" && as_dir=.
11940    for ac_exec_ext in '' $ac_executable_extensions; do
11941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11942    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11944    break 2
11945  fi
11946done
11947  done
11948IFS=$as_save_IFS
11949
11950  ;;
11951esac
11952fi
11953JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11954if test -n "$JAVA_CHECK"; then
11955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11956$as_echo "$JAVA_CHECK" >&6; }
11957else
11958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11959$as_echo "no" >&6; }
11960fi
11961
11962
11963    BINARY="$JAVAC_CHECK"
11964    if test "x$JAVAC_CHECK" = x; then
11965        BINARY="$JAVA_CHECK"
11966    fi
11967    if test "x$BINARY" != x; then
11968        # So there is a java(c) binary, it might be part of a JDK.
11969        # Lets find the JDK/JRE directory by following symbolic links.
11970        # Linux/GNU systems often have links from /usr/bin/java to
11971        # /etc/alternatives/java to the real JDK binary.
11972
11973    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11974        # Follow a chain of symbolic links. Use readlink
11975        # where it exists, else fall back to horribly
11976        # complicated shell code.
11977        if test "x$READLINK_TESTED" != yes; then
11978            # On MacOSX there is a readlink tool with a different
11979            # purpose than the GNU readlink tool. Check the found readlink.
11980            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11981            if test "x$ISGNU" = x; then
11982                 # A readlink that we do not know how to use.
11983                 # Are there other non-GNU readlinks out there?
11984                 READLINK_TESTED=yes
11985                 READLINK=
11986            fi
11987        fi
11988
11989        if test "x$READLINK" != x; then
11990            BINARY=`$READLINK -f $BINARY`
11991        else
11992            # Save the current directory for restoring afterwards
11993            STARTDIR=$PWD
11994            COUNTER=0
11995            sym_link_dir=`$DIRNAME $BINARY`
11996            sym_link_file=`$BASENAME $BINARY`
11997            # Use the system pwd and not the shell builtin to resolve directory symlinks
11998            cd $sym_link_dir
11999            cd `$THEPWDCMD`
12000            sym_link_dir=`$THEPWDCMD`
12001            # Resolve file symlinks
12002            while test $COUNTER -lt 20; do
12003                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12004                if test "x$ISLINK" == x; then
12005                    # This is not a symbolic link! We are done!
12006                    break
12007                fi
12008                # Again resolve directory symlinks since the target of the just found
12009                # link could be in a different directory
12010                cd `$DIRNAME $ISLINK`
12011                sym_link_dir=`$THEPWDCMD`
12012                sym_link_file=`$BASENAME $ISLINK`
12013                let COUNTER=COUNTER+1
12014            done
12015            cd $STARTDIR
12016            BINARY=$sym_link_dir/$sym_link_file
12017        fi
12018    fi
12019
12020        BOOT_JDK=`dirname "$BINARY"`
12021        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12022        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12023            # Looks like we found ourselves an JDK
12024            BOOT_JDK_FOUND=maybe
12025            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12026$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12027        fi
12028    fi
12029
12030
12031    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12032    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12033      # Do we have a bin/java?
12034      if test ! -x "$BOOT_JDK/bin/java"; then
12035        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12037        BOOT_JDK_FOUND=no
12038      else
12039        # Do we have a bin/javac?
12040        if test ! -x "$BOOT_JDK/bin/javac"; then
12041          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12043          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12044$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12045          BOOT_JDK_FOUND=no
12046        else
12047          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12048          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12049            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12051            BOOT_JDK_FOUND=no
12052          else
12053            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12054            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12055
12056            # Extra M4 quote needed to protect [] in grep expression.
12057            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12058            if test "x$FOUND_VERSION_78" = x; then
12059              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12061              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12062$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12063              BOOT_JDK_FOUND=no
12064            else
12065              # We're done! :-)
12066              BOOT_JDK_FOUND=yes
12067
12068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12069
12070  # Input might be given as Windows format, start by converting to
12071  # unix format.
12072  path="$BOOT_JDK"
12073  new_path=`$CYGPATH -u "$path"`
12074
12075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12078  # "foo.exe" is OK but "foo" is an error.
12079  #
12080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12081  # It is also a way to make sure we got the proper file name for the real test later on.
12082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12083  if test "x$test_shortpath" = x; then
12084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12085$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12086    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12087  fi
12088
12089  # Call helper function which possibly converts this using DOS-style short mode.
12090  # If so, the updated path is stored in $new_path.
12091
12092  input_path="$new_path"
12093  # Check if we need to convert this using DOS-style short mode. If the path
12094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12095  # take no chances and rewrite it.
12096  # Note: m4 eats our [], so we need to use [ and ] instead.
12097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12098  if test "x$has_forbidden_chars" != x; then
12099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12103      # Going to short mode and back again did indeed matter. Since short mode is
12104      # case insensitive, let's make it lowercase to improve readability.
12105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12106      # Now convert it back to Unix-stile (cygpath)
12107      input_path=`$CYGPATH -u "$shortmode_path"`
12108      new_path="$input_path"
12109    fi
12110  fi
12111
12112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12113  if test "x$test_cygdrive_prefix" = x; then
12114    # As a simple fix, exclude /usr/bin since it's not a real path.
12115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12117      # a path prefixed by /cygdrive for fixpath to work.
12118      new_path="$CYGWIN_ROOT_PATH$input_path"
12119    fi
12120  fi
12121
12122
12123  if test "x$path" != "x$new_path"; then
12124    BOOT_JDK="$new_path"
12125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12127  fi
12128
12129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12130
12131  path="$BOOT_JDK"
12132  has_colon=`$ECHO $path | $GREP ^.:`
12133  new_path="$path"
12134  if test "x$has_colon" = x; then
12135    # Not in mixed or Windows style, start by that.
12136    new_path=`cmd //c echo $path`
12137  fi
12138
12139
12140  input_path="$new_path"
12141  # Check if we need to convert this using DOS-style short mode. If the path
12142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12143  # take no chances and rewrite it.
12144  # Note: m4 eats our [], so we need to use [ and ] instead.
12145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12146  if test "x$has_forbidden_chars" != x; then
12147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12149  fi
12150
12151
12152  windows_path="$new_path"
12153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12154    unix_path=`$CYGPATH -u "$windows_path"`
12155    new_path="$unix_path"
12156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12158    new_path="$unix_path"
12159  fi
12160
12161  if test "x$path" != "x$new_path"; then
12162    BOOT_JDK="$new_path"
12163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12164$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12165  fi
12166
12167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12169
12170  else
12171    # We're on a posix platform. Hooray! :)
12172    path="$BOOT_JDK"
12173
12174    if test ! -f "$path" && test ! -d "$path"; then
12175      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12176    fi
12177
12178    has_space=`$ECHO "$path" | $GREP " "`
12179    if test "x$has_space" != x; then
12180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12182      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12183    fi
12184  fi
12185
12186              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12187$as_echo_n "checking for Boot JDK... " >&6; }
12188              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12189$as_echo "$BOOT_JDK" >&6; }
12190              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12191$as_echo_n "checking Boot JDK version... " >&6; }
12192              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12193              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12194$as_echo "$BOOT_JDK_VERSION" >&6; }
12195            fi # end check jdk version
12196          fi # end check rt.jar
12197        fi # end check javac
12198      fi # end check java
12199    fi # end check boot jdk found
12200  fi
12201
12202
12203# Test: Is there a JDK installed in default, well-known locations?
12204
12205  if test "x$BOOT_JDK_FOUND" = xno; then
12206    # Now execute the test
12207
12208  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12209
12210  if test "x$BOOT_JDK_FOUND" = xno; then
12211    # Now execute the test
12212
12213  if test "x$ProgramW6432" != x; then
12214    VIRTUAL_DIR="$ProgramW6432/Java"
12215
12216  windows_path="$VIRTUAL_DIR"
12217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12218    unix_path=`$CYGPATH -u "$windows_path"`
12219    VIRTUAL_DIR="$unix_path"
12220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12222    VIRTUAL_DIR="$unix_path"
12223  fi
12224
12225
12226  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12227  BOOT_JDK_SUFFIX=""
12228  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12229  if test "x$ALL_JDKS_FOUND" != x; then
12230    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12231
12232  if test "x$BOOT_JDK_FOUND" = xno; then
12233    # Now execute the test
12234
12235        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12236        if test -d "$BOOT_JDK"; then
12237          BOOT_JDK_FOUND=maybe
12238          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12239$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12240        fi
12241
12242
12243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12245      # Do we have a bin/java?
12246      if test ! -x "$BOOT_JDK/bin/java"; then
12247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12249        BOOT_JDK_FOUND=no
12250      else
12251        # Do we have a bin/javac?
12252        if test ! -x "$BOOT_JDK/bin/javac"; then
12253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12257          BOOT_JDK_FOUND=no
12258        else
12259          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12260          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12263            BOOT_JDK_FOUND=no
12264          else
12265            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12267
12268            # Extra M4 quote needed to protect [] in grep expression.
12269            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12270            if test "x$FOUND_VERSION_78" = x; then
12271              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12273              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12274$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12275              BOOT_JDK_FOUND=no
12276            else
12277              # We're done! :-)
12278              BOOT_JDK_FOUND=yes
12279
12280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12281
12282  # Input might be given as Windows format, start by converting to
12283  # unix format.
12284  path="$BOOT_JDK"
12285  new_path=`$CYGPATH -u "$path"`
12286
12287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12290  # "foo.exe" is OK but "foo" is an error.
12291  #
12292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12293  # It is also a way to make sure we got the proper file name for the real test later on.
12294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12295  if test "x$test_shortpath" = x; then
12296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12299  fi
12300
12301  # Call helper function which possibly converts this using DOS-style short mode.
12302  # If so, the updated path is stored in $new_path.
12303
12304  input_path="$new_path"
12305  # Check if we need to convert this using DOS-style short mode. If the path
12306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12307  # take no chances and rewrite it.
12308  # Note: m4 eats our [], so we need to use [ and ] instead.
12309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12310  if test "x$has_forbidden_chars" != x; then
12311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12315      # Going to short mode and back again did indeed matter. Since short mode is
12316      # case insensitive, let's make it lowercase to improve readability.
12317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12318      # Now convert it back to Unix-stile (cygpath)
12319      input_path=`$CYGPATH -u "$shortmode_path"`
12320      new_path="$input_path"
12321    fi
12322  fi
12323
12324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12325  if test "x$test_cygdrive_prefix" = x; then
12326    # As a simple fix, exclude /usr/bin since it's not a real path.
12327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12329      # a path prefixed by /cygdrive for fixpath to work.
12330      new_path="$CYGWIN_ROOT_PATH$input_path"
12331    fi
12332  fi
12333
12334
12335  if test "x$path" != "x$new_path"; then
12336    BOOT_JDK="$new_path"
12337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12339  fi
12340
12341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12342
12343  path="$BOOT_JDK"
12344  has_colon=`$ECHO $path | $GREP ^.:`
12345  new_path="$path"
12346  if test "x$has_colon" = x; then
12347    # Not in mixed or Windows style, start by that.
12348    new_path=`cmd //c echo $path`
12349  fi
12350
12351
12352  input_path="$new_path"
12353  # Check if we need to convert this using DOS-style short mode. If the path
12354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12355  # take no chances and rewrite it.
12356  # Note: m4 eats our [], so we need to use [ and ] instead.
12357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12358  if test "x$has_forbidden_chars" != x; then
12359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12361  fi
12362
12363
12364  windows_path="$new_path"
12365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12366    unix_path=`$CYGPATH -u "$windows_path"`
12367    new_path="$unix_path"
12368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12370    new_path="$unix_path"
12371  fi
12372
12373  if test "x$path" != "x$new_path"; then
12374    BOOT_JDK="$new_path"
12375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12377  fi
12378
12379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12381
12382  else
12383    # We're on a posix platform. Hooray! :)
12384    path="$BOOT_JDK"
12385
12386    if test ! -f "$path" && test ! -d "$path"; then
12387      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12388    fi
12389
12390    has_space=`$ECHO "$path" | $GREP " "`
12391    if test "x$has_space" != x; then
12392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12394      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12395    fi
12396  fi
12397
12398              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12399$as_echo_n "checking for Boot JDK... " >&6; }
12400              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12401$as_echo "$BOOT_JDK" >&6; }
12402              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12403$as_echo_n "checking Boot JDK version... " >&6; }
12404              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12405              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12406$as_echo "$BOOT_JDK_VERSION" >&6; }
12407            fi # end check jdk version
12408          fi # end check rt.jar
12409        fi # end check javac
12410      fi # end check java
12411    fi # end check boot jdk found
12412  fi
12413
12414    done
12415  fi
12416
12417  fi
12418
12419
12420    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12421    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12422      # Do we have a bin/java?
12423      if test ! -x "$BOOT_JDK/bin/java"; then
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12426        BOOT_JDK_FOUND=no
12427      else
12428        # Do we have a bin/javac?
12429        if test ! -x "$BOOT_JDK/bin/javac"; then
12430          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12432          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12433$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12434          BOOT_JDK_FOUND=no
12435        else
12436          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12437          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12438            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12440            BOOT_JDK_FOUND=no
12441          else
12442            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12443            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12444
12445            # Extra M4 quote needed to protect [] in grep expression.
12446            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12447            if test "x$FOUND_VERSION_78" = x; then
12448              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12450              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12451$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12452              BOOT_JDK_FOUND=no
12453            else
12454              # We're done! :-)
12455              BOOT_JDK_FOUND=yes
12456
12457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12458
12459  # Input might be given as Windows format, start by converting to
12460  # unix format.
12461  path="$BOOT_JDK"
12462  new_path=`$CYGPATH -u "$path"`
12463
12464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12467  # "foo.exe" is OK but "foo" is an error.
12468  #
12469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12470  # It is also a way to make sure we got the proper file name for the real test later on.
12471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12472  if test "x$test_shortpath" = x; then
12473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12476  fi
12477
12478  # Call helper function which possibly converts this using DOS-style short mode.
12479  # If so, the updated path is stored in $new_path.
12480
12481  input_path="$new_path"
12482  # Check if we need to convert this using DOS-style short mode. If the path
12483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12484  # take no chances and rewrite it.
12485  # Note: m4 eats our [], so we need to use [ and ] instead.
12486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12487  if test "x$has_forbidden_chars" != x; then
12488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12492      # Going to short mode and back again did indeed matter. Since short mode is
12493      # case insensitive, let's make it lowercase to improve readability.
12494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12495      # Now convert it back to Unix-stile (cygpath)
12496      input_path=`$CYGPATH -u "$shortmode_path"`
12497      new_path="$input_path"
12498    fi
12499  fi
12500
12501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12502  if test "x$test_cygdrive_prefix" = x; then
12503    # As a simple fix, exclude /usr/bin since it's not a real path.
12504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12506      # a path prefixed by /cygdrive for fixpath to work.
12507      new_path="$CYGWIN_ROOT_PATH$input_path"
12508    fi
12509  fi
12510
12511
12512  if test "x$path" != "x$new_path"; then
12513    BOOT_JDK="$new_path"
12514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12516  fi
12517
12518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12519
12520  path="$BOOT_JDK"
12521  has_colon=`$ECHO $path | $GREP ^.:`
12522  new_path="$path"
12523  if test "x$has_colon" = x; then
12524    # Not in mixed or Windows style, start by that.
12525    new_path=`cmd //c echo $path`
12526  fi
12527
12528
12529  input_path="$new_path"
12530  # Check if we need to convert this using DOS-style short mode. If the path
12531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12532  # take no chances and rewrite it.
12533  # Note: m4 eats our [], so we need to use [ and ] instead.
12534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12535  if test "x$has_forbidden_chars" != x; then
12536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12538  fi
12539
12540
12541  windows_path="$new_path"
12542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12543    unix_path=`$CYGPATH -u "$windows_path"`
12544    new_path="$unix_path"
12545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12547    new_path="$unix_path"
12548  fi
12549
12550  if test "x$path" != "x$new_path"; then
12551    BOOT_JDK="$new_path"
12552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12554  fi
12555
12556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12558
12559  else
12560    # We're on a posix platform. Hooray! :)
12561    path="$BOOT_JDK"
12562
12563    if test ! -f "$path" && test ! -d "$path"; then
12564      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12565    fi
12566
12567    has_space=`$ECHO "$path" | $GREP " "`
12568    if test "x$has_space" != x; then
12569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12570$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12571      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12572    fi
12573  fi
12574
12575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12576$as_echo_n "checking for Boot JDK... " >&6; }
12577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12578$as_echo "$BOOT_JDK" >&6; }
12579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12580$as_echo_n "checking Boot JDK version... " >&6; }
12581              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12583$as_echo "$BOOT_JDK_VERSION" >&6; }
12584            fi # end check jdk version
12585          fi # end check rt.jar
12586        fi # end check javac
12587      fi # end check java
12588    fi # end check boot jdk found
12589  fi
12590
12591
12592  if test "x$BOOT_JDK_FOUND" = xno; then
12593    # Now execute the test
12594
12595  if test "x$PROGRAMW6432" != x; then
12596    VIRTUAL_DIR="$PROGRAMW6432/Java"
12597
12598  windows_path="$VIRTUAL_DIR"
12599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12600    unix_path=`$CYGPATH -u "$windows_path"`
12601    VIRTUAL_DIR="$unix_path"
12602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12604    VIRTUAL_DIR="$unix_path"
12605  fi
12606
12607
12608  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12609  BOOT_JDK_SUFFIX=""
12610  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12611  if test "x$ALL_JDKS_FOUND" != x; then
12612    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12613
12614  if test "x$BOOT_JDK_FOUND" = xno; then
12615    # Now execute the test
12616
12617        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12618        if test -d "$BOOT_JDK"; then
12619          BOOT_JDK_FOUND=maybe
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12621$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12622        fi
12623
12624
12625    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12626    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12627      # Do we have a bin/java?
12628      if test ! -x "$BOOT_JDK/bin/java"; then
12629        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12631        BOOT_JDK_FOUND=no
12632      else
12633        # Do we have a bin/javac?
12634        if test ! -x "$BOOT_JDK/bin/javac"; then
12635          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12637          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12638$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12639          BOOT_JDK_FOUND=no
12640        else
12641          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12642          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12643            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12645            BOOT_JDK_FOUND=no
12646          else
12647            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12648            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12649
12650            # Extra M4 quote needed to protect [] in grep expression.
12651            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12652            if test "x$FOUND_VERSION_78" = x; then
12653              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12655              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12656$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12657              BOOT_JDK_FOUND=no
12658            else
12659              # We're done! :-)
12660              BOOT_JDK_FOUND=yes
12661
12662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12663
12664  # Input might be given as Windows format, start by converting to
12665  # unix format.
12666  path="$BOOT_JDK"
12667  new_path=`$CYGPATH -u "$path"`
12668
12669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12672  # "foo.exe" is OK but "foo" is an error.
12673  #
12674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12675  # It is also a way to make sure we got the proper file name for the real test later on.
12676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12677  if test "x$test_shortpath" = x; then
12678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12680    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12681  fi
12682
12683  # Call helper function which possibly converts this using DOS-style short mode.
12684  # If so, the updated path is stored in $new_path.
12685
12686  input_path="$new_path"
12687  # Check if we need to convert this using DOS-style short mode. If the path
12688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12689  # take no chances and rewrite it.
12690  # Note: m4 eats our [], so we need to use [ and ] instead.
12691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12692  if test "x$has_forbidden_chars" != x; then
12693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12697      # Going to short mode and back again did indeed matter. Since short mode is
12698      # case insensitive, let's make it lowercase to improve readability.
12699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12700      # Now convert it back to Unix-stile (cygpath)
12701      input_path=`$CYGPATH -u "$shortmode_path"`
12702      new_path="$input_path"
12703    fi
12704  fi
12705
12706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12707  if test "x$test_cygdrive_prefix" = x; then
12708    # As a simple fix, exclude /usr/bin since it's not a real path.
12709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12711      # a path prefixed by /cygdrive for fixpath to work.
12712      new_path="$CYGWIN_ROOT_PATH$input_path"
12713    fi
12714  fi
12715
12716
12717  if test "x$path" != "x$new_path"; then
12718    BOOT_JDK="$new_path"
12719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12721  fi
12722
12723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12724
12725  path="$BOOT_JDK"
12726  has_colon=`$ECHO $path | $GREP ^.:`
12727  new_path="$path"
12728  if test "x$has_colon" = x; then
12729    # Not in mixed or Windows style, start by that.
12730    new_path=`cmd //c echo $path`
12731  fi
12732
12733
12734  input_path="$new_path"
12735  # Check if we need to convert this using DOS-style short mode. If the path
12736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12737  # take no chances and rewrite it.
12738  # Note: m4 eats our [], so we need to use [ and ] instead.
12739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12740  if test "x$has_forbidden_chars" != x; then
12741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12743  fi
12744
12745
12746  windows_path="$new_path"
12747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12748    unix_path=`$CYGPATH -u "$windows_path"`
12749    new_path="$unix_path"
12750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12752    new_path="$unix_path"
12753  fi
12754
12755  if test "x$path" != "x$new_path"; then
12756    BOOT_JDK="$new_path"
12757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12759  fi
12760
12761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12763
12764  else
12765    # We're on a posix platform. Hooray! :)
12766    path="$BOOT_JDK"
12767
12768    if test ! -f "$path" && test ! -d "$path"; then
12769      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12770    fi
12771
12772    has_space=`$ECHO "$path" | $GREP " "`
12773    if test "x$has_space" != x; then
12774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12777    fi
12778  fi
12779
12780              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12781$as_echo_n "checking for Boot JDK... " >&6; }
12782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12783$as_echo "$BOOT_JDK" >&6; }
12784              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12785$as_echo_n "checking Boot JDK version... " >&6; }
12786              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12787              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12788$as_echo "$BOOT_JDK_VERSION" >&6; }
12789            fi # end check jdk version
12790          fi # end check rt.jar
12791        fi # end check javac
12792      fi # end check java
12793    fi # end check boot jdk found
12794  fi
12795
12796    done
12797  fi
12798
12799  fi
12800
12801
12802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12804      # Do we have a bin/java?
12805      if test ! -x "$BOOT_JDK/bin/java"; then
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12808        BOOT_JDK_FOUND=no
12809      else
12810        # Do we have a bin/javac?
12811        if test ! -x "$BOOT_JDK/bin/javac"; then
12812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12816          BOOT_JDK_FOUND=no
12817        else
12818          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12819          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12822            BOOT_JDK_FOUND=no
12823          else
12824            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12825            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12826
12827            # Extra M4 quote needed to protect [] in grep expression.
12828            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12829            if test "x$FOUND_VERSION_78" = x; then
12830              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12832              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12833$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12834              BOOT_JDK_FOUND=no
12835            else
12836              # We're done! :-)
12837              BOOT_JDK_FOUND=yes
12838
12839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12840
12841  # Input might be given as Windows format, start by converting to
12842  # unix format.
12843  path="$BOOT_JDK"
12844  new_path=`$CYGPATH -u "$path"`
12845
12846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12849  # "foo.exe" is OK but "foo" is an error.
12850  #
12851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12852  # It is also a way to make sure we got the proper file name for the real test later on.
12853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12854  if test "x$test_shortpath" = x; then
12855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12857    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12858  fi
12859
12860  # Call helper function which possibly converts this using DOS-style short mode.
12861  # If so, the updated path is stored in $new_path.
12862
12863  input_path="$new_path"
12864  # Check if we need to convert this using DOS-style short mode. If the path
12865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12866  # take no chances and rewrite it.
12867  # Note: m4 eats our [], so we need to use [ and ] instead.
12868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12869  if test "x$has_forbidden_chars" != x; then
12870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12874      # Going to short mode and back again did indeed matter. Since short mode is
12875      # case insensitive, let's make it lowercase to improve readability.
12876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12877      # Now convert it back to Unix-stile (cygpath)
12878      input_path=`$CYGPATH -u "$shortmode_path"`
12879      new_path="$input_path"
12880    fi
12881  fi
12882
12883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12884  if test "x$test_cygdrive_prefix" = x; then
12885    # As a simple fix, exclude /usr/bin since it's not a real path.
12886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12888      # a path prefixed by /cygdrive for fixpath to work.
12889      new_path="$CYGWIN_ROOT_PATH$input_path"
12890    fi
12891  fi
12892
12893
12894  if test "x$path" != "x$new_path"; then
12895    BOOT_JDK="$new_path"
12896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12898  fi
12899
12900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12901
12902  path="$BOOT_JDK"
12903  has_colon=`$ECHO $path | $GREP ^.:`
12904  new_path="$path"
12905  if test "x$has_colon" = x; then
12906    # Not in mixed or Windows style, start by that.
12907    new_path=`cmd //c echo $path`
12908  fi
12909
12910
12911  input_path="$new_path"
12912  # Check if we need to convert this using DOS-style short mode. If the path
12913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12914  # take no chances and rewrite it.
12915  # Note: m4 eats our [], so we need to use [ and ] instead.
12916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12917  if test "x$has_forbidden_chars" != x; then
12918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12920  fi
12921
12922
12923  windows_path="$new_path"
12924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12925    unix_path=`$CYGPATH -u "$windows_path"`
12926    new_path="$unix_path"
12927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12929    new_path="$unix_path"
12930  fi
12931
12932  if test "x$path" != "x$new_path"; then
12933    BOOT_JDK="$new_path"
12934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12936  fi
12937
12938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12940
12941  else
12942    # We're on a posix platform. Hooray! :)
12943    path="$BOOT_JDK"
12944
12945    if test ! -f "$path" && test ! -d "$path"; then
12946      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12947    fi
12948
12949    has_space=`$ECHO "$path" | $GREP " "`
12950    if test "x$has_space" != x; then
12951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12954    fi
12955  fi
12956
12957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12958$as_echo_n "checking for Boot JDK... " >&6; }
12959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12960$as_echo "$BOOT_JDK" >&6; }
12961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12962$as_echo_n "checking Boot JDK version... " >&6; }
12963              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12964              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12965$as_echo "$BOOT_JDK_VERSION" >&6; }
12966            fi # end check jdk version
12967          fi # end check rt.jar
12968        fi # end check javac
12969      fi # end check java
12970    fi # end check boot jdk found
12971  fi
12972
12973
12974  if test "x$BOOT_JDK_FOUND" = xno; then
12975    # Now execute the test
12976
12977  if test "x$PROGRAMFILES" != x; then
12978    VIRTUAL_DIR="$PROGRAMFILES/Java"
12979
12980  windows_path="$VIRTUAL_DIR"
12981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12982    unix_path=`$CYGPATH -u "$windows_path"`
12983    VIRTUAL_DIR="$unix_path"
12984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12986    VIRTUAL_DIR="$unix_path"
12987  fi
12988
12989
12990  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12991  BOOT_JDK_SUFFIX=""
12992  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12993  if test "x$ALL_JDKS_FOUND" != x; then
12994    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12995
12996  if test "x$BOOT_JDK_FOUND" = xno; then
12997    # Now execute the test
12998
12999        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13000        if test -d "$BOOT_JDK"; then
13001          BOOT_JDK_FOUND=maybe
13002          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13003$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13004        fi
13005
13006
13007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13009      # Do we have a bin/java?
13010      if test ! -x "$BOOT_JDK/bin/java"; then
13011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13013        BOOT_JDK_FOUND=no
13014      else
13015        # Do we have a bin/javac?
13016        if test ! -x "$BOOT_JDK/bin/javac"; then
13017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13021          BOOT_JDK_FOUND=no
13022        else
13023          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13024          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13027            BOOT_JDK_FOUND=no
13028          else
13029            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13031
13032            # Extra M4 quote needed to protect [] in grep expression.
13033            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13034            if test "x$FOUND_VERSION_78" = x; then
13035              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13037              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13038$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13039              BOOT_JDK_FOUND=no
13040            else
13041              # We're done! :-)
13042              BOOT_JDK_FOUND=yes
13043
13044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13045
13046  # Input might be given as Windows format, start by converting to
13047  # unix format.
13048  path="$BOOT_JDK"
13049  new_path=`$CYGPATH -u "$path"`
13050
13051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13054  # "foo.exe" is OK but "foo" is an error.
13055  #
13056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13057  # It is also a way to make sure we got the proper file name for the real test later on.
13058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13059  if test "x$test_shortpath" = x; then
13060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13063  fi
13064
13065  # Call helper function which possibly converts this using DOS-style short mode.
13066  # If so, the updated path is stored in $new_path.
13067
13068  input_path="$new_path"
13069  # Check if we need to convert this using DOS-style short mode. If the path
13070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13071  # take no chances and rewrite it.
13072  # Note: m4 eats our [], so we need to use [ and ] instead.
13073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13074  if test "x$has_forbidden_chars" != x; then
13075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13079      # Going to short mode and back again did indeed matter. Since short mode is
13080      # case insensitive, let's make it lowercase to improve readability.
13081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13082      # Now convert it back to Unix-stile (cygpath)
13083      input_path=`$CYGPATH -u "$shortmode_path"`
13084      new_path="$input_path"
13085    fi
13086  fi
13087
13088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13089  if test "x$test_cygdrive_prefix" = x; then
13090    # As a simple fix, exclude /usr/bin since it's not a real path.
13091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13093      # a path prefixed by /cygdrive for fixpath to work.
13094      new_path="$CYGWIN_ROOT_PATH$input_path"
13095    fi
13096  fi
13097
13098
13099  if test "x$path" != "x$new_path"; then
13100    BOOT_JDK="$new_path"
13101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13103  fi
13104
13105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13106
13107  path="$BOOT_JDK"
13108  has_colon=`$ECHO $path | $GREP ^.:`
13109  new_path="$path"
13110  if test "x$has_colon" = x; then
13111    # Not in mixed or Windows style, start by that.
13112    new_path=`cmd //c echo $path`
13113  fi
13114
13115
13116  input_path="$new_path"
13117  # Check if we need to convert this using DOS-style short mode. If the path
13118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13119  # take no chances and rewrite it.
13120  # Note: m4 eats our [], so we need to use [ and ] instead.
13121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13122  if test "x$has_forbidden_chars" != x; then
13123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13125  fi
13126
13127
13128  windows_path="$new_path"
13129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13130    unix_path=`$CYGPATH -u "$windows_path"`
13131    new_path="$unix_path"
13132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13134    new_path="$unix_path"
13135  fi
13136
13137  if test "x$path" != "x$new_path"; then
13138    BOOT_JDK="$new_path"
13139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13141  fi
13142
13143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13145
13146  else
13147    # We're on a posix platform. Hooray! :)
13148    path="$BOOT_JDK"
13149
13150    if test ! -f "$path" && test ! -d "$path"; then
13151      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13152    fi
13153
13154    has_space=`$ECHO "$path" | $GREP " "`
13155    if test "x$has_space" != x; then
13156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13158      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13159    fi
13160  fi
13161
13162              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13163$as_echo_n "checking for Boot JDK... " >&6; }
13164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13165$as_echo "$BOOT_JDK" >&6; }
13166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13167$as_echo_n "checking Boot JDK version... " >&6; }
13168              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13170$as_echo "$BOOT_JDK_VERSION" >&6; }
13171            fi # end check jdk version
13172          fi # end check rt.jar
13173        fi # end check javac
13174      fi # end check java
13175    fi # end check boot jdk found
13176  fi
13177
13178    done
13179  fi
13180
13181  fi
13182
13183
13184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13186      # Do we have a bin/java?
13187      if test ! -x "$BOOT_JDK/bin/java"; then
13188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13190        BOOT_JDK_FOUND=no
13191      else
13192        # Do we have a bin/javac?
13193        if test ! -x "$BOOT_JDK/bin/javac"; then
13194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13198          BOOT_JDK_FOUND=no
13199        else
13200          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13201          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13204            BOOT_JDK_FOUND=no
13205          else
13206            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13208
13209            # Extra M4 quote needed to protect [] in grep expression.
13210            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13211            if test "x$FOUND_VERSION_78" = x; then
13212              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13214              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13215$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13216              BOOT_JDK_FOUND=no
13217            else
13218              # We're done! :-)
13219              BOOT_JDK_FOUND=yes
13220
13221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13222
13223  # Input might be given as Windows format, start by converting to
13224  # unix format.
13225  path="$BOOT_JDK"
13226  new_path=`$CYGPATH -u "$path"`
13227
13228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13231  # "foo.exe" is OK but "foo" is an error.
13232  #
13233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13234  # It is also a way to make sure we got the proper file name for the real test later on.
13235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13236  if test "x$test_shortpath" = x; then
13237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13239    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13240  fi
13241
13242  # Call helper function which possibly converts this using DOS-style short mode.
13243  # If so, the updated path is stored in $new_path.
13244
13245  input_path="$new_path"
13246  # Check if we need to convert this using DOS-style short mode. If the path
13247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13248  # take no chances and rewrite it.
13249  # Note: m4 eats our [], so we need to use [ and ] instead.
13250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13251  if test "x$has_forbidden_chars" != x; then
13252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13256      # Going to short mode and back again did indeed matter. Since short mode is
13257      # case insensitive, let's make it lowercase to improve readability.
13258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13259      # Now convert it back to Unix-stile (cygpath)
13260      input_path=`$CYGPATH -u "$shortmode_path"`
13261      new_path="$input_path"
13262    fi
13263  fi
13264
13265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13266  if test "x$test_cygdrive_prefix" = x; then
13267    # As a simple fix, exclude /usr/bin since it's not a real path.
13268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13270      # a path prefixed by /cygdrive for fixpath to work.
13271      new_path="$CYGWIN_ROOT_PATH$input_path"
13272    fi
13273  fi
13274
13275
13276  if test "x$path" != "x$new_path"; then
13277    BOOT_JDK="$new_path"
13278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13280  fi
13281
13282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13283
13284  path="$BOOT_JDK"
13285  has_colon=`$ECHO $path | $GREP ^.:`
13286  new_path="$path"
13287  if test "x$has_colon" = x; then
13288    # Not in mixed or Windows style, start by that.
13289    new_path=`cmd //c echo $path`
13290  fi
13291
13292
13293  input_path="$new_path"
13294  # Check if we need to convert this using DOS-style short mode. If the path
13295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13296  # take no chances and rewrite it.
13297  # Note: m4 eats our [], so we need to use [ and ] instead.
13298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13299  if test "x$has_forbidden_chars" != x; then
13300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13302  fi
13303
13304
13305  windows_path="$new_path"
13306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13307    unix_path=`$CYGPATH -u "$windows_path"`
13308    new_path="$unix_path"
13309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13311    new_path="$unix_path"
13312  fi
13313
13314  if test "x$path" != "x$new_path"; then
13315    BOOT_JDK="$new_path"
13316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13318  fi
13319
13320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13322
13323  else
13324    # We're on a posix platform. Hooray! :)
13325    path="$BOOT_JDK"
13326
13327    if test ! -f "$path" && test ! -d "$path"; then
13328      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13329    fi
13330
13331    has_space=`$ECHO "$path" | $GREP " "`
13332    if test "x$has_space" != x; then
13333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13336    fi
13337  fi
13338
13339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13340$as_echo_n "checking for Boot JDK... " >&6; }
13341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13342$as_echo "$BOOT_JDK" >&6; }
13343              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13344$as_echo_n "checking Boot JDK version... " >&6; }
13345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13347$as_echo "$BOOT_JDK_VERSION" >&6; }
13348            fi # end check jdk version
13349          fi # end check rt.jar
13350        fi # end check javac
13351      fi # end check java
13352    fi # end check boot jdk found
13353  fi
13354
13355
13356  if test "x$BOOT_JDK_FOUND" = xno; then
13357    # Now execute the test
13358
13359  if test "x$ProgramFiles" != x; then
13360    VIRTUAL_DIR="$ProgramFiles/Java"
13361
13362  windows_path="$VIRTUAL_DIR"
13363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13364    unix_path=`$CYGPATH -u "$windows_path"`
13365    VIRTUAL_DIR="$unix_path"
13366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13368    VIRTUAL_DIR="$unix_path"
13369  fi
13370
13371
13372  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13373  BOOT_JDK_SUFFIX=""
13374  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13375  if test "x$ALL_JDKS_FOUND" != x; then
13376    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13377
13378  if test "x$BOOT_JDK_FOUND" = xno; then
13379    # Now execute the test
13380
13381        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13382        if test -d "$BOOT_JDK"; then
13383          BOOT_JDK_FOUND=maybe
13384          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13385$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13386        fi
13387
13388
13389    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13390    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13391      # Do we have a bin/java?
13392      if test ! -x "$BOOT_JDK/bin/java"; then
13393        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13395        BOOT_JDK_FOUND=no
13396      else
13397        # Do we have a bin/javac?
13398        if test ! -x "$BOOT_JDK/bin/javac"; then
13399          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13401          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13402$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13403          BOOT_JDK_FOUND=no
13404        else
13405          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13406          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13407            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13409            BOOT_JDK_FOUND=no
13410          else
13411            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13412            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13413
13414            # Extra M4 quote needed to protect [] in grep expression.
13415            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13416            if test "x$FOUND_VERSION_78" = x; then
13417              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13419              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13420$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13421              BOOT_JDK_FOUND=no
13422            else
13423              # We're done! :-)
13424              BOOT_JDK_FOUND=yes
13425
13426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13427
13428  # Input might be given as Windows format, start by converting to
13429  # unix format.
13430  path="$BOOT_JDK"
13431  new_path=`$CYGPATH -u "$path"`
13432
13433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13436  # "foo.exe" is OK but "foo" is an error.
13437  #
13438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13439  # It is also a way to make sure we got the proper file name for the real test later on.
13440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13441  if test "x$test_shortpath" = x; then
13442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13445  fi
13446
13447  # Call helper function which possibly converts this using DOS-style short mode.
13448  # If so, the updated path is stored in $new_path.
13449
13450  input_path="$new_path"
13451  # Check if we need to convert this using DOS-style short mode. If the path
13452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13453  # take no chances and rewrite it.
13454  # Note: m4 eats our [], so we need to use [ and ] instead.
13455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13456  if test "x$has_forbidden_chars" != x; then
13457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13461      # Going to short mode and back again did indeed matter. Since short mode is
13462      # case insensitive, let's make it lowercase to improve readability.
13463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13464      # Now convert it back to Unix-stile (cygpath)
13465      input_path=`$CYGPATH -u "$shortmode_path"`
13466      new_path="$input_path"
13467    fi
13468  fi
13469
13470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13471  if test "x$test_cygdrive_prefix" = x; then
13472    # As a simple fix, exclude /usr/bin since it's not a real path.
13473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13475      # a path prefixed by /cygdrive for fixpath to work.
13476      new_path="$CYGWIN_ROOT_PATH$input_path"
13477    fi
13478  fi
13479
13480
13481  if test "x$path" != "x$new_path"; then
13482    BOOT_JDK="$new_path"
13483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13485  fi
13486
13487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13488
13489  path="$BOOT_JDK"
13490  has_colon=`$ECHO $path | $GREP ^.:`
13491  new_path="$path"
13492  if test "x$has_colon" = x; then
13493    # Not in mixed or Windows style, start by that.
13494    new_path=`cmd //c echo $path`
13495  fi
13496
13497
13498  input_path="$new_path"
13499  # Check if we need to convert this using DOS-style short mode. If the path
13500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13501  # take no chances and rewrite it.
13502  # Note: m4 eats our [], so we need to use [ and ] instead.
13503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13504  if test "x$has_forbidden_chars" != x; then
13505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13507  fi
13508
13509
13510  windows_path="$new_path"
13511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13512    unix_path=`$CYGPATH -u "$windows_path"`
13513    new_path="$unix_path"
13514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13516    new_path="$unix_path"
13517  fi
13518
13519  if test "x$path" != "x$new_path"; then
13520    BOOT_JDK="$new_path"
13521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13523  fi
13524
13525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13527
13528  else
13529    # We're on a posix platform. Hooray! :)
13530    path="$BOOT_JDK"
13531
13532    if test ! -f "$path" && test ! -d "$path"; then
13533      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13534    fi
13535
13536    has_space=`$ECHO "$path" | $GREP " "`
13537    if test "x$has_space" != x; then
13538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13540      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13541    fi
13542  fi
13543
13544              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13545$as_echo_n "checking for Boot JDK... " >&6; }
13546              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13547$as_echo "$BOOT_JDK" >&6; }
13548              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13549$as_echo_n "checking Boot JDK version... " >&6; }
13550              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13552$as_echo "$BOOT_JDK_VERSION" >&6; }
13553            fi # end check jdk version
13554          fi # end check rt.jar
13555        fi # end check javac
13556      fi # end check java
13557    fi # end check boot jdk found
13558  fi
13559
13560    done
13561  fi
13562
13563  fi
13564
13565
13566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13568      # Do we have a bin/java?
13569      if test ! -x "$BOOT_JDK/bin/java"; then
13570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13572        BOOT_JDK_FOUND=no
13573      else
13574        # Do we have a bin/javac?
13575        if test ! -x "$BOOT_JDK/bin/javac"; then
13576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13580          BOOT_JDK_FOUND=no
13581        else
13582          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13583          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13586            BOOT_JDK_FOUND=no
13587          else
13588            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13589            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13590
13591            # Extra M4 quote needed to protect [] in grep expression.
13592            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13593            if test "x$FOUND_VERSION_78" = x; then
13594              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13596              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13597$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13598              BOOT_JDK_FOUND=no
13599            else
13600              # We're done! :-)
13601              BOOT_JDK_FOUND=yes
13602
13603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13604
13605  # Input might be given as Windows format, start by converting to
13606  # unix format.
13607  path="$BOOT_JDK"
13608  new_path=`$CYGPATH -u "$path"`
13609
13610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13613  # "foo.exe" is OK but "foo" is an error.
13614  #
13615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13616  # It is also a way to make sure we got the proper file name for the real test later on.
13617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13618  if test "x$test_shortpath" = x; then
13619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13622  fi
13623
13624  # Call helper function which possibly converts this using DOS-style short mode.
13625  # If so, the updated path is stored in $new_path.
13626
13627  input_path="$new_path"
13628  # Check if we need to convert this using DOS-style short mode. If the path
13629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13630  # take no chances and rewrite it.
13631  # Note: m4 eats our [], so we need to use [ and ] instead.
13632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13633  if test "x$has_forbidden_chars" != x; then
13634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13638      # Going to short mode and back again did indeed matter. Since short mode is
13639      # case insensitive, let's make it lowercase to improve readability.
13640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13641      # Now convert it back to Unix-stile (cygpath)
13642      input_path=`$CYGPATH -u "$shortmode_path"`
13643      new_path="$input_path"
13644    fi
13645  fi
13646
13647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13648  if test "x$test_cygdrive_prefix" = x; then
13649    # As a simple fix, exclude /usr/bin since it's not a real path.
13650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13652      # a path prefixed by /cygdrive for fixpath to work.
13653      new_path="$CYGWIN_ROOT_PATH$input_path"
13654    fi
13655  fi
13656
13657
13658  if test "x$path" != "x$new_path"; then
13659    BOOT_JDK="$new_path"
13660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13662  fi
13663
13664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13665
13666  path="$BOOT_JDK"
13667  has_colon=`$ECHO $path | $GREP ^.:`
13668  new_path="$path"
13669  if test "x$has_colon" = x; then
13670    # Not in mixed or Windows style, start by that.
13671    new_path=`cmd //c echo $path`
13672  fi
13673
13674
13675  input_path="$new_path"
13676  # Check if we need to convert this using DOS-style short mode. If the path
13677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13678  # take no chances and rewrite it.
13679  # Note: m4 eats our [], so we need to use [ and ] instead.
13680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13681  if test "x$has_forbidden_chars" != x; then
13682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13684  fi
13685
13686
13687  windows_path="$new_path"
13688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13689    unix_path=`$CYGPATH -u "$windows_path"`
13690    new_path="$unix_path"
13691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13693    new_path="$unix_path"
13694  fi
13695
13696  if test "x$path" != "x$new_path"; then
13697    BOOT_JDK="$new_path"
13698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13700  fi
13701
13702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13704
13705  else
13706    # We're on a posix platform. Hooray! :)
13707    path="$BOOT_JDK"
13708
13709    if test ! -f "$path" && test ! -d "$path"; then
13710      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13711    fi
13712
13713    has_space=`$ECHO "$path" | $GREP " "`
13714    if test "x$has_space" != x; then
13715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13717      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13718    fi
13719  fi
13720
13721              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13722$as_echo_n "checking for Boot JDK... " >&6; }
13723              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13724$as_echo "$BOOT_JDK" >&6; }
13725              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13726$as_echo_n "checking Boot JDK version... " >&6; }
13727              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13728              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13729$as_echo "$BOOT_JDK_VERSION" >&6; }
13730            fi # end check jdk version
13731          fi # end check rt.jar
13732        fi # end check javac
13733      fi # end check java
13734    fi # end check boot jdk found
13735  fi
13736
13737
13738  if test "x$BOOT_JDK_FOUND" = xno; then
13739    # Now execute the test
13740
13741  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13742  BOOT_JDK_SUFFIX=""
13743  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13744  if test "x$ALL_JDKS_FOUND" != x; then
13745    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13746
13747  if test "x$BOOT_JDK_FOUND" = xno; then
13748    # Now execute the test
13749
13750        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13751        if test -d "$BOOT_JDK"; then
13752          BOOT_JDK_FOUND=maybe
13753          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13754$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13755        fi
13756
13757
13758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13760      # Do we have a bin/java?
13761      if test ! -x "$BOOT_JDK/bin/java"; then
13762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13764        BOOT_JDK_FOUND=no
13765      else
13766        # Do we have a bin/javac?
13767        if test ! -x "$BOOT_JDK/bin/javac"; then
13768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13772          BOOT_JDK_FOUND=no
13773        else
13774          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13775          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13778            BOOT_JDK_FOUND=no
13779          else
13780            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13782
13783            # Extra M4 quote needed to protect [] in grep expression.
13784            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13785            if test "x$FOUND_VERSION_78" = x; then
13786              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13788              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13789$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13790              BOOT_JDK_FOUND=no
13791            else
13792              # We're done! :-)
13793              BOOT_JDK_FOUND=yes
13794
13795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13796
13797  # Input might be given as Windows format, start by converting to
13798  # unix format.
13799  path="$BOOT_JDK"
13800  new_path=`$CYGPATH -u "$path"`
13801
13802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13805  # "foo.exe" is OK but "foo" is an error.
13806  #
13807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13808  # It is also a way to make sure we got the proper file name for the real test later on.
13809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13810  if test "x$test_shortpath" = x; then
13811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13814  fi
13815
13816  # Call helper function which possibly converts this using DOS-style short mode.
13817  # If so, the updated path is stored in $new_path.
13818
13819  input_path="$new_path"
13820  # Check if we need to convert this using DOS-style short mode. If the path
13821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13822  # take no chances and rewrite it.
13823  # Note: m4 eats our [], so we need to use [ and ] instead.
13824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13825  if test "x$has_forbidden_chars" != x; then
13826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13830      # Going to short mode and back again did indeed matter. Since short mode is
13831      # case insensitive, let's make it lowercase to improve readability.
13832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13833      # Now convert it back to Unix-stile (cygpath)
13834      input_path=`$CYGPATH -u "$shortmode_path"`
13835      new_path="$input_path"
13836    fi
13837  fi
13838
13839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13840  if test "x$test_cygdrive_prefix" = x; then
13841    # As a simple fix, exclude /usr/bin since it's not a real path.
13842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13844      # a path prefixed by /cygdrive for fixpath to work.
13845      new_path="$CYGWIN_ROOT_PATH$input_path"
13846    fi
13847  fi
13848
13849
13850  if test "x$path" != "x$new_path"; then
13851    BOOT_JDK="$new_path"
13852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13854  fi
13855
13856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13857
13858  path="$BOOT_JDK"
13859  has_colon=`$ECHO $path | $GREP ^.:`
13860  new_path="$path"
13861  if test "x$has_colon" = x; then
13862    # Not in mixed or Windows style, start by that.
13863    new_path=`cmd //c echo $path`
13864  fi
13865
13866
13867  input_path="$new_path"
13868  # Check if we need to convert this using DOS-style short mode. If the path
13869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13870  # take no chances and rewrite it.
13871  # Note: m4 eats our [], so we need to use [ and ] instead.
13872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13873  if test "x$has_forbidden_chars" != x; then
13874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13876  fi
13877
13878
13879  windows_path="$new_path"
13880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13881    unix_path=`$CYGPATH -u "$windows_path"`
13882    new_path="$unix_path"
13883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13885    new_path="$unix_path"
13886  fi
13887
13888  if test "x$path" != "x$new_path"; then
13889    BOOT_JDK="$new_path"
13890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13892  fi
13893
13894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13896
13897  else
13898    # We're on a posix platform. Hooray! :)
13899    path="$BOOT_JDK"
13900
13901    if test ! -f "$path" && test ! -d "$path"; then
13902      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13903    fi
13904
13905    has_space=`$ECHO "$path" | $GREP " "`
13906    if test "x$has_space" != x; then
13907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13910    fi
13911  fi
13912
13913              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13914$as_echo_n "checking for Boot JDK... " >&6; }
13915              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13916$as_echo "$BOOT_JDK" >&6; }
13917              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13918$as_echo_n "checking Boot JDK version... " >&6; }
13919              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13920              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13921$as_echo "$BOOT_JDK_VERSION" >&6; }
13922            fi # end check jdk version
13923          fi # end check rt.jar
13924        fi # end check javac
13925      fi # end check java
13926    fi # end check boot jdk found
13927  fi
13928
13929    done
13930  fi
13931
13932
13933    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13934    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13935      # Do we have a bin/java?
13936      if test ! -x "$BOOT_JDK/bin/java"; then
13937        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13939        BOOT_JDK_FOUND=no
13940      else
13941        # Do we have a bin/javac?
13942        if test ! -x "$BOOT_JDK/bin/javac"; then
13943          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13945          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13946$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13947          BOOT_JDK_FOUND=no
13948        else
13949          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13950          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13951            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13953            BOOT_JDK_FOUND=no
13954          else
13955            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13956            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13957
13958            # Extra M4 quote needed to protect [] in grep expression.
13959            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13960            if test "x$FOUND_VERSION_78" = x; then
13961              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13963              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13964$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13965              BOOT_JDK_FOUND=no
13966            else
13967              # We're done! :-)
13968              BOOT_JDK_FOUND=yes
13969
13970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13971
13972  # Input might be given as Windows format, start by converting to
13973  # unix format.
13974  path="$BOOT_JDK"
13975  new_path=`$CYGPATH -u "$path"`
13976
13977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13980  # "foo.exe" is OK but "foo" is an error.
13981  #
13982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13983  # It is also a way to make sure we got the proper file name for the real test later on.
13984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13985  if test "x$test_shortpath" = x; then
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13988    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13989  fi
13990
13991  # Call helper function which possibly converts this using DOS-style short mode.
13992  # If so, the updated path is stored in $new_path.
13993
13994  input_path="$new_path"
13995  # Check if we need to convert this using DOS-style short mode. If the path
13996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13997  # take no chances and rewrite it.
13998  # Note: m4 eats our [], so we need to use [ and ] instead.
13999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14000  if test "x$has_forbidden_chars" != x; then
14001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14005      # Going to short mode and back again did indeed matter. Since short mode is
14006      # case insensitive, let's make it lowercase to improve readability.
14007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14008      # Now convert it back to Unix-stile (cygpath)
14009      input_path=`$CYGPATH -u "$shortmode_path"`
14010      new_path="$input_path"
14011    fi
14012  fi
14013
14014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14015  if test "x$test_cygdrive_prefix" = x; then
14016    # As a simple fix, exclude /usr/bin since it's not a real path.
14017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14019      # a path prefixed by /cygdrive for fixpath to work.
14020      new_path="$CYGWIN_ROOT_PATH$input_path"
14021    fi
14022  fi
14023
14024
14025  if test "x$path" != "x$new_path"; then
14026    BOOT_JDK="$new_path"
14027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14029  fi
14030
14031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14032
14033  path="$BOOT_JDK"
14034  has_colon=`$ECHO $path | $GREP ^.:`
14035  new_path="$path"
14036  if test "x$has_colon" = x; then
14037    # Not in mixed or Windows style, start by that.
14038    new_path=`cmd //c echo $path`
14039  fi
14040
14041
14042  input_path="$new_path"
14043  # Check if we need to convert this using DOS-style short mode. If the path
14044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14045  # take no chances and rewrite it.
14046  # Note: m4 eats our [], so we need to use [ and ] instead.
14047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14048  if test "x$has_forbidden_chars" != x; then
14049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14051  fi
14052
14053
14054  windows_path="$new_path"
14055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14056    unix_path=`$CYGPATH -u "$windows_path"`
14057    new_path="$unix_path"
14058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14060    new_path="$unix_path"
14061  fi
14062
14063  if test "x$path" != "x$new_path"; then
14064    BOOT_JDK="$new_path"
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14067  fi
14068
14069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14071
14072  else
14073    # We're on a posix platform. Hooray! :)
14074    path="$BOOT_JDK"
14075
14076    if test ! -f "$path" && test ! -d "$path"; then
14077      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14078    fi
14079
14080    has_space=`$ECHO "$path" | $GREP " "`
14081    if test "x$has_space" != x; then
14082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14084      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14085    fi
14086  fi
14087
14088              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14089$as_echo_n "checking for Boot JDK... " >&6; }
14090              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14091$as_echo "$BOOT_JDK" >&6; }
14092              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14093$as_echo_n "checking Boot JDK version... " >&6; }
14094              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14096$as_echo "$BOOT_JDK_VERSION" >&6; }
14097            fi # end check jdk version
14098          fi # end check rt.jar
14099        fi # end check javac
14100      fi # end check java
14101    fi # end check boot jdk found
14102  fi
14103
14104  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14105
14106  if test "x$BOOT_JDK_FOUND" = xno; then
14107    # Now execute the test
14108
14109  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14110  BOOT_JDK_SUFFIX="/Contents/Home"
14111  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14112  if test "x$ALL_JDKS_FOUND" != x; then
14113    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14114
14115  if test "x$BOOT_JDK_FOUND" = xno; then
14116    # Now execute the test
14117
14118        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14119        if test -d "$BOOT_JDK"; then
14120          BOOT_JDK_FOUND=maybe
14121          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14122$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14123        fi
14124
14125
14126    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14127    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14128      # Do we have a bin/java?
14129      if test ! -x "$BOOT_JDK/bin/java"; then
14130        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14132        BOOT_JDK_FOUND=no
14133      else
14134        # Do we have a bin/javac?
14135        if test ! -x "$BOOT_JDK/bin/javac"; then
14136          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14138          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14139$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14140          BOOT_JDK_FOUND=no
14141        else
14142          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14143          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14144            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14146            BOOT_JDK_FOUND=no
14147          else
14148            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14149            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14150
14151            # Extra M4 quote needed to protect [] in grep expression.
14152            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14153            if test "x$FOUND_VERSION_78" = x; then
14154              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14156              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14157$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14158              BOOT_JDK_FOUND=no
14159            else
14160              # We're done! :-)
14161              BOOT_JDK_FOUND=yes
14162
14163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14164
14165  # Input might be given as Windows format, start by converting to
14166  # unix format.
14167  path="$BOOT_JDK"
14168  new_path=`$CYGPATH -u "$path"`
14169
14170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14173  # "foo.exe" is OK but "foo" is an error.
14174  #
14175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14176  # It is also a way to make sure we got the proper file name for the real test later on.
14177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14178  if test "x$test_shortpath" = x; then
14179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14181    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14182  fi
14183
14184  # Call helper function which possibly converts this using DOS-style short mode.
14185  # If so, the updated path is stored in $new_path.
14186
14187  input_path="$new_path"
14188  # Check if we need to convert this using DOS-style short mode. If the path
14189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14190  # take no chances and rewrite it.
14191  # Note: m4 eats our [], so we need to use [ and ] instead.
14192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14193  if test "x$has_forbidden_chars" != x; then
14194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14198      # Going to short mode and back again did indeed matter. Since short mode is
14199      # case insensitive, let's make it lowercase to improve readability.
14200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14201      # Now convert it back to Unix-stile (cygpath)
14202      input_path=`$CYGPATH -u "$shortmode_path"`
14203      new_path="$input_path"
14204    fi
14205  fi
14206
14207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14208  if test "x$test_cygdrive_prefix" = x; then
14209    # As a simple fix, exclude /usr/bin since it's not a real path.
14210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14212      # a path prefixed by /cygdrive for fixpath to work.
14213      new_path="$CYGWIN_ROOT_PATH$input_path"
14214    fi
14215  fi
14216
14217
14218  if test "x$path" != "x$new_path"; then
14219    BOOT_JDK="$new_path"
14220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14222  fi
14223
14224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14225
14226  path="$BOOT_JDK"
14227  has_colon=`$ECHO $path | $GREP ^.:`
14228  new_path="$path"
14229  if test "x$has_colon" = x; then
14230    # Not in mixed or Windows style, start by that.
14231    new_path=`cmd //c echo $path`
14232  fi
14233
14234
14235  input_path="$new_path"
14236  # Check if we need to convert this using DOS-style short mode. If the path
14237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14238  # take no chances and rewrite it.
14239  # Note: m4 eats our [], so we need to use [ and ] instead.
14240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14241  if test "x$has_forbidden_chars" != x; then
14242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14244  fi
14245
14246
14247  windows_path="$new_path"
14248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14249    unix_path=`$CYGPATH -u "$windows_path"`
14250    new_path="$unix_path"
14251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14253    new_path="$unix_path"
14254  fi
14255
14256  if test "x$path" != "x$new_path"; then
14257    BOOT_JDK="$new_path"
14258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14260  fi
14261
14262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14264
14265  else
14266    # We're on a posix platform. Hooray! :)
14267    path="$BOOT_JDK"
14268
14269    if test ! -f "$path" && test ! -d "$path"; then
14270      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14271    fi
14272
14273    has_space=`$ECHO "$path" | $GREP " "`
14274    if test "x$has_space" != x; then
14275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14277      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14278    fi
14279  fi
14280
14281              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14282$as_echo_n "checking for Boot JDK... " >&6; }
14283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14284$as_echo "$BOOT_JDK" >&6; }
14285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14286$as_echo_n "checking Boot JDK version... " >&6; }
14287              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14288              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14289$as_echo "$BOOT_JDK_VERSION" >&6; }
14290            fi # end check jdk version
14291          fi # end check rt.jar
14292        fi # end check javac
14293      fi # end check java
14294    fi # end check boot jdk found
14295  fi
14296
14297    done
14298  fi
14299
14300
14301    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14302    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14303      # Do we have a bin/java?
14304      if test ! -x "$BOOT_JDK/bin/java"; then
14305        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14307        BOOT_JDK_FOUND=no
14308      else
14309        # Do we have a bin/javac?
14310        if test ! -x "$BOOT_JDK/bin/javac"; then
14311          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14313          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14314$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14315          BOOT_JDK_FOUND=no
14316        else
14317          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14318          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14319            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14321            BOOT_JDK_FOUND=no
14322          else
14323            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14324            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14325
14326            # Extra M4 quote needed to protect [] in grep expression.
14327            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14328            if test "x$FOUND_VERSION_78" = x; then
14329              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14331              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14332$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14333              BOOT_JDK_FOUND=no
14334            else
14335              # We're done! :-)
14336              BOOT_JDK_FOUND=yes
14337
14338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14339
14340  # Input might be given as Windows format, start by converting to
14341  # unix format.
14342  path="$BOOT_JDK"
14343  new_path=`$CYGPATH -u "$path"`
14344
14345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14348  # "foo.exe" is OK but "foo" is an error.
14349  #
14350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14351  # It is also a way to make sure we got the proper file name for the real test later on.
14352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14353  if test "x$test_shortpath" = x; then
14354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14357  fi
14358
14359  # Call helper function which possibly converts this using DOS-style short mode.
14360  # If so, the updated path is stored in $new_path.
14361
14362  input_path="$new_path"
14363  # Check if we need to convert this using DOS-style short mode. If the path
14364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14365  # take no chances and rewrite it.
14366  # Note: m4 eats our [], so we need to use [ and ] instead.
14367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14368  if test "x$has_forbidden_chars" != x; then
14369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14373      # Going to short mode and back again did indeed matter. Since short mode is
14374      # case insensitive, let's make it lowercase to improve readability.
14375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14376      # Now convert it back to Unix-stile (cygpath)
14377      input_path=`$CYGPATH -u "$shortmode_path"`
14378      new_path="$input_path"
14379    fi
14380  fi
14381
14382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14383  if test "x$test_cygdrive_prefix" = x; then
14384    # As a simple fix, exclude /usr/bin since it's not a real path.
14385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14387      # a path prefixed by /cygdrive for fixpath to work.
14388      new_path="$CYGWIN_ROOT_PATH$input_path"
14389    fi
14390  fi
14391
14392
14393  if test "x$path" != "x$new_path"; then
14394    BOOT_JDK="$new_path"
14395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14397  fi
14398
14399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14400
14401  path="$BOOT_JDK"
14402  has_colon=`$ECHO $path | $GREP ^.:`
14403  new_path="$path"
14404  if test "x$has_colon" = x; then
14405    # Not in mixed or Windows style, start by that.
14406    new_path=`cmd //c echo $path`
14407  fi
14408
14409
14410  input_path="$new_path"
14411  # Check if we need to convert this using DOS-style short mode. If the path
14412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14413  # take no chances and rewrite it.
14414  # Note: m4 eats our [], so we need to use [ and ] instead.
14415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14416  if test "x$has_forbidden_chars" != x; then
14417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14419  fi
14420
14421
14422  windows_path="$new_path"
14423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14424    unix_path=`$CYGPATH -u "$windows_path"`
14425    new_path="$unix_path"
14426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14428    new_path="$unix_path"
14429  fi
14430
14431  if test "x$path" != "x$new_path"; then
14432    BOOT_JDK="$new_path"
14433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14435  fi
14436
14437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14439
14440  else
14441    # We're on a posix platform. Hooray! :)
14442    path="$BOOT_JDK"
14443
14444    if test ! -f "$path" && test ! -d "$path"; then
14445      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14446    fi
14447
14448    has_space=`$ECHO "$path" | $GREP " "`
14449    if test "x$has_space" != x; then
14450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14452      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14453    fi
14454  fi
14455
14456              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14457$as_echo_n "checking for Boot JDK... " >&6; }
14458              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14459$as_echo "$BOOT_JDK" >&6; }
14460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14461$as_echo_n "checking Boot JDK version... " >&6; }
14462              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14463              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14464$as_echo "$BOOT_JDK_VERSION" >&6; }
14465            fi # end check jdk version
14466          fi # end check rt.jar
14467        fi # end check javac
14468      fi # end check java
14469    fi # end check boot jdk found
14470  fi
14471
14472
14473  if test "x$BOOT_JDK_FOUND" = xno; then
14474    # Now execute the test
14475
14476  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14477  BOOT_JDK_SUFFIX="/Contents/Home"
14478  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14479  if test "x$ALL_JDKS_FOUND" != x; then
14480    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14481
14482  if test "x$BOOT_JDK_FOUND" = xno; then
14483    # Now execute the test
14484
14485        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14486        if test -d "$BOOT_JDK"; then
14487          BOOT_JDK_FOUND=maybe
14488          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14489$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14490        fi
14491
14492
14493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14495      # Do we have a bin/java?
14496      if test ! -x "$BOOT_JDK/bin/java"; then
14497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14499        BOOT_JDK_FOUND=no
14500      else
14501        # Do we have a bin/javac?
14502        if test ! -x "$BOOT_JDK/bin/javac"; then
14503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14507          BOOT_JDK_FOUND=no
14508        else
14509          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14510          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14513            BOOT_JDK_FOUND=no
14514          else
14515            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14517
14518            # Extra M4 quote needed to protect [] in grep expression.
14519            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14520            if test "x$FOUND_VERSION_78" = x; then
14521              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14523              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14524$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14525              BOOT_JDK_FOUND=no
14526            else
14527              # We're done! :-)
14528              BOOT_JDK_FOUND=yes
14529
14530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14531
14532  # Input might be given as Windows format, start by converting to
14533  # unix format.
14534  path="$BOOT_JDK"
14535  new_path=`$CYGPATH -u "$path"`
14536
14537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14540  # "foo.exe" is OK but "foo" is an error.
14541  #
14542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14543  # It is also a way to make sure we got the proper file name for the real test later on.
14544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14545  if test "x$test_shortpath" = x; then
14546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14549  fi
14550
14551  # Call helper function which possibly converts this using DOS-style short mode.
14552  # If so, the updated path is stored in $new_path.
14553
14554  input_path="$new_path"
14555  # Check if we need to convert this using DOS-style short mode. If the path
14556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14557  # take no chances and rewrite it.
14558  # Note: m4 eats our [], so we need to use [ and ] instead.
14559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14560  if test "x$has_forbidden_chars" != x; then
14561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14565      # Going to short mode and back again did indeed matter. Since short mode is
14566      # case insensitive, let's make it lowercase to improve readability.
14567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14568      # Now convert it back to Unix-stile (cygpath)
14569      input_path=`$CYGPATH -u "$shortmode_path"`
14570      new_path="$input_path"
14571    fi
14572  fi
14573
14574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14575  if test "x$test_cygdrive_prefix" = x; then
14576    # As a simple fix, exclude /usr/bin since it's not a real path.
14577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14579      # a path prefixed by /cygdrive for fixpath to work.
14580      new_path="$CYGWIN_ROOT_PATH$input_path"
14581    fi
14582  fi
14583
14584
14585  if test "x$path" != "x$new_path"; then
14586    BOOT_JDK="$new_path"
14587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14589  fi
14590
14591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14592
14593  path="$BOOT_JDK"
14594  has_colon=`$ECHO $path | $GREP ^.:`
14595  new_path="$path"
14596  if test "x$has_colon" = x; then
14597    # Not in mixed or Windows style, start by that.
14598    new_path=`cmd //c echo $path`
14599  fi
14600
14601
14602  input_path="$new_path"
14603  # Check if we need to convert this using DOS-style short mode. If the path
14604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14605  # take no chances and rewrite it.
14606  # Note: m4 eats our [], so we need to use [ and ] instead.
14607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14608  if test "x$has_forbidden_chars" != x; then
14609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14611  fi
14612
14613
14614  windows_path="$new_path"
14615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14616    unix_path=`$CYGPATH -u "$windows_path"`
14617    new_path="$unix_path"
14618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14620    new_path="$unix_path"
14621  fi
14622
14623  if test "x$path" != "x$new_path"; then
14624    BOOT_JDK="$new_path"
14625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14627  fi
14628
14629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14631
14632  else
14633    # We're on a posix platform. Hooray! :)
14634    path="$BOOT_JDK"
14635
14636    if test ! -f "$path" && test ! -d "$path"; then
14637      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14638    fi
14639
14640    has_space=`$ECHO "$path" | $GREP " "`
14641    if test "x$has_space" != x; then
14642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14645    fi
14646  fi
14647
14648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14649$as_echo_n "checking for Boot JDK... " >&6; }
14650              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14651$as_echo "$BOOT_JDK" >&6; }
14652              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14653$as_echo_n "checking Boot JDK version... " >&6; }
14654              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14655              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14656$as_echo "$BOOT_JDK_VERSION" >&6; }
14657            fi # end check jdk version
14658          fi # end check rt.jar
14659        fi # end check javac
14660      fi # end check java
14661    fi # end check boot jdk found
14662  fi
14663
14664    done
14665  fi
14666
14667
14668    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14669    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14670      # Do we have a bin/java?
14671      if test ! -x "$BOOT_JDK/bin/java"; then
14672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14674        BOOT_JDK_FOUND=no
14675      else
14676        # Do we have a bin/javac?
14677        if test ! -x "$BOOT_JDK/bin/javac"; then
14678          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14680          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14681$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14682          BOOT_JDK_FOUND=no
14683        else
14684          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14685          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14686            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14688            BOOT_JDK_FOUND=no
14689          else
14690            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14691            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14692
14693            # Extra M4 quote needed to protect [] in grep expression.
14694            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14695            if test "x$FOUND_VERSION_78" = x; then
14696              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14698              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14699$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14700              BOOT_JDK_FOUND=no
14701            else
14702              # We're done! :-)
14703              BOOT_JDK_FOUND=yes
14704
14705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14706
14707  # Input might be given as Windows format, start by converting to
14708  # unix format.
14709  path="$BOOT_JDK"
14710  new_path=`$CYGPATH -u "$path"`
14711
14712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14715  # "foo.exe" is OK but "foo" is an error.
14716  #
14717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14718  # It is also a way to make sure we got the proper file name for the real test later on.
14719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14720  if test "x$test_shortpath" = x; then
14721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14723    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14724  fi
14725
14726  # Call helper function which possibly converts this using DOS-style short mode.
14727  # If so, the updated path is stored in $new_path.
14728
14729  input_path="$new_path"
14730  # Check if we need to convert this using DOS-style short mode. If the path
14731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14732  # take no chances and rewrite it.
14733  # Note: m4 eats our [], so we need to use [ and ] instead.
14734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14735  if test "x$has_forbidden_chars" != x; then
14736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14740      # Going to short mode and back again did indeed matter. Since short mode is
14741      # case insensitive, let's make it lowercase to improve readability.
14742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14743      # Now convert it back to Unix-stile (cygpath)
14744      input_path=`$CYGPATH -u "$shortmode_path"`
14745      new_path="$input_path"
14746    fi
14747  fi
14748
14749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14750  if test "x$test_cygdrive_prefix" = x; then
14751    # As a simple fix, exclude /usr/bin since it's not a real path.
14752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14754      # a path prefixed by /cygdrive for fixpath to work.
14755      new_path="$CYGWIN_ROOT_PATH$input_path"
14756    fi
14757  fi
14758
14759
14760  if test "x$path" != "x$new_path"; then
14761    BOOT_JDK="$new_path"
14762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14763$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14764  fi
14765
14766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14767
14768  path="$BOOT_JDK"
14769  has_colon=`$ECHO $path | $GREP ^.:`
14770  new_path="$path"
14771  if test "x$has_colon" = x; then
14772    # Not in mixed or Windows style, start by that.
14773    new_path=`cmd //c echo $path`
14774  fi
14775
14776
14777  input_path="$new_path"
14778  # Check if we need to convert this using DOS-style short mode. If the path
14779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14780  # take no chances and rewrite it.
14781  # Note: m4 eats our [], so we need to use [ and ] instead.
14782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14783  if test "x$has_forbidden_chars" != x; then
14784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14786  fi
14787
14788
14789  windows_path="$new_path"
14790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14791    unix_path=`$CYGPATH -u "$windows_path"`
14792    new_path="$unix_path"
14793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14795    new_path="$unix_path"
14796  fi
14797
14798  if test "x$path" != "x$new_path"; then
14799    BOOT_JDK="$new_path"
14800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14802  fi
14803
14804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14806
14807  else
14808    # We're on a posix platform. Hooray! :)
14809    path="$BOOT_JDK"
14810
14811    if test ! -f "$path" && test ! -d "$path"; then
14812      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14813    fi
14814
14815    has_space=`$ECHO "$path" | $GREP " "`
14816    if test "x$has_space" != x; then
14817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14819      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14820    fi
14821  fi
14822
14823              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14824$as_echo_n "checking for Boot JDK... " >&6; }
14825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14826$as_echo "$BOOT_JDK" >&6; }
14827              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14828$as_echo_n "checking Boot JDK version... " >&6; }
14829              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14831$as_echo "$BOOT_JDK_VERSION" >&6; }
14832            fi # end check jdk version
14833          fi # end check rt.jar
14834        fi # end check javac
14835      fi # end check java
14836    fi # end check boot jdk found
14837  fi
14838
14839  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14840
14841  if test "x$BOOT_JDK_FOUND" = xno; then
14842    # Now execute the test
14843
14844  BOOT_JDK_PREFIX="/usr/lib/jvm"
14845  BOOT_JDK_SUFFIX=""
14846  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14847  if test "x$ALL_JDKS_FOUND" != x; then
14848    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14849
14850  if test "x$BOOT_JDK_FOUND" = xno; then
14851    # Now execute the test
14852
14853        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14854        if test -d "$BOOT_JDK"; then
14855          BOOT_JDK_FOUND=maybe
14856          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14857$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14858        fi
14859
14860
14861    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14862    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14863      # Do we have a bin/java?
14864      if test ! -x "$BOOT_JDK/bin/java"; then
14865        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14867        BOOT_JDK_FOUND=no
14868      else
14869        # Do we have a bin/javac?
14870        if test ! -x "$BOOT_JDK/bin/javac"; then
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14874$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14875          BOOT_JDK_FOUND=no
14876        else
14877          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14878          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14879            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14881            BOOT_JDK_FOUND=no
14882          else
14883            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14885
14886            # Extra M4 quote needed to protect [] in grep expression.
14887            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14888            if test "x$FOUND_VERSION_78" = x; then
14889              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14891              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14892$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14893              BOOT_JDK_FOUND=no
14894            else
14895              # We're done! :-)
14896              BOOT_JDK_FOUND=yes
14897
14898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14899
14900  # Input might be given as Windows format, start by converting to
14901  # unix format.
14902  path="$BOOT_JDK"
14903  new_path=`$CYGPATH -u "$path"`
14904
14905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14908  # "foo.exe" is OK but "foo" is an error.
14909  #
14910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14911  # It is also a way to make sure we got the proper file name for the real test later on.
14912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14913  if test "x$test_shortpath" = x; then
14914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14917  fi
14918
14919  # Call helper function which possibly converts this using DOS-style short mode.
14920  # If so, the updated path is stored in $new_path.
14921
14922  input_path="$new_path"
14923  # Check if we need to convert this using DOS-style short mode. If the path
14924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14925  # take no chances and rewrite it.
14926  # Note: m4 eats our [], so we need to use [ and ] instead.
14927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14928  if test "x$has_forbidden_chars" != x; then
14929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14933      # Going to short mode and back again did indeed matter. Since short mode is
14934      # case insensitive, let's make it lowercase to improve readability.
14935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14936      # Now convert it back to Unix-stile (cygpath)
14937      input_path=`$CYGPATH -u "$shortmode_path"`
14938      new_path="$input_path"
14939    fi
14940  fi
14941
14942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14943  if test "x$test_cygdrive_prefix" = x; then
14944    # As a simple fix, exclude /usr/bin since it's not a real path.
14945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14947      # a path prefixed by /cygdrive for fixpath to work.
14948      new_path="$CYGWIN_ROOT_PATH$input_path"
14949    fi
14950  fi
14951
14952
14953  if test "x$path" != "x$new_path"; then
14954    BOOT_JDK="$new_path"
14955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14957  fi
14958
14959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14960
14961  path="$BOOT_JDK"
14962  has_colon=`$ECHO $path | $GREP ^.:`
14963  new_path="$path"
14964  if test "x$has_colon" = x; then
14965    # Not in mixed or Windows style, start by that.
14966    new_path=`cmd //c echo $path`
14967  fi
14968
14969
14970  input_path="$new_path"
14971  # Check if we need to convert this using DOS-style short mode. If the path
14972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14973  # take no chances and rewrite it.
14974  # Note: m4 eats our [], so we need to use [ and ] instead.
14975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14976  if test "x$has_forbidden_chars" != x; then
14977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14979  fi
14980
14981
14982  windows_path="$new_path"
14983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14984    unix_path=`$CYGPATH -u "$windows_path"`
14985    new_path="$unix_path"
14986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14988    new_path="$unix_path"
14989  fi
14990
14991  if test "x$path" != "x$new_path"; then
14992    BOOT_JDK="$new_path"
14993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14995  fi
14996
14997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14999
15000  else
15001    # We're on a posix platform. Hooray! :)
15002    path="$BOOT_JDK"
15003
15004    if test ! -f "$path" && test ! -d "$path"; then
15005      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15006    fi
15007
15008    has_space=`$ECHO "$path" | $GREP " "`
15009    if test "x$has_space" != x; then
15010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15012      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15013    fi
15014  fi
15015
15016              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15017$as_echo_n "checking for Boot JDK... " >&6; }
15018              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15019$as_echo "$BOOT_JDK" >&6; }
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15021$as_echo_n "checking Boot JDK version... " >&6; }
15022              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15024$as_echo "$BOOT_JDK_VERSION" >&6; }
15025            fi # end check jdk version
15026          fi # end check rt.jar
15027        fi # end check javac
15028      fi # end check java
15029    fi # end check boot jdk found
15030  fi
15031
15032    done
15033  fi
15034
15035
15036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15038      # Do we have a bin/java?
15039      if test ! -x "$BOOT_JDK/bin/java"; then
15040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15042        BOOT_JDK_FOUND=no
15043      else
15044        # Do we have a bin/javac?
15045        if test ! -x "$BOOT_JDK/bin/javac"; then
15046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15050          BOOT_JDK_FOUND=no
15051        else
15052          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15053          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15056            BOOT_JDK_FOUND=no
15057          else
15058            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15060
15061            # Extra M4 quote needed to protect [] in grep expression.
15062            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15063            if test "x$FOUND_VERSION_78" = x; then
15064              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15066              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15067$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15068              BOOT_JDK_FOUND=no
15069            else
15070              # We're done! :-)
15071              BOOT_JDK_FOUND=yes
15072
15073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15074
15075  # Input might be given as Windows format, start by converting to
15076  # unix format.
15077  path="$BOOT_JDK"
15078  new_path=`$CYGPATH -u "$path"`
15079
15080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15083  # "foo.exe" is OK but "foo" is an error.
15084  #
15085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15086  # It is also a way to make sure we got the proper file name for the real test later on.
15087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15088  if test "x$test_shortpath" = x; then
15089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15092  fi
15093
15094  # Call helper function which possibly converts this using DOS-style short mode.
15095  # If so, the updated path is stored in $new_path.
15096
15097  input_path="$new_path"
15098  # Check if we need to convert this using DOS-style short mode. If the path
15099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15100  # take no chances and rewrite it.
15101  # Note: m4 eats our [], so we need to use [ and ] instead.
15102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15103  if test "x$has_forbidden_chars" != x; then
15104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15108      # Going to short mode and back again did indeed matter. Since short mode is
15109      # case insensitive, let's make it lowercase to improve readability.
15110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15111      # Now convert it back to Unix-stile (cygpath)
15112      input_path=`$CYGPATH -u "$shortmode_path"`
15113      new_path="$input_path"
15114    fi
15115  fi
15116
15117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15118  if test "x$test_cygdrive_prefix" = x; then
15119    # As a simple fix, exclude /usr/bin since it's not a real path.
15120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15122      # a path prefixed by /cygdrive for fixpath to work.
15123      new_path="$CYGWIN_ROOT_PATH$input_path"
15124    fi
15125  fi
15126
15127
15128  if test "x$path" != "x$new_path"; then
15129    BOOT_JDK="$new_path"
15130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15132  fi
15133
15134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15135
15136  path="$BOOT_JDK"
15137  has_colon=`$ECHO $path | $GREP ^.:`
15138  new_path="$path"
15139  if test "x$has_colon" = x; then
15140    # Not in mixed or Windows style, start by that.
15141    new_path=`cmd //c echo $path`
15142  fi
15143
15144
15145  input_path="$new_path"
15146  # Check if we need to convert this using DOS-style short mode. If the path
15147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15148  # take no chances and rewrite it.
15149  # Note: m4 eats our [], so we need to use [ and ] instead.
15150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15151  if test "x$has_forbidden_chars" != x; then
15152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15154  fi
15155
15156
15157  windows_path="$new_path"
15158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15159    unix_path=`$CYGPATH -u "$windows_path"`
15160    new_path="$unix_path"
15161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15163    new_path="$unix_path"
15164  fi
15165
15166  if test "x$path" != "x$new_path"; then
15167    BOOT_JDK="$new_path"
15168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15170  fi
15171
15172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15174
15175  else
15176    # We're on a posix platform. Hooray! :)
15177    path="$BOOT_JDK"
15178
15179    if test ! -f "$path" && test ! -d "$path"; then
15180      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15181    fi
15182
15183    has_space=`$ECHO "$path" | $GREP " "`
15184    if test "x$has_space" != x; then
15185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15186$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15187      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15188    fi
15189  fi
15190
15191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15192$as_echo_n "checking for Boot JDK... " >&6; }
15193              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15194$as_echo "$BOOT_JDK" >&6; }
15195              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15196$as_echo_n "checking Boot JDK version... " >&6; }
15197              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15199$as_echo "$BOOT_JDK_VERSION" >&6; }
15200            fi # end check jdk version
15201          fi # end check rt.jar
15202        fi # end check javac
15203      fi # end check java
15204    fi # end check boot jdk found
15205  fi
15206
15207  fi
15208
15209
15210    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15211    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15212      # Do we have a bin/java?
15213      if test ! -x "$BOOT_JDK/bin/java"; then
15214        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15216        BOOT_JDK_FOUND=no
15217      else
15218        # Do we have a bin/javac?
15219        if test ! -x "$BOOT_JDK/bin/javac"; then
15220          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15222          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15223$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15224          BOOT_JDK_FOUND=no
15225        else
15226          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15227          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15228            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15230            BOOT_JDK_FOUND=no
15231          else
15232            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15233            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15234
15235            # Extra M4 quote needed to protect [] in grep expression.
15236            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15237            if test "x$FOUND_VERSION_78" = x; then
15238              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15240              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15241$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15242              BOOT_JDK_FOUND=no
15243            else
15244              # We're done! :-)
15245              BOOT_JDK_FOUND=yes
15246
15247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15248
15249  # Input might be given as Windows format, start by converting to
15250  # unix format.
15251  path="$BOOT_JDK"
15252  new_path=`$CYGPATH -u "$path"`
15253
15254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15257  # "foo.exe" is OK but "foo" is an error.
15258  #
15259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15260  # It is also a way to make sure we got the proper file name for the real test later on.
15261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15262  if test "x$test_shortpath" = x; then
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15265    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15266  fi
15267
15268  # Call helper function which possibly converts this using DOS-style short mode.
15269  # If so, the updated path is stored in $new_path.
15270
15271  input_path="$new_path"
15272  # Check if we need to convert this using DOS-style short mode. If the path
15273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15274  # take no chances and rewrite it.
15275  # Note: m4 eats our [], so we need to use [ and ] instead.
15276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15277  if test "x$has_forbidden_chars" != x; then
15278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15282      # Going to short mode and back again did indeed matter. Since short mode is
15283      # case insensitive, let's make it lowercase to improve readability.
15284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15285      # Now convert it back to Unix-stile (cygpath)
15286      input_path=`$CYGPATH -u "$shortmode_path"`
15287      new_path="$input_path"
15288    fi
15289  fi
15290
15291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15292  if test "x$test_cygdrive_prefix" = x; then
15293    # As a simple fix, exclude /usr/bin since it's not a real path.
15294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15296      # a path prefixed by /cygdrive for fixpath to work.
15297      new_path="$CYGWIN_ROOT_PATH$input_path"
15298    fi
15299  fi
15300
15301
15302  if test "x$path" != "x$new_path"; then
15303    BOOT_JDK="$new_path"
15304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15306  fi
15307
15308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15309
15310  path="$BOOT_JDK"
15311  has_colon=`$ECHO $path | $GREP ^.:`
15312  new_path="$path"
15313  if test "x$has_colon" = x; then
15314    # Not in mixed or Windows style, start by that.
15315    new_path=`cmd //c echo $path`
15316  fi
15317
15318
15319  input_path="$new_path"
15320  # Check if we need to convert this using DOS-style short mode. If the path
15321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15322  # take no chances and rewrite it.
15323  # Note: m4 eats our [], so we need to use [ and ] instead.
15324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15325  if test "x$has_forbidden_chars" != x; then
15326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15328  fi
15329
15330
15331  windows_path="$new_path"
15332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15333    unix_path=`$CYGPATH -u "$windows_path"`
15334    new_path="$unix_path"
15335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15337    new_path="$unix_path"
15338  fi
15339
15340  if test "x$path" != "x$new_path"; then
15341    BOOT_JDK="$new_path"
15342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15344  fi
15345
15346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15348
15349  else
15350    # We're on a posix platform. Hooray! :)
15351    path="$BOOT_JDK"
15352
15353    if test ! -f "$path" && test ! -d "$path"; then
15354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15355    fi
15356
15357    has_space=`$ECHO "$path" | $GREP " "`
15358    if test "x$has_space" != x; then
15359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15362    fi
15363  fi
15364
15365              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15366$as_echo_n "checking for Boot JDK... " >&6; }
15367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15368$as_echo "$BOOT_JDK" >&6; }
15369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15370$as_echo_n "checking Boot JDK version... " >&6; }
15371              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15373$as_echo "$BOOT_JDK_VERSION" >&6; }
15374            fi # end check jdk version
15375          fi # end check rt.jar
15376        fi # end check javac
15377      fi # end check java
15378    fi # end check boot jdk found
15379  fi
15380
15381
15382# If we haven't found anything yet, we've truly lost. Give up.
15383if test "x$BOOT_JDK_FOUND" = xno; then
15384
15385    # Print a helpful message on how to acquire the necessary build dependency.
15386    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15387    MISSING_DEPENDENCY=openjdk
15388    PKGHANDLER_COMMAND=
15389
15390    case $PKGHANDLER in
15391	apt-get)
15392                apt_help     $MISSING_DEPENDENCY ;;
15393    yum)
15394                yum_help     $MISSING_DEPENDENCY ;;
15395	port)
15396                port_help    $MISSING_DEPENDENCY ;;
15397	pkgutil)
15398                pkgutil_help $MISSING_DEPENDENCY ;;
15399	pkgadd)
15400                pkgadd_help  $MISSING_DEPENDENCY ;;
15401    * )
15402      break ;;
15403    esac
15404
15405    if test "x$PKGHANDLER_COMMAND" != x; then
15406        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15407    fi
15408
15409  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15410$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15411  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15412$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15413  as_fn_error $? "Cannot continue" "$LINENO" 5
15414fi
15415
15416# Setup proper paths for what we found
15417BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15418if test ! -f "$BOOT_RTJAR"; then
15419    # On MacOSX it is called classes.jar
15420    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15421    if test -f "$BOOT_RTJAR"; then
15422      # Remove the ..
15423      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15424    fi
15425fi
15426BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15427BOOT_JDK="$BOOT_JDK"
15428
15429
15430
15431
15432# Setup tools from the Boot JDK.
15433
15434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15435$as_echo_n "checking for java in Boot JDK... " >&6; }
15436  JAVA=$BOOT_JDK/bin/java
15437  if test ! -x $JAVA; then
15438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15439$as_echo "not found" >&6; }
15440      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15441$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15442      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15443  fi
15444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15445$as_echo "ok" >&6; }
15446
15447
15448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15449$as_echo_n "checking for javac in Boot JDK... " >&6; }
15450  JAVAC=$BOOT_JDK/bin/javac
15451  if test ! -x $JAVAC; then
15452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15453$as_echo "not found" >&6; }
15454      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15455$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15456      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15457  fi
15458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15459$as_echo "ok" >&6; }
15460
15461
15462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15463$as_echo_n "checking for javah in Boot JDK... " >&6; }
15464  JAVAH=$BOOT_JDK/bin/javah
15465  if test ! -x $JAVAH; then
15466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15467$as_echo "not found" >&6; }
15468      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15469$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15470      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15471  fi
15472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15473$as_echo "ok" >&6; }
15474
15475
15476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15477$as_echo_n "checking for javap in Boot JDK... " >&6; }
15478  JAVAP=$BOOT_JDK/bin/javap
15479  if test ! -x $JAVAP; then
15480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15481$as_echo "not found" >&6; }
15482      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15483$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15484      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15485  fi
15486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15487$as_echo "ok" >&6; }
15488
15489
15490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15491$as_echo_n "checking for jar in Boot JDK... " >&6; }
15492  JAR=$BOOT_JDK/bin/jar
15493  if test ! -x $JAR; then
15494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15495$as_echo "not found" >&6; }
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15497$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15498      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15499  fi
15500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15501$as_echo "ok" >&6; }
15502
15503
15504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15505$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15506  RMIC=$BOOT_JDK/bin/rmic
15507  if test ! -x $RMIC; then
15508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15509$as_echo "not found" >&6; }
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15511$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15512      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15513  fi
15514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15515$as_echo "ok" >&6; }
15516
15517
15518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15519$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15520  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15521  if test ! -x $NATIVE2ASCII; then
15522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15523$as_echo "not found" >&6; }
15524      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15525$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15526      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15527  fi
15528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15529$as_echo "ok" >&6; }
15530
15531
15532# Finally, set some other options...
15533
15534# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15535BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15536
15537
15538
15539
15540##############################################################################
15541#
15542# Specify options for anything that is run with the Boot JDK.
15543#
15544
15545# Check whether --with-boot-jdk-jvmargs was given.
15546if test "${with_boot_jdk_jvmargs+set}" = set; then :
15547  withval=$with_boot_jdk_jvmargs;
15548fi
15549
15550
15551if test "x$with_boot_jdk_jvmargs" = x; then
15552    # Not all JVM:s accept the same arguments on the command line.
15553    # OpenJDK specific increase in thread stack for JDK build,
15554    # well more specifically, when running javac.
15555    if test "x$BUILD_NUM_BITS" = x32; then
15556       STACK_SIZE=768
15557    else
15558       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15559       # since 64-bit pointers are pushed on the stach. Apparently, we need
15560       # to increase the stack space when javacing the JDK....
15561       STACK_SIZE=1536
15562    fi
15563
15564    # Minimum amount of heap memory.
15565
15566    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15567    # If so, then append -Xms64M to boot_jdk_jvmargs
15568    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15569    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15570    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15571        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15572    fi
15573
15574    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15575        # Why does macosx need more heap? Its the huge JDK batch.
15576
15577    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15578    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15579    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15580    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15581    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15582        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15583    fi
15584
15585    else
15586
15587    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15588    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15589    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15590    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15591    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15592        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15593    fi
15594
15595    fi
15596    # When is adding -client something that speeds up the JVM?
15597    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15598
15599    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15600    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15601    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15602    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15603    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15604        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15605    fi
15606
15607
15608    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15609    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15610    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15611    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15612    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15613        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15614    fi
15615
15616
15617    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15618    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15619    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15620    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15621    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15622        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15623    fi
15624
15625    # Disable special log output when a debug build is used as Boot JDK...
15626
15627    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15628    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15629    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15630    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15631    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15632        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15633    fi
15634
15635fi
15636
15637BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15638
15639
15640
15641###############################################################################
15642#
15643# Configure the sources to use. We can add or override individual directories.
15644#
15645###############################################################################
15646
15647
15648
15649# Where are the sources. Any of these can be overridden
15650# using --with-override-corba and the likes.
15651LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15652CORBA_TOPDIR="$SRC_ROOT/corba"
15653JAXP_TOPDIR="$SRC_ROOT/jaxp"
15654JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15655HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15656JDK_TOPDIR="$SRC_ROOT/jdk"
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666###############################################################################
15667#
15668# Pickup additional source for a component from outside of the source root
15669# or override source for a component.
15670#
15671
15672# Check whether --with-add-source-root was given.
15673if test "${with_add_source_root+set}" = set; then :
15674  withval=$with_add_source_root;
15675fi
15676
15677
15678
15679# Check whether --with-override-source-root was given.
15680if test "${with_override_source_root+set}" = set; then :
15681  withval=$with_override_source_root;
15682fi
15683
15684
15685
15686# Check whether --with-adds-and-overrides was given.
15687if test "${with_adds_and_overrides+set}" = set; then :
15688  withval=$with_adds_and_overrides;
15689fi
15690
15691
15692if test "x$with_adds_and_overrides" != x; then
15693    with_add_source_root="$with_adds_and_overrides/adds"
15694    with_override_source_root="$with_adds_and_overrides/overrides"
15695fi
15696
15697if test "x$with_add_source_root" != x; then
15698    if ! test -d $with_add_source_root; then
15699       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15700    fi
15701    CURDIR="$PWD"
15702    cd "$with_add_source_root"
15703    ADD_SRC_ROOT="`pwd`"
15704    cd "$CURDIR"
15705    # Verify that the addon source root does not have any root makefiles.
15706    # If it does, then it is usually an error, prevent this.
15707    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15708       test -f $with_add_source_root/langtools/make/Makefile; then
15709        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
15710    fi
15711    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15712       test -f $with_add_source_root/corba/make/Makefile; then
15713        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
15714    fi
15715    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15716       test -f $with_add_source_root/jaxp/make/Makefile; then
15717        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
15718    fi
15719    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15720       test -f $with_add_source_root/jaxws/make/Makefile; then
15721        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
15722    fi
15723    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15724       test -f $with_add_source_root/hotspot/make/Makefile; then
15725        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
15726    fi
15727    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15728       test -f $with_add_source_root/jdk/make/Makefile; then
15729        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
15730    fi
15731fi
15732
15733
15734if test "x$with_override_source_root" != x; then
15735    if ! test -d $with_override_source_root; then
15736       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15737    fi
15738    CURDIR="$PWD"
15739    cd "$with_override_source_root"
15740    OVERRIDE_SRC_ROOT="`pwd`"
15741    cd "$CURDIR"
15742    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15743       test -f $with_override_source_root/langtools/make/Makefile; then
15744        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
15745    fi
15746    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15747       test -f $with_override_source_root/corba/make/Makefile; then
15748        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
15749    fi
15750    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15751       test -f $with_override_source_root/jaxp/make/Makefile; then
15752        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
15753    fi
15754    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15755       test -f $with_override_source_root/jaxws/make/Makefile; then
15756        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
15757    fi
15758    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15759       test -f $with_override_source_root/hotspot/make/Makefile; then
15760        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
15761    fi
15762    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15763       test -f $with_override_source_root/jdk/make/Makefile; then
15764        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
15765    fi
15766fi
15767
15768
15769###############################################################################
15770#
15771# Override a repo completely, this is used for example when you have 3 small
15772# development sandboxes of the langtools sources and want to avoid having 3 full
15773# OpenJDK sources checked out on disk.
15774#
15775# Assuming that the 3 langtools sandboxes are located here:
15776# /home/fredrik/sandbox1/langtools
15777# /home/fredrik/sandbox2/langtools
15778# /home/fredrik/sandbox3/langtools
15779#
15780# From the source root you create build subdirs manually:
15781#     mkdir -p build1 build2 build3
15782# in each build directory run:
15783#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15784#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15785#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15786#
15787
15788
15789# Check whether --with-override-langtools was given.
15790if test "${with_override_langtools+set}" = set; then :
15791  withval=$with_override_langtools;
15792fi
15793
15794
15795
15796# Check whether --with-override-corba was given.
15797if test "${with_override_corba+set}" = set; then :
15798  withval=$with_override_corba;
15799fi
15800
15801
15802
15803# Check whether --with-override-jaxp was given.
15804if test "${with_override_jaxp+set}" = set; then :
15805  withval=$with_override_jaxp;
15806fi
15807
15808
15809
15810# Check whether --with-override-jaxws was given.
15811if test "${with_override_jaxws+set}" = set; then :
15812  withval=$with_override_jaxws;
15813fi
15814
15815
15816
15817# Check whether --with-override-hotspot was given.
15818if test "${with_override_hotspot+set}" = set; then :
15819  withval=$with_override_hotspot;
15820fi
15821
15822
15823
15824# Check whether --with-override-jdk was given.
15825if test "${with_override_jdk+set}" = set; then :
15826  withval=$with_override_jdk;
15827fi
15828
15829
15830if test "x$with_override_langtools" != x; then
15831    CURDIR="$PWD"
15832    cd "$with_override_langtools"
15833    LANGTOOLS_TOPDIR="`pwd`"
15834    cd "$CURDIR"
15835    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15836        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15837    fi
15838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15839$as_echo_n "checking if langtools should be overridden... " >&6; }
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15841$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15842fi
15843if test "x$with_override_corba" != x; then
15844    CURDIR="$PWD"
15845    cd "$with_override_corba"
15846    CORBA_TOPDIR="`pwd`"
15847    cd "$CURDIR"
15848    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15849        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15850    fi
15851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15852$as_echo_n "checking if corba should be overridden... " >&6; }
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15854$as_echo "yes with $CORBA_TOPDIR" >&6; }
15855fi
15856if test "x$with_override_jaxp" != x; then
15857    CURDIR="$PWD"
15858    cd "$with_override_jaxp"
15859    JAXP_TOPDIR="`pwd`"
15860    cd "$CURDIR"
15861    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15862        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15863    fi
15864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15865$as_echo_n "checking if jaxp should be overridden... " >&6; }
15866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15867$as_echo "yes with $JAXP_TOPDIR" >&6; }
15868fi
15869if test "x$with_override_jaxws" != x; then
15870    CURDIR="$PWD"
15871    cd "$with_override_jaxws"
15872    JAXWS_TOPDIR="`pwd`"
15873    cd "$CURDIR"
15874    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15875        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15876    fi
15877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15878$as_echo_n "checking if jaxws should be overridden... " >&6; }
15879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15880$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15881fi
15882if test "x$with_override_hotspot" != x; then
15883    CURDIR="$PWD"
15884    cd "$with_override_hotspot"
15885    HOTSPOT_TOPDIR="`pwd`"
15886    cd "$CURDIR"
15887    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15888       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15889        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15890    fi
15891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15892$as_echo_n "checking if hotspot should be overridden... " >&6; }
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15894$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15895fi
15896if test "x$with_override_jdk" != x; then
15897    CURDIR="$PWD"
15898    cd "$with_override_jdk"
15899    JDK_TOPDIR="`pwd`"
15900    cd "$CURDIR"
15901    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15902        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15903    fi
15904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15905$as_echo_n "checking if JDK should be overridden... " >&6; }
15906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15907$as_echo "yes with $JDK_TOPDIR" >&6; }
15908fi
15909
15910
15911
15912BUILD_OUTPUT="$OUTPUT_ROOT"
15913
15914
15915HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15916BUILD_HOTSPOT=true
15917
15918
15919
15920# Check whether --with-import-hotspot was given.
15921if test "${with_import_hotspot+set}" = set; then :
15922  withval=$with_import_hotspot;
15923fi
15924
15925if test "x$with_import_hotspot" != x; then
15926    CURDIR="$PWD"
15927    cd "$with_import_hotspot"
15928    HOTSPOT_DIST="`pwd`"
15929    cd "$CURDIR"
15930    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15931        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15932    fi
15933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15934$as_echo_n "checking if hotspot should be imported... " >&6; }
15935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15936$as_echo "yes from $HOTSPOT_DIST" >&6; }
15937    BUILD_HOTSPOT=false
15938fi
15939
15940JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15941
15942
15943###############################################################################
15944#
15945# Setup the toolchain (compilers etc), i.e. the tools that need to be
15946# cross-compilation aware.
15947#
15948###############################################################################
15949
15950
15951###############################################################################
15952#
15953# Configure the development tool paths and potential sysroot.
15954#
15955ac_ext=cpp
15956ac_cpp='$CXXCPP $CPPFLAGS'
15957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15960
15961
15962# The option used to specify the target .o,.a or .so file.
15963# When compiling, how to specify the to be created object file.
15964CC_OUT_OPTION='-o$(SPACE)'
15965# When linking, how to specify the to be created executable.
15966EXE_OUT_OPTION='-o$(SPACE)'
15967# When linking, how to specify the to be created dynamically linkable library.
15968LD_OUT_OPTION='-o$(SPACE)'
15969# When archiving, how to specify the to be create static archive for object files.
15970AR_OUT_OPTION='rcs$(SPACE)'
15971
15972
15973
15974
15975
15976# Locate the actual tools
15977
15978if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15979
15980  # Store path to cygwin link.exe to help excluding it when searching for
15981  # VS linker. This must be done before changing the PATH when looking for VS.
15982  # Extract the first word of "link", so it can be a program name with args.
15983set dummy link; ac_word=$2
15984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15985$as_echo_n "checking for $ac_word... " >&6; }
15986if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15987  $as_echo_n "(cached) " >&6
15988else
15989  case $CYGWIN_LINK in
15990  [\\/]* | ?:[\\/]*)
15991  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15992  ;;
15993  *)
15994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15995for as_dir in $PATH
15996do
15997  IFS=$as_save_IFS
15998  test -z "$as_dir" && as_dir=.
15999    for ac_exec_ext in '' $ac_executable_extensions; do
16000  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16001    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16003    break 2
16004  fi
16005done
16006  done
16007IFS=$as_save_IFS
16008
16009  ;;
16010esac
16011fi
16012CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16013if test -n "$CYGWIN_LINK"; then
16014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16015$as_echo "$CYGWIN_LINK" >&6; }
16016else
16017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16018$as_echo "no" >&6; }
16019fi
16020
16021
16022  if test "x$CYGWIN_LINK" != x; then
16023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16024$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16025    "$CYGWIN_LINK" --version > /dev/null
16026    if test $? -eq 0 ; then
16027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16028$as_echo "yes" >&6; }
16029    else
16030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16031$as_echo "no" >&6; }
16032      # This might be the VS linker. Don't exclude it later on.
16033      CYGWIN_LINK=""
16034    fi
16035  fi
16036
16037  # First-hand choice is to locate and run the vsvars bat file.
16038
16039  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16040    VCVARSFILE="vc/bin/vcvars32.bat"
16041  else
16042    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16043  fi
16044
16045  VS_ENV_CMD=""
16046  VS_ENV_ARGS=""
16047  if test "x$with_toolsdir" != x; then
16048
16049  if test "x$VS_ENV_CMD" = x; then
16050    VS100BASE="$with_toolsdir/../.."
16051    METHOD="--with-tools-dir"
16052
16053  windows_path="$VS100BASE"
16054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16055    unix_path=`$CYGPATH -u "$windows_path"`
16056    VS100BASE="$unix_path"
16057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16059    VS100BASE="$unix_path"
16060  fi
16061
16062    if test -d "$VS100BASE"; then
16063      if test -f "$VS100BASE/$VCVARSFILE"; then
16064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16065$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16066        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16067      else
16068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16069$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16071$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16072      fi
16073    fi
16074  fi
16075
16076  fi
16077
16078  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16079    # Having specified an argument which is incorrect will produce an instant failure;
16080    # we should not go on looking
16081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16082$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16083    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16084$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16085    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16086  fi
16087
16088  if test "x$ProgramW6432" != x; then
16089
16090  if test "x$VS_ENV_CMD" = x; then
16091    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16092    METHOD="well-known name"
16093
16094  windows_path="$WIN_SDK_BASE"
16095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16096    unix_path=`$CYGPATH -u "$windows_path"`
16097    WIN_SDK_BASE="$unix_path"
16098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16100    WIN_SDK_BASE="$unix_path"
16101  fi
16102
16103    if test -d "$WIN_SDK_BASE"; then
16104      # There have been cases of partial or broken SDK installations. A missing
16105      # lib dir is not going to work.
16106      if test ! -d "$WIN_SDK_BASE/../lib"; then
16107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16108$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16109        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16110$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16111      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16113$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16114        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16115        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16116          VS_ENV_ARGS="/x86"
16117        else
16118          VS_ENV_ARGS="/x64"
16119        fi
16120      else
16121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16122$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16123        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16124$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16125      fi
16126    fi
16127  fi
16128
16129  fi
16130  if test "x$PROGRAMW6432" != x; then
16131
16132  if test "x$VS_ENV_CMD" = x; then
16133    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16134    METHOD="well-known name"
16135
16136  windows_path="$WIN_SDK_BASE"
16137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16138    unix_path=`$CYGPATH -u "$windows_path"`
16139    WIN_SDK_BASE="$unix_path"
16140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16142    WIN_SDK_BASE="$unix_path"
16143  fi
16144
16145    if test -d "$WIN_SDK_BASE"; then
16146      # There have been cases of partial or broken SDK installations. A missing
16147      # lib dir is not going to work.
16148      if test ! -d "$WIN_SDK_BASE/../lib"; then
16149        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16150$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16151        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16152$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16153      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16155$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16156        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16157        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16158          VS_ENV_ARGS="/x86"
16159        else
16160          VS_ENV_ARGS="/x64"
16161        fi
16162      else
16163        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16164$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16165        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16166$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16167      fi
16168    fi
16169  fi
16170
16171  fi
16172  if test "x$PROGRAMFILES" != x; then
16173
16174  if test "x$VS_ENV_CMD" = x; then
16175    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16176    METHOD="well-known name"
16177
16178  windows_path="$WIN_SDK_BASE"
16179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16180    unix_path=`$CYGPATH -u "$windows_path"`
16181    WIN_SDK_BASE="$unix_path"
16182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16184    WIN_SDK_BASE="$unix_path"
16185  fi
16186
16187    if test -d "$WIN_SDK_BASE"; then
16188      # There have been cases of partial or broken SDK installations. A missing
16189      # lib dir is not going to work.
16190      if test ! -d "$WIN_SDK_BASE/../lib"; then
16191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16192$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16193        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16194$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16195      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16196        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16197$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16198        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16199        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16200          VS_ENV_ARGS="/x86"
16201        else
16202          VS_ENV_ARGS="/x64"
16203        fi
16204      else
16205        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16206$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16207        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16208$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16209      fi
16210    fi
16211  fi
16212
16213  fi
16214
16215  if test "x$VS_ENV_CMD" = x; then
16216    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16217    METHOD="well-known name"
16218
16219  windows_path="$WIN_SDK_BASE"
16220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16221    unix_path=`$CYGPATH -u "$windows_path"`
16222    WIN_SDK_BASE="$unix_path"
16223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16225    WIN_SDK_BASE="$unix_path"
16226  fi
16227
16228    if test -d "$WIN_SDK_BASE"; then
16229      # There have been cases of partial or broken SDK installations. A missing
16230      # lib dir is not going to work.
16231      if test ! -d "$WIN_SDK_BASE/../lib"; then
16232        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16233$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16234        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16235$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16236      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16237        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16238$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16239        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16240        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16241          VS_ENV_ARGS="/x86"
16242        else
16243          VS_ENV_ARGS="/x64"
16244        fi
16245      else
16246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16249$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16250      fi
16251    fi
16252  fi
16253
16254
16255  if test "x$VS_ENV_CMD" = x; then
16256    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16257    METHOD="well-known name"
16258
16259  windows_path="$WIN_SDK_BASE"
16260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261    unix_path=`$CYGPATH -u "$windows_path"`
16262    WIN_SDK_BASE="$unix_path"
16263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16265    WIN_SDK_BASE="$unix_path"
16266  fi
16267
16268    if test -d "$WIN_SDK_BASE"; then
16269      # There have been cases of partial or broken SDK installations. A missing
16270      # lib dir is not going to work.
16271      if test ! -d "$WIN_SDK_BASE/../lib"; then
16272        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16273$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16274        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16275$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16276      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16279        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16280        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16281          VS_ENV_ARGS="/x86"
16282        else
16283          VS_ENV_ARGS="/x64"
16284        fi
16285      else
16286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16287$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16288        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16289$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16290      fi
16291    fi
16292  fi
16293
16294
16295  if test "x$VS100COMNTOOLS" != x; then
16296
16297  if test "x$VS_ENV_CMD" = x; then
16298    VS100BASE="$VS100COMNTOOLS/../.."
16299    METHOD="VS100COMNTOOLS variable"
16300
16301  windows_path="$VS100BASE"
16302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16303    unix_path=`$CYGPATH -u "$windows_path"`
16304    VS100BASE="$unix_path"
16305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16307    VS100BASE="$unix_path"
16308  fi
16309
16310    if test -d "$VS100BASE"; then
16311      if test -f "$VS100BASE/$VCVARSFILE"; then
16312        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16313$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16314        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16315      else
16316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16317$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16319$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16320      fi
16321    fi
16322  fi
16323
16324  fi
16325  if test "x$PROGRAMFILES" != x; then
16326
16327  if test "x$VS_ENV_CMD" = x; then
16328    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16329    METHOD="well-known name"
16330
16331  windows_path="$VS100BASE"
16332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16333    unix_path=`$CYGPATH -u "$windows_path"`
16334    VS100BASE="$unix_path"
16335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16337    VS100BASE="$unix_path"
16338  fi
16339
16340    if test -d "$VS100BASE"; then
16341      if test -f "$VS100BASE/$VCVARSFILE"; then
16342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16343$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16344        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16345      else
16346        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16347$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16348        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16349$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16350      fi
16351    fi
16352  fi
16353
16354  fi
16355
16356  if test "x$VS_ENV_CMD" = x; then
16357    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16358    METHOD="well-known name"
16359
16360  windows_path="$VS100BASE"
16361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362    unix_path=`$CYGPATH -u "$windows_path"`
16363    VS100BASE="$unix_path"
16364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16366    VS100BASE="$unix_path"
16367  fi
16368
16369    if test -d "$VS100BASE"; then
16370      if test -f "$VS100BASE/$VCVARSFILE"; then
16371        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16372$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16373        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16374      else
16375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16376$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16377        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16378$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16379      fi
16380    fi
16381  fi
16382
16383
16384  if test "x$VS_ENV_CMD" = x; then
16385    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16386    METHOD="well-known name"
16387
16388  windows_path="$VS100BASE"
16389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16390    unix_path=`$CYGPATH -u "$windows_path"`
16391    VS100BASE="$unix_path"
16392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16394    VS100BASE="$unix_path"
16395  fi
16396
16397    if test -d "$VS100BASE"; then
16398      if test -f "$VS100BASE/$VCVARSFILE"; then
16399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16400$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16401        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16402      else
16403        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16404$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16405        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16406$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16407      fi
16408    fi
16409  fi
16410
16411
16412  if test "x$VS_ENV_CMD" != x; then
16413    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16414
16415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16416
16417  # First separate the path from the arguments. This will split at the first
16418  # space.
16419  complete="$VS_ENV_CMD"
16420  path="${complete%% *}"
16421  tmp="$complete EOL"
16422  arguments="${tmp#* }"
16423
16424  # Input might be given as Windows format, start by converting to
16425  # unix format.
16426  new_path=`$CYGPATH -u "$path"`
16427
16428  # Now try to locate executable using which
16429  new_path=`$WHICH "$new_path" 2> /dev/null`
16430  # bat and cmd files are not always considered executable in cygwin causing which
16431  # to not find them
16432  if test "x$new_path" = x \
16433           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16434           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16435    new_path=`$CYGPATH -u "$path"`
16436  fi
16437  if test "x$new_path" = x; then
16438    # Oops. Which didn't find the executable.
16439    # The splitting of arguments from the executable at a space might have been incorrect,
16440    # since paths with space are more likely in Windows. Give it another try with the whole
16441    # argument.
16442    path="$complete"
16443    arguments="EOL"
16444    new_path=`$CYGPATH -u "$path"`
16445    new_path=`$WHICH "$new_path" 2> /dev/null`
16446    # bat and cmd files are not always considered executable in cygwin causing which
16447    # to not find them
16448    if test "x$new_path" = x \
16449             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16450             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16451      new_path=`$CYGPATH -u "$path"`
16452    fi
16453    if test "x$new_path" = x; then
16454      # It's still not found. Now this is an unrecoverable error.
16455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16456$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16457      has_space=`$ECHO "$complete" | $GREP " "`
16458      if test "x$has_space" != x; then
16459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16461      fi
16462      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16463    fi
16464  fi
16465
16466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16469  # "foo.exe" is OK but "foo" is an error.
16470  #
16471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16472  # It is also a way to make sure we got the proper file name for the real test later on.
16473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16474  if test "x$test_shortpath" = x; then
16475    # Short path failed, file does not exist as specified.
16476    # Try adding .exe or .cmd
16477    if test -f "${new_path}.exe"; then
16478       input_to_shortpath="${new_path}.exe"
16479    elif test -f "${new_path}.cmd"; then
16480       input_to_shortpath="${new_path}.cmd"
16481    else
16482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16483$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16486      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16487    fi
16488  else
16489    input_to_shortpath="$new_path"
16490  fi
16491
16492  # Call helper function which possibly converts this using DOS-style short mode.
16493  # If so, the updated path is stored in $new_path.
16494  new_path="$input_to_shortpath"
16495
16496  input_path="$input_to_shortpath"
16497  # Check if we need to convert this using DOS-style short mode. If the path
16498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16499  # take no chances and rewrite it.
16500  # Note: m4 eats our [], so we need to use [ and ] instead.
16501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16502  if test "x$has_forbidden_chars" != x; then
16503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16507      # Going to short mode and back again did indeed matter. Since short mode is
16508      # case insensitive, let's make it lowercase to improve readability.
16509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16510      # Now convert it back to Unix-stile (cygpath)
16511      input_path=`$CYGPATH -u "$shortmode_path"`
16512      new_path="$input_path"
16513    fi
16514  fi
16515
16516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16517  if test "x$test_cygdrive_prefix" = x; then
16518    # As a simple fix, exclude /usr/bin since it's not a real path.
16519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16521      # a path prefixed by /cygdrive for fixpath to work.
16522      new_path="$CYGWIN_ROOT_PATH$input_path"
16523    fi
16524  fi
16525
16526  # remove trailing .exe if any
16527  new_path="${new_path/%.exe/}"
16528
16529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16530
16531  # First separate the path from the arguments. This will split at the first
16532  # space.
16533  complete="$VS_ENV_CMD"
16534  path="${complete%% *}"
16535  tmp="$complete EOL"
16536  arguments="${tmp#* }"
16537
16538  # Input might be given as Windows format, start by converting to
16539  # unix format.
16540  new_path="$path"
16541
16542  windows_path="$new_path"
16543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16544    unix_path=`$CYGPATH -u "$windows_path"`
16545    new_path="$unix_path"
16546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16548    new_path="$unix_path"
16549  fi
16550
16551
16552  # Now try to locate executable using which
16553  new_path=`$WHICH "$new_path" 2> /dev/null`
16554
16555  if test "x$new_path" = x; then
16556    # Oops. Which didn't find the executable.
16557    # The splitting of arguments from the executable at a space might have been incorrect,
16558    # since paths with space are more likely in Windows. Give it another try with the whole
16559    # argument.
16560    path="$complete"
16561    arguments="EOL"
16562    new_path="$path"
16563
16564  windows_path="$new_path"
16565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16566    unix_path=`$CYGPATH -u "$windows_path"`
16567    new_path="$unix_path"
16568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16570    new_path="$unix_path"
16571  fi
16572
16573
16574    new_path=`$WHICH "$new_path" 2> /dev/null`
16575
16576    if test "x$new_path" = x; then
16577      # It's still not found. Now this is an unrecoverable error.
16578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16579$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16580      has_space=`$ECHO "$complete" | $GREP " "`
16581      if test "x$has_space" != x; then
16582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16584      fi
16585      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16586    fi
16587  fi
16588
16589  # Now new_path has a complete unix path to the binary
16590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16591    # Keep paths in /bin as-is, but remove trailing .exe if any
16592    new_path="${new_path/%.exe/}"
16593    # Do not save /bin paths to all_fixpath_prefixes!
16594  else
16595    # Not in mixed or Windows style, start by that.
16596    new_path=`cmd //c echo $new_path`
16597
16598  input_path="$new_path"
16599  # Check if we need to convert this using DOS-style short mode. If the path
16600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16601  # take no chances and rewrite it.
16602  # Note: m4 eats our [], so we need to use [ and ] instead.
16603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16604  if test "x$has_forbidden_chars" != x; then
16605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16607  fi
16608
16609    # Output is in $new_path
16610
16611  windows_path="$new_path"
16612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16613    unix_path=`$CYGPATH -u "$windows_path"`
16614    new_path="$unix_path"
16615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16617    new_path="$unix_path"
16618  fi
16619
16620    # remove trailing .exe if any
16621    new_path="${new_path/%.exe/}"
16622
16623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16625  fi
16626
16627  else
16628    # We're on a posix platform. Hooray! :)
16629    # First separate the path from the arguments. This will split at the first
16630    # space.
16631    complete="$VS_ENV_CMD"
16632    path="${complete%% *}"
16633    tmp="$complete EOL"
16634    arguments="${tmp#* }"
16635
16636    # Cannot rely on the command "which" here since it doesn't always work.
16637    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16638    if test -z "$is_absolute_path"; then
16639      # Path to executable is not absolute. Find it.
16640      IFS_save="$IFS"
16641      IFS=:
16642      for p in $PATH; do
16643        if test -f "$p/$path" && test -x "$p/$path"; then
16644          new_path="$p/$path"
16645          break
16646        fi
16647      done
16648      IFS="$IFS_save"
16649    else
16650      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16651$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16652      new_path="$path"
16653    fi
16654
16655    if test "x$new_path" = x; then
16656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16657$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16658        has_space=`$ECHO "$complete" | $GREP " "`
16659        if test "x$has_space" != x; then
16660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16662        fi
16663        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16664      fi
16665  fi
16666
16667      # Now join together the path and the arguments once again
16668      if test "x$arguments" != xEOL; then
16669        new_complete="$new_path ${arguments% *}"
16670      else
16671        new_complete="$new_path"
16672      fi
16673
16674  if test "x$complete" != "x$new_complete"; then
16675      VS_ENV_CMD="$new_complete"
16676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16677$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16678    fi
16679
16680
16681    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16682    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16683$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16684    cd $OUTPUT_ROOT
16685    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16686    # to autoconf standards.
16687
16688    #----
16689
16690    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16691    # but calculate the difference in Cygwin environment before/after running it and then
16692    # apply the diff.
16693
16694    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16695      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16696      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16697      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16698    else
16699      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16700      _dosbash=`cmd //c echo \`which bash\``
16701    fi
16702
16703    # generate the set of exported vars before/after the vs10 setup
16704    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16705    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16706    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16707    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16708
16709    # Now execute the newly created bat file.
16710    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16711    cmd /c localdevenvtmp.bat | cat
16712
16713    # apply the diff (less some non-vs10 vars named by "!")
16714    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16715    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16716    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16717
16718    # cleanup
16719    $RM localdevenvtmp*
16720    #----
16721    cd $CURDIR
16722    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16724$as_echo "no" >&6; }
16725      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16726$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16727      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16728$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16729      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16730$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16731      as_fn_error $? "Cannot continue" "$LINENO" 5
16732    fi
16733
16734    # Now set all paths and other env variables. This will allow the rest of
16735    # the configure script to find and run the compiler in the proper way.
16736    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16737$as_echo "$as_me: Setting extracted environment variables" >&6;}
16738    . $OUTPUT_ROOT/localdevenv.sh
16739  else
16740    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16741    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16742$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16743  fi
16744
16745  # At this point, we should have corrent variables in the environment, or we can't continue.
16746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16747$as_echo_n "checking for Visual Studio variables... " >&6; }
16748
16749  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16750    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16752$as_echo "present but broken" >&6; }
16753      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16754    else
16755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16756$as_echo "ok" >&6; }
16757      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16758      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16759      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16760      VS_PATH="$PATH"
16761
16762
16763
16764    fi
16765  else
16766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16767$as_echo "not found" >&6; }
16768
16769    if test "x$VS_ENV_CMD" = x; then
16770      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16771$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16772      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16773$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16774    else
16775      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16776$as_echo "$as_me: Running the extraction script failed." >&6;}
16777    fi
16778    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16779$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16780    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16781$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16782    as_fn_error $? "Cannot continue" "$LINENO" 5
16783  fi
16784
16785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16786$as_echo_n "checking for msvcr100.dll... " >&6; }
16787
16788# Check whether --with-msvcr-dll was given.
16789if test "${with_msvcr_dll+set}" = set; then :
16790  withval=$with_msvcr_dll;
16791fi
16792
16793  if test "x$with_msvcr_dll" != x; then
16794    MSVCR_DLL="$with_msvcr_dll"
16795  else
16796    if test "x$VCINSTALLDIR" != x; then
16797      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16798        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16799      else
16800        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16801        if test "x$MSVCR_DLL" = x; then
16802          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16803        fi
16804      fi
16805      if test "x$MSVCR_DLL" != x; then
16806        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16807$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16808      else
16809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16810$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16811      fi
16812    fi
16813    if test "x$MSVCR_DLL" = x; then
16814      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16815        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16816$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16817        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16818      fi
16819    fi
16820  fi
16821  if test "x$MSVCR_DLL" = x; then
16822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16823$as_echo "no" >&6; }
16824    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16825  fi
16826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16827$as_echo "$MSVCR_DLL" >&6; }
16828
16829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830
16831  # Input might be given as Windows format, start by converting to
16832  # unix format.
16833  path="$MSVCR_DLL"
16834  new_path=`$CYGPATH -u "$path"`
16835
16836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16839  # "foo.exe" is OK but "foo" is an error.
16840  #
16841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16842  # It is also a way to make sure we got the proper file name for the real test later on.
16843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16844  if test "x$test_shortpath" = x; then
16845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16846$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16847    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16848  fi
16849
16850  # Call helper function which possibly converts this using DOS-style short mode.
16851  # If so, the updated path is stored in $new_path.
16852
16853  input_path="$new_path"
16854  # Check if we need to convert this using DOS-style short mode. If the path
16855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16856  # take no chances and rewrite it.
16857  # Note: m4 eats our [], so we need to use [ and ] instead.
16858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16859  if test "x$has_forbidden_chars" != x; then
16860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16864      # Going to short mode and back again did indeed matter. Since short mode is
16865      # case insensitive, let's make it lowercase to improve readability.
16866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16867      # Now convert it back to Unix-stile (cygpath)
16868      input_path=`$CYGPATH -u "$shortmode_path"`
16869      new_path="$input_path"
16870    fi
16871  fi
16872
16873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16874  if test "x$test_cygdrive_prefix" = x; then
16875    # As a simple fix, exclude /usr/bin since it's not a real path.
16876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16878      # a path prefixed by /cygdrive for fixpath to work.
16879      new_path="$CYGWIN_ROOT_PATH$input_path"
16880    fi
16881  fi
16882
16883
16884  if test "x$path" != "x$new_path"; then
16885    MSVCR_DLL="$new_path"
16886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16887$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16888  fi
16889
16890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16891
16892  path="$MSVCR_DLL"
16893  has_colon=`$ECHO $path | $GREP ^.:`
16894  new_path="$path"
16895  if test "x$has_colon" = x; then
16896    # Not in mixed or Windows style, start by that.
16897    new_path=`cmd //c echo $path`
16898  fi
16899
16900
16901  input_path="$new_path"
16902  # Check if we need to convert this using DOS-style short mode. If the path
16903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16904  # take no chances and rewrite it.
16905  # Note: m4 eats our [], so we need to use [ and ] instead.
16906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16907  if test "x$has_forbidden_chars" != x; then
16908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16910  fi
16911
16912
16913  windows_path="$new_path"
16914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16915    unix_path=`$CYGPATH -u "$windows_path"`
16916    new_path="$unix_path"
16917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16919    new_path="$unix_path"
16920  fi
16921
16922  if test "x$path" != "x$new_path"; then
16923    MSVCR_DLL="$new_path"
16924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16925$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16926  fi
16927
16928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16930
16931  else
16932    # We're on a posix platform. Hooray! :)
16933    path="$MSVCR_DLL"
16934
16935    if test ! -f "$path" && test ! -d "$path"; then
16936      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16937    fi
16938
16939    has_space=`$ECHO "$path" | $GREP " "`
16940    if test "x$has_space" != x; then
16941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16942$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16944    fi
16945  fi
16946
16947
16948fi
16949
16950
16951
16952# If --build AND --host is set, then the configure script will find any
16953# cross compilation tools in the PATH. Cross compilation tools
16954# follows the cross compilation standard where they are prefixed with ${host}.
16955# For example the binary i686-sun-solaris2.10-gcc
16956# will cross compile for i686-sun-solaris2.10
16957# If neither of build and host is not set, then build=host and the
16958# default compiler found in the path will be used.
16959# Setting only --host, does not seem to be really supported.
16960# Please set both --build and --host if you want to cross compile.
16961
16962if test "x$COMPILE_TYPE" = "xcross"; then
16963    # Now we to find a C/C++ compiler that can build executables for the build
16964    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16965    # once. Also, we need to do this before adding a tools dir to the path,
16966    # otherwise we might pick up cross-compilers which don't use standard naming.
16967    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16968    # to wait until they are properly discovered.
16969    for ac_prog in cl cc gcc
16970do
16971  # Extract the first word of "$ac_prog", so it can be a program name with args.
16972set dummy $ac_prog; ac_word=$2
16973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16974$as_echo_n "checking for $ac_word... " >&6; }
16975if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16976  $as_echo_n "(cached) " >&6
16977else
16978  case $BUILD_CC in
16979  [\\/]* | ?:[\\/]*)
16980  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16981  ;;
16982  *)
16983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16984for as_dir in $PATH
16985do
16986  IFS=$as_save_IFS
16987  test -z "$as_dir" && as_dir=.
16988    for ac_exec_ext in '' $ac_executable_extensions; do
16989  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16990    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16992    break 2
16993  fi
16994done
16995  done
16996IFS=$as_save_IFS
16997
16998  ;;
16999esac
17000fi
17001BUILD_CC=$ac_cv_path_BUILD_CC
17002if test -n "$BUILD_CC"; then
17003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17004$as_echo "$BUILD_CC" >&6; }
17005else
17006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17007$as_echo "no" >&6; }
17008fi
17009
17010
17011  test -n "$BUILD_CC" && break
17012done
17013
17014
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016
17017  # First separate the path from the arguments. This will split at the first
17018  # space.
17019  complete="$BUILD_CC"
17020  path="${complete%% *}"
17021  tmp="$complete EOL"
17022  arguments="${tmp#* }"
17023
17024  # Input might be given as Windows format, start by converting to
17025  # unix format.
17026  new_path=`$CYGPATH -u "$path"`
17027
17028  # Now try to locate executable using which
17029  new_path=`$WHICH "$new_path" 2> /dev/null`
17030  # bat and cmd files are not always considered executable in cygwin causing which
17031  # to not find them
17032  if test "x$new_path" = x \
17033           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17034           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17035    new_path=`$CYGPATH -u "$path"`
17036  fi
17037  if test "x$new_path" = x; then
17038    # Oops. Which didn't find the executable.
17039    # The splitting of arguments from the executable at a space might have been incorrect,
17040    # since paths with space are more likely in Windows. Give it another try with the whole
17041    # argument.
17042    path="$complete"
17043    arguments="EOL"
17044    new_path=`$CYGPATH -u "$path"`
17045    new_path=`$WHICH "$new_path" 2> /dev/null`
17046    # bat and cmd files are not always considered executable in cygwin causing which
17047    # to not find them
17048    if test "x$new_path" = x \
17049             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17050             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17051      new_path=`$CYGPATH -u "$path"`
17052    fi
17053    if test "x$new_path" = x; then
17054      # It's still not found. Now this is an unrecoverable error.
17055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17056$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17057      has_space=`$ECHO "$complete" | $GREP " "`
17058      if test "x$has_space" != x; then
17059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17061      fi
17062      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17063    fi
17064  fi
17065
17066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17069  # "foo.exe" is OK but "foo" is an error.
17070  #
17071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17072  # It is also a way to make sure we got the proper file name for the real test later on.
17073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17074  if test "x$test_shortpath" = x; then
17075    # Short path failed, file does not exist as specified.
17076    # Try adding .exe or .cmd
17077    if test -f "${new_path}.exe"; then
17078       input_to_shortpath="${new_path}.exe"
17079    elif test -f "${new_path}.cmd"; then
17080       input_to_shortpath="${new_path}.cmd"
17081    else
17082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17083$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17086      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17087    fi
17088  else
17089    input_to_shortpath="$new_path"
17090  fi
17091
17092  # Call helper function which possibly converts this using DOS-style short mode.
17093  # If so, the updated path is stored in $new_path.
17094  new_path="$input_to_shortpath"
17095
17096  input_path="$input_to_shortpath"
17097  # Check if we need to convert this using DOS-style short mode. If the path
17098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17099  # take no chances and rewrite it.
17100  # Note: m4 eats our [], so we need to use [ and ] instead.
17101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17102  if test "x$has_forbidden_chars" != x; then
17103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17107      # Going to short mode and back again did indeed matter. Since short mode is
17108      # case insensitive, let's make it lowercase to improve readability.
17109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17110      # Now convert it back to Unix-stile (cygpath)
17111      input_path=`$CYGPATH -u "$shortmode_path"`
17112      new_path="$input_path"
17113    fi
17114  fi
17115
17116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17117  if test "x$test_cygdrive_prefix" = x; then
17118    # As a simple fix, exclude /usr/bin since it's not a real path.
17119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17121      # a path prefixed by /cygdrive for fixpath to work.
17122      new_path="$CYGWIN_ROOT_PATH$input_path"
17123    fi
17124  fi
17125
17126  # remove trailing .exe if any
17127  new_path="${new_path/%.exe/}"
17128
17129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17130
17131  # First separate the path from the arguments. This will split at the first
17132  # space.
17133  complete="$BUILD_CC"
17134  path="${complete%% *}"
17135  tmp="$complete EOL"
17136  arguments="${tmp#* }"
17137
17138  # Input might be given as Windows format, start by converting to
17139  # unix format.
17140  new_path="$path"
17141
17142  windows_path="$new_path"
17143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17144    unix_path=`$CYGPATH -u "$windows_path"`
17145    new_path="$unix_path"
17146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17148    new_path="$unix_path"
17149  fi
17150
17151
17152  # Now try to locate executable using which
17153  new_path=`$WHICH "$new_path" 2> /dev/null`
17154
17155  if test "x$new_path" = x; then
17156    # Oops. Which didn't find the executable.
17157    # The splitting of arguments from the executable at a space might have been incorrect,
17158    # since paths with space are more likely in Windows. Give it another try with the whole
17159    # argument.
17160    path="$complete"
17161    arguments="EOL"
17162    new_path="$path"
17163
17164  windows_path="$new_path"
17165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17166    unix_path=`$CYGPATH -u "$windows_path"`
17167    new_path="$unix_path"
17168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17170    new_path="$unix_path"
17171  fi
17172
17173
17174    new_path=`$WHICH "$new_path" 2> /dev/null`
17175
17176    if test "x$new_path" = x; then
17177      # It's still not found. Now this is an unrecoverable error.
17178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17179$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17180      has_space=`$ECHO "$complete" | $GREP " "`
17181      if test "x$has_space" != x; then
17182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17184      fi
17185      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17186    fi
17187  fi
17188
17189  # Now new_path has a complete unix path to the binary
17190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17191    # Keep paths in /bin as-is, but remove trailing .exe if any
17192    new_path="${new_path/%.exe/}"
17193    # Do not save /bin paths to all_fixpath_prefixes!
17194  else
17195    # Not in mixed or Windows style, start by that.
17196    new_path=`cmd //c echo $new_path`
17197
17198  input_path="$new_path"
17199  # Check if we need to convert this using DOS-style short mode. If the path
17200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17201  # take no chances and rewrite it.
17202  # Note: m4 eats our [], so we need to use [ and ] instead.
17203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17204  if test "x$has_forbidden_chars" != x; then
17205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17207  fi
17208
17209    # Output is in $new_path
17210
17211  windows_path="$new_path"
17212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17213    unix_path=`$CYGPATH -u "$windows_path"`
17214    new_path="$unix_path"
17215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17217    new_path="$unix_path"
17218  fi
17219
17220    # remove trailing .exe if any
17221    new_path="${new_path/%.exe/}"
17222
17223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17225  fi
17226
17227  else
17228    # We're on a posix platform. Hooray! :)
17229    # First separate the path from the arguments. This will split at the first
17230    # space.
17231    complete="$BUILD_CC"
17232    path="${complete%% *}"
17233    tmp="$complete EOL"
17234    arguments="${tmp#* }"
17235
17236    # Cannot rely on the command "which" here since it doesn't always work.
17237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17238    if test -z "$is_absolute_path"; then
17239      # Path to executable is not absolute. Find it.
17240      IFS_save="$IFS"
17241      IFS=:
17242      for p in $PATH; do
17243        if test -f "$p/$path" && test -x "$p/$path"; then
17244          new_path="$p/$path"
17245          break
17246        fi
17247      done
17248      IFS="$IFS_save"
17249    else
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17251$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17252      new_path="$path"
17253    fi
17254
17255    if test "x$new_path" = x; then
17256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17257$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17258        has_space=`$ECHO "$complete" | $GREP " "`
17259        if test "x$has_space" != x; then
17260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17262        fi
17263        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17264      fi
17265  fi
17266
17267      # Now join together the path and the arguments once again
17268      if test "x$arguments" != xEOL; then
17269        new_complete="$new_path ${arguments% *}"
17270      else
17271        new_complete="$new_path"
17272      fi
17273
17274  if test "x$complete" != "x$new_complete"; then
17275      BUILD_CC="$new_complete"
17276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17277$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17278    fi
17279
17280    for ac_prog in cl CC g++
17281do
17282  # Extract the first word of "$ac_prog", so it can be a program name with args.
17283set dummy $ac_prog; ac_word=$2
17284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17285$as_echo_n "checking for $ac_word... " >&6; }
17286if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17287  $as_echo_n "(cached) " >&6
17288else
17289  case $BUILD_CXX in
17290  [\\/]* | ?:[\\/]*)
17291  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17292  ;;
17293  *)
17294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17295for as_dir in $PATH
17296do
17297  IFS=$as_save_IFS
17298  test -z "$as_dir" && as_dir=.
17299    for ac_exec_ext in '' $ac_executable_extensions; do
17300  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17301    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17303    break 2
17304  fi
17305done
17306  done
17307IFS=$as_save_IFS
17308
17309  ;;
17310esac
17311fi
17312BUILD_CXX=$ac_cv_path_BUILD_CXX
17313if test -n "$BUILD_CXX"; then
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17315$as_echo "$BUILD_CXX" >&6; }
17316else
17317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17318$as_echo "no" >&6; }
17319fi
17320
17321
17322  test -n "$BUILD_CXX" && break
17323done
17324
17325
17326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17327
17328  # First separate the path from the arguments. This will split at the first
17329  # space.
17330  complete="$BUILD_CXX"
17331  path="${complete%% *}"
17332  tmp="$complete EOL"
17333  arguments="${tmp#* }"
17334
17335  # Input might be given as Windows format, start by converting to
17336  # unix format.
17337  new_path=`$CYGPATH -u "$path"`
17338
17339  # Now try to locate executable using which
17340  new_path=`$WHICH "$new_path" 2> /dev/null`
17341  # bat and cmd files are not always considered executable in cygwin causing which
17342  # to not find them
17343  if test "x$new_path" = x \
17344           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17345           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17346    new_path=`$CYGPATH -u "$path"`
17347  fi
17348  if test "x$new_path" = x; then
17349    # Oops. Which didn't find the executable.
17350    # The splitting of arguments from the executable at a space might have been incorrect,
17351    # since paths with space are more likely in Windows. Give it another try with the whole
17352    # argument.
17353    path="$complete"
17354    arguments="EOL"
17355    new_path=`$CYGPATH -u "$path"`
17356    new_path=`$WHICH "$new_path" 2> /dev/null`
17357    # bat and cmd files are not always considered executable in cygwin causing which
17358    # to not find them
17359    if test "x$new_path" = x \
17360             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17361             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17362      new_path=`$CYGPATH -u "$path"`
17363    fi
17364    if test "x$new_path" = x; then
17365      # It's still not found. Now this is an unrecoverable error.
17366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17367$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17368      has_space=`$ECHO "$complete" | $GREP " "`
17369      if test "x$has_space" != x; then
17370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17372      fi
17373      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17374    fi
17375  fi
17376
17377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17380  # "foo.exe" is OK but "foo" is an error.
17381  #
17382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17383  # It is also a way to make sure we got the proper file name for the real test later on.
17384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17385  if test "x$test_shortpath" = x; then
17386    # Short path failed, file does not exist as specified.
17387    # Try adding .exe or .cmd
17388    if test -f "${new_path}.exe"; then
17389       input_to_shortpath="${new_path}.exe"
17390    elif test -f "${new_path}.cmd"; then
17391       input_to_shortpath="${new_path}.cmd"
17392    else
17393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17394$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17397      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17398    fi
17399  else
17400    input_to_shortpath="$new_path"
17401  fi
17402
17403  # Call helper function which possibly converts this using DOS-style short mode.
17404  # If so, the updated path is stored in $new_path.
17405  new_path="$input_to_shortpath"
17406
17407  input_path="$input_to_shortpath"
17408  # Check if we need to convert this using DOS-style short mode. If the path
17409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17410  # take no chances and rewrite it.
17411  # Note: m4 eats our [], so we need to use [ and ] instead.
17412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17413  if test "x$has_forbidden_chars" != x; then
17414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17418      # Going to short mode and back again did indeed matter. Since short mode is
17419      # case insensitive, let's make it lowercase to improve readability.
17420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17421      # Now convert it back to Unix-stile (cygpath)
17422      input_path=`$CYGPATH -u "$shortmode_path"`
17423      new_path="$input_path"
17424    fi
17425  fi
17426
17427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17428  if test "x$test_cygdrive_prefix" = x; then
17429    # As a simple fix, exclude /usr/bin since it's not a real path.
17430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17432      # a path prefixed by /cygdrive for fixpath to work.
17433      new_path="$CYGWIN_ROOT_PATH$input_path"
17434    fi
17435  fi
17436
17437  # remove trailing .exe if any
17438  new_path="${new_path/%.exe/}"
17439
17440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17441
17442  # First separate the path from the arguments. This will split at the first
17443  # space.
17444  complete="$BUILD_CXX"
17445  path="${complete%% *}"
17446  tmp="$complete EOL"
17447  arguments="${tmp#* }"
17448
17449  # Input might be given as Windows format, start by converting to
17450  # unix format.
17451  new_path="$path"
17452
17453  windows_path="$new_path"
17454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17455    unix_path=`$CYGPATH -u "$windows_path"`
17456    new_path="$unix_path"
17457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17459    new_path="$unix_path"
17460  fi
17461
17462
17463  # Now try to locate executable using which
17464  new_path=`$WHICH "$new_path" 2> /dev/null`
17465
17466  if test "x$new_path" = x; then
17467    # Oops. Which didn't find the executable.
17468    # The splitting of arguments from the executable at a space might have been incorrect,
17469    # since paths with space are more likely in Windows. Give it another try with the whole
17470    # argument.
17471    path="$complete"
17472    arguments="EOL"
17473    new_path="$path"
17474
17475  windows_path="$new_path"
17476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17477    unix_path=`$CYGPATH -u "$windows_path"`
17478    new_path="$unix_path"
17479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17481    new_path="$unix_path"
17482  fi
17483
17484
17485    new_path=`$WHICH "$new_path" 2> /dev/null`
17486
17487    if test "x$new_path" = x; then
17488      # It's still not found. Now this is an unrecoverable error.
17489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17490$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17491      has_space=`$ECHO "$complete" | $GREP " "`
17492      if test "x$has_space" != x; then
17493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17495      fi
17496      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17497    fi
17498  fi
17499
17500  # Now new_path has a complete unix path to the binary
17501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17502    # Keep paths in /bin as-is, but remove trailing .exe if any
17503    new_path="${new_path/%.exe/}"
17504    # Do not save /bin paths to all_fixpath_prefixes!
17505  else
17506    # Not in mixed or Windows style, start by that.
17507    new_path=`cmd //c echo $new_path`
17508
17509  input_path="$new_path"
17510  # Check if we need to convert this using DOS-style short mode. If the path
17511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17512  # take no chances and rewrite it.
17513  # Note: m4 eats our [], so we need to use [ and ] instead.
17514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17515  if test "x$has_forbidden_chars" != x; then
17516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17518  fi
17519
17520    # Output is in $new_path
17521
17522  windows_path="$new_path"
17523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17524    unix_path=`$CYGPATH -u "$windows_path"`
17525    new_path="$unix_path"
17526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17528    new_path="$unix_path"
17529  fi
17530
17531    # remove trailing .exe if any
17532    new_path="${new_path/%.exe/}"
17533
17534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17536  fi
17537
17538  else
17539    # We're on a posix platform. Hooray! :)
17540    # First separate the path from the arguments. This will split at the first
17541    # space.
17542    complete="$BUILD_CXX"
17543    path="${complete%% *}"
17544    tmp="$complete EOL"
17545    arguments="${tmp#* }"
17546
17547    # Cannot rely on the command "which" here since it doesn't always work.
17548    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17549    if test -z "$is_absolute_path"; then
17550      # Path to executable is not absolute. Find it.
17551      IFS_save="$IFS"
17552      IFS=:
17553      for p in $PATH; do
17554        if test -f "$p/$path" && test -x "$p/$path"; then
17555          new_path="$p/$path"
17556          break
17557        fi
17558      done
17559      IFS="$IFS_save"
17560    else
17561      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17562$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17563      new_path="$path"
17564    fi
17565
17566    if test "x$new_path" = x; then
17567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17568$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17569        has_space=`$ECHO "$complete" | $GREP " "`
17570        if test "x$has_space" != x; then
17571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17573        fi
17574        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17575      fi
17576  fi
17577
17578      # Now join together the path and the arguments once again
17579      if test "x$arguments" != xEOL; then
17580        new_complete="$new_path ${arguments% *}"
17581      else
17582        new_complete="$new_path"
17583      fi
17584
17585  if test "x$complete" != "x$new_complete"; then
17586      BUILD_CXX="$new_complete"
17587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17588$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17589    fi
17590
17591    # Extract the first word of "ld", so it can be a program name with args.
17592set dummy ld; ac_word=$2
17593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17594$as_echo_n "checking for $ac_word... " >&6; }
17595if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17596  $as_echo_n "(cached) " >&6
17597else
17598  case $BUILD_LD in
17599  [\\/]* | ?:[\\/]*)
17600  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17601  ;;
17602  *)
17603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17604for as_dir in $PATH
17605do
17606  IFS=$as_save_IFS
17607  test -z "$as_dir" && as_dir=.
17608    for ac_exec_ext in '' $ac_executable_extensions; do
17609  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17610    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17612    break 2
17613  fi
17614done
17615  done
17616IFS=$as_save_IFS
17617
17618  ;;
17619esac
17620fi
17621BUILD_LD=$ac_cv_path_BUILD_LD
17622if test -n "$BUILD_LD"; then
17623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17624$as_echo "$BUILD_LD" >&6; }
17625else
17626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17627$as_echo "no" >&6; }
17628fi
17629
17630
17631
17632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17633
17634  # First separate the path from the arguments. This will split at the first
17635  # space.
17636  complete="$BUILD_LD"
17637  path="${complete%% *}"
17638  tmp="$complete EOL"
17639  arguments="${tmp#* }"
17640
17641  # Input might be given as Windows format, start by converting to
17642  # unix format.
17643  new_path=`$CYGPATH -u "$path"`
17644
17645  # Now try to locate executable using which
17646  new_path=`$WHICH "$new_path" 2> /dev/null`
17647  # bat and cmd files are not always considered executable in cygwin causing which
17648  # to not find them
17649  if test "x$new_path" = x \
17650           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17651           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17652    new_path=`$CYGPATH -u "$path"`
17653  fi
17654  if test "x$new_path" = x; then
17655    # Oops. Which didn't find the executable.
17656    # The splitting of arguments from the executable at a space might have been incorrect,
17657    # since paths with space are more likely in Windows. Give it another try with the whole
17658    # argument.
17659    path="$complete"
17660    arguments="EOL"
17661    new_path=`$CYGPATH -u "$path"`
17662    new_path=`$WHICH "$new_path" 2> /dev/null`
17663    # bat and cmd files are not always considered executable in cygwin causing which
17664    # to not find them
17665    if test "x$new_path" = x \
17666             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17667             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17668      new_path=`$CYGPATH -u "$path"`
17669    fi
17670    if test "x$new_path" = x; then
17671      # It's still not found. Now this is an unrecoverable error.
17672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17673$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17674      has_space=`$ECHO "$complete" | $GREP " "`
17675      if test "x$has_space" != x; then
17676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17678      fi
17679      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17680    fi
17681  fi
17682
17683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17686  # "foo.exe" is OK but "foo" is an error.
17687  #
17688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17689  # It is also a way to make sure we got the proper file name for the real test later on.
17690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17691  if test "x$test_shortpath" = x; then
17692    # Short path failed, file does not exist as specified.
17693    # Try adding .exe or .cmd
17694    if test -f "${new_path}.exe"; then
17695       input_to_shortpath="${new_path}.exe"
17696    elif test -f "${new_path}.cmd"; then
17697       input_to_shortpath="${new_path}.cmd"
17698    else
17699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17700$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17703      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17704    fi
17705  else
17706    input_to_shortpath="$new_path"
17707  fi
17708
17709  # Call helper function which possibly converts this using DOS-style short mode.
17710  # If so, the updated path is stored in $new_path.
17711  new_path="$input_to_shortpath"
17712
17713  input_path="$input_to_shortpath"
17714  # Check if we need to convert this using DOS-style short mode. If the path
17715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17716  # take no chances and rewrite it.
17717  # Note: m4 eats our [], so we need to use [ and ] instead.
17718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17719  if test "x$has_forbidden_chars" != x; then
17720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17724      # Going to short mode and back again did indeed matter. Since short mode is
17725      # case insensitive, let's make it lowercase to improve readability.
17726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17727      # Now convert it back to Unix-stile (cygpath)
17728      input_path=`$CYGPATH -u "$shortmode_path"`
17729      new_path="$input_path"
17730    fi
17731  fi
17732
17733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17734  if test "x$test_cygdrive_prefix" = x; then
17735    # As a simple fix, exclude /usr/bin since it's not a real path.
17736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17738      # a path prefixed by /cygdrive for fixpath to work.
17739      new_path="$CYGWIN_ROOT_PATH$input_path"
17740    fi
17741  fi
17742
17743  # remove trailing .exe if any
17744  new_path="${new_path/%.exe/}"
17745
17746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17747
17748  # First separate the path from the arguments. This will split at the first
17749  # space.
17750  complete="$BUILD_LD"
17751  path="${complete%% *}"
17752  tmp="$complete EOL"
17753  arguments="${tmp#* }"
17754
17755  # Input might be given as Windows format, start by converting to
17756  # unix format.
17757  new_path="$path"
17758
17759  windows_path="$new_path"
17760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17761    unix_path=`$CYGPATH -u "$windows_path"`
17762    new_path="$unix_path"
17763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17765    new_path="$unix_path"
17766  fi
17767
17768
17769  # Now try to locate executable using which
17770  new_path=`$WHICH "$new_path" 2> /dev/null`
17771
17772  if test "x$new_path" = x; then
17773    # Oops. Which didn't find the executable.
17774    # The splitting of arguments from the executable at a space might have been incorrect,
17775    # since paths with space are more likely in Windows. Give it another try with the whole
17776    # argument.
17777    path="$complete"
17778    arguments="EOL"
17779    new_path="$path"
17780
17781  windows_path="$new_path"
17782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17783    unix_path=`$CYGPATH -u "$windows_path"`
17784    new_path="$unix_path"
17785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17787    new_path="$unix_path"
17788  fi
17789
17790
17791    new_path=`$WHICH "$new_path" 2> /dev/null`
17792
17793    if test "x$new_path" = x; then
17794      # It's still not found. Now this is an unrecoverable error.
17795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17796$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17797      has_space=`$ECHO "$complete" | $GREP " "`
17798      if test "x$has_space" != x; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17801      fi
17802      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17803    fi
17804  fi
17805
17806  # Now new_path has a complete unix path to the binary
17807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17808    # Keep paths in /bin as-is, but remove trailing .exe if any
17809    new_path="${new_path/%.exe/}"
17810    # Do not save /bin paths to all_fixpath_prefixes!
17811  else
17812    # Not in mixed or Windows style, start by that.
17813    new_path=`cmd //c echo $new_path`
17814
17815  input_path="$new_path"
17816  # Check if we need to convert this using DOS-style short mode. If the path
17817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17818  # take no chances and rewrite it.
17819  # Note: m4 eats our [], so we need to use [ and ] instead.
17820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17821  if test "x$has_forbidden_chars" != x; then
17822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17824  fi
17825
17826    # Output is in $new_path
17827
17828  windows_path="$new_path"
17829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17830    unix_path=`$CYGPATH -u "$windows_path"`
17831    new_path="$unix_path"
17832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17834    new_path="$unix_path"
17835  fi
17836
17837    # remove trailing .exe if any
17838    new_path="${new_path/%.exe/}"
17839
17840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17842  fi
17843
17844  else
17845    # We're on a posix platform. Hooray! :)
17846    # First separate the path from the arguments. This will split at the first
17847    # space.
17848    complete="$BUILD_LD"
17849    path="${complete%% *}"
17850    tmp="$complete EOL"
17851    arguments="${tmp#* }"
17852
17853    # Cannot rely on the command "which" here since it doesn't always work.
17854    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17855    if test -z "$is_absolute_path"; then
17856      # Path to executable is not absolute. Find it.
17857      IFS_save="$IFS"
17858      IFS=:
17859      for p in $PATH; do
17860        if test -f "$p/$path" && test -x "$p/$path"; then
17861          new_path="$p/$path"
17862          break
17863        fi
17864      done
17865      IFS="$IFS_save"
17866    else
17867      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17868$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17869      new_path="$path"
17870    fi
17871
17872    if test "x$new_path" = x; then
17873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17874$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17875        has_space=`$ECHO "$complete" | $GREP " "`
17876        if test "x$has_space" != x; then
17877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17879        fi
17880        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17881      fi
17882  fi
17883
17884      # Now join together the path and the arguments once again
17885      if test "x$arguments" != xEOL; then
17886        new_complete="$new_path ${arguments% *}"
17887      else
17888        new_complete="$new_path"
17889      fi
17890
17891  if test "x$complete" != "x$new_complete"; then
17892      BUILD_LD="$new_complete"
17893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17894$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17895    fi
17896
17897fi
17898
17899
17900
17901
17902# If a devkit is found on the builddeps server, then prepend its path to the
17903# PATH variable. If there are cross compilers available in the devkit, these
17904# will be found by AC_PROG_CC et al.
17905DEVKIT=
17906
17907
17908    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17909        # Source the builddeps file again, to make sure it uses the latest variables!
17910        . $builddepsfile
17911        # Look for a target and build machine specific resource!
17912        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17913        if test "x$resource" = x; then
17914            # Ok, lets instead look for a target specific resource
17915            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17916        fi
17917        if test "x$resource" = x; then
17918            # Ok, lets instead look for a build specific resource
17919            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17920        fi
17921        if test "x$resource" = x; then
17922            # Ok, lets instead look for a generic resource
17923            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17924            resource=${builddep_devkit}
17925        fi
17926        if test "x$resource" != x; then
17927            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17928$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17929	    # If the resource in the builddeps.conf file is an existing directory,
17930	    # for example /java/linux/cups
17931	    if test -d ${resource}; then
17932	       depdir=${resource}
17933	    else
17934
17935# devkit is for example mymodule
17936# $resource is for example libs/general/libmymod_1_2_3.zip
17937# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17938# $with_builddeps_dir is for example /localhome/builddeps
17939# depdir is the name of the variable into which we store the depdir, eg MYMOD
17940# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17941# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17942    filename=`basename $resource`
17943    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17944    filebase=${filename%%.*}
17945    extension=${filename#*.}
17946    installdir=$with_builddeps_dir/$filebase
17947    if test ! -f $installdir/$filename.unpacked; then
17948        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17949$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17950        if test ! -d $installdir; then
17951            mkdir -p $installdir
17952        fi
17953        if test ! -d $installdir; then
17954            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17955        fi
17956        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17957        touch $tmpfile
17958        if test ! -f $tmpfile; then
17959            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17960        fi
17961
17962    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17963    # $tmpfile is the local file name for the downloaded file.
17964    VALID_TOOL=no
17965    if test "x$BDEPS_FTP" = xwget; then
17966       VALID_TOOL=yes
17967       wget -O $tmpfile $with_builddeps_server/$resource
17968    fi
17969    if test "x$BDEPS_FTP" = xlftp; then
17970       VALID_TOOL=yes
17971       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17972    fi
17973    if test "x$BDEPS_FTP" = xftp; then
17974        VALID_TOOL=yes
17975        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17976        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17977        FTPUSERPWD=${FTPSERVER%%@*}
17978        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17979            FTPUSER=${userpwd%%:*}
17980            FTPPWD=${userpwd#*@}
17981            FTPSERVER=${FTPSERVER#*@}
17982        else
17983            FTPUSER=ftp
17984            FTPPWD=ftp
17985        fi
17986        # the "pass" command does not work on some
17987        # ftp clients (read ftp.exe) but if it works,
17988        # passive mode is better!
17989        (\
17990            echo "user $FTPUSER $FTPPWD"        ;\
17991            echo "pass"                         ;\
17992            echo "bin"                          ;\
17993            echo "get $FTPPATH $tmpfile"              ;\
17994        ) | ftp -in $FTPSERVER
17995    fi
17996    if test "x$VALID_TOOL" != xyes; then
17997       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17998    fi
17999
18000        mv $tmpfile $installdir/$filename
18001        if test ! -s $installdir/$filename; then
18002            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18003        fi
18004        case "$extension" in
18005            zip)  echo "Unzipping $installdir/$filename..."
18006               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18007            ;;
18008            tar.gz) echo "Untaring $installdir/$filename..."
18009               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18010            ;;
18011            tgz) echo "Untaring $installdir/$filename..."
18012               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18013            ;;
18014            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18015            ;;
18016        esac
18017    fi
18018    if test -f $installdir/$filename.unpacked; then
18019        depdir=$installdir
18020    fi
18021
18022	    fi
18023            # Source the builddeps file again, because in the previous command, the depdir
18024            # was updated to point at the current build dependency install directory.
18025            . $builddepsfile
18026            # Now extract variables from the builddeps.conf files.
18027            theroot=${builddep_devkit_ROOT}
18028            thecflags=${builddep_devkit_CFLAGS}
18029            thelibs=${builddep_devkit_LIBS}
18030            if test "x$depdir" = x; then
18031                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18032            fi
18033            DEVKIT=$depdir
18034            if test "x$theroot" != x; then
18035               DEVKIT="$theroot"
18036            fi
18037            if test "x$thecflags" != x; then
18038               DEVKIT_CFLAGS="$thecflags"
18039            fi
18040            if test "x$thelibs" != x; then
18041               DEVKIT_LIBS="$thelibs"
18042            fi
18043            # Found devkit
18044                     PATH="$DEVKIT/bin:$PATH"
18045                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18046                     if test "x$x_includes" = "xNONE"; then
18047                         x_includes="$SYS_ROOT/usr/include/X11"
18048                     fi
18049                     if test "x$x_libraries" = "xNONE"; then
18050                         x_libraries="$SYS_ROOT/usr/lib"
18051                     fi
18052
18053
18054        fi
18055
18056    fi
18057
18058
18059if test "x$SYS_ROOT" != "x/" ; then
18060    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18061    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18062    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18063    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18064    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18065    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18066fi
18067
18068# Store the CFLAGS etal passed to the configure script.
18069ORG_CFLAGS="$CFLAGS"
18070ORG_CXXFLAGS="$CXXFLAGS"
18071ORG_OBJCFLAGS="$OBJCFLAGS"
18072
18073# autoconf magic only relies on PATH, so update it if tools dir is specified
18074OLD_PATH="$PATH"
18075if test "x$TOOLS_DIR" != x; then
18076  PATH=$TOOLS_DIR:$PATH
18077fi
18078
18079
18080### Locate C compiler (CC)
18081
18082# gcc is almost always present, but on Windows we
18083# prefer cl.exe and on Solaris we prefer CC.
18084# Thus test for them in this order.
18085if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18086  # Do not probe for cc on MacOSX.
18087  COMPILER_CHECK_LIST="cl gcc"
18088else
18089  COMPILER_CHECK_LIST="cl cc gcc"
18090fi
18091
18092
18093  COMPILER_NAME=C
18094
18095  CC=
18096  # If TOOLS_DIR is set, check for all compiler names in there first
18097  # before checking the rest of the PATH.
18098  if test -n "$TOOLS_DIR"; then
18099    PATH_save="$PATH"
18100    PATH="$TOOLS_DIR"
18101    for ac_prog in $COMPILER_CHECK_LIST
18102do
18103  # Extract the first word of "$ac_prog", so it can be a program name with args.
18104set dummy $ac_prog; ac_word=$2
18105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18106$as_echo_n "checking for $ac_word... " >&6; }
18107if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18108  $as_echo_n "(cached) " >&6
18109else
18110  case $TOOLS_DIR_CC in
18111  [\\/]* | ?:[\\/]*)
18112  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18113  ;;
18114  *)
18115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18116for as_dir in $PATH
18117do
18118  IFS=$as_save_IFS
18119  test -z "$as_dir" && as_dir=.
18120    for ac_exec_ext in '' $ac_executable_extensions; do
18121  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18122    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18124    break 2
18125  fi
18126done
18127  done
18128IFS=$as_save_IFS
18129
18130  ;;
18131esac
18132fi
18133TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18134if test -n "$TOOLS_DIR_CC"; then
18135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18136$as_echo "$TOOLS_DIR_CC" >&6; }
18137else
18138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18139$as_echo "no" >&6; }
18140fi
18141
18142
18143  test -n "$TOOLS_DIR_CC" && break
18144done
18145
18146    CC=$TOOLS_DIR_CC
18147    PATH="$PATH_save"
18148  fi
18149
18150  # AC_PATH_PROGS can't be run multiple times with the same variable,
18151  # so create a new name for this run.
18152  if test "x$CC" = x; then
18153    for ac_prog in $COMPILER_CHECK_LIST
18154do
18155  # Extract the first word of "$ac_prog", so it can be a program name with args.
18156set dummy $ac_prog; ac_word=$2
18157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18158$as_echo_n "checking for $ac_word... " >&6; }
18159if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18160  $as_echo_n "(cached) " >&6
18161else
18162  case $POTENTIAL_CC in
18163  [\\/]* | ?:[\\/]*)
18164  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18165  ;;
18166  *)
18167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18168for as_dir in $PATH
18169do
18170  IFS=$as_save_IFS
18171  test -z "$as_dir" && as_dir=.
18172    for ac_exec_ext in '' $ac_executable_extensions; do
18173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18174    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18176    break 2
18177  fi
18178done
18179  done
18180IFS=$as_save_IFS
18181
18182  ;;
18183esac
18184fi
18185POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18186if test -n "$POTENTIAL_CC"; then
18187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18188$as_echo "$POTENTIAL_CC" >&6; }
18189else
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18191$as_echo "no" >&6; }
18192fi
18193
18194
18195  test -n "$POTENTIAL_CC" && break
18196done
18197
18198    CC=$POTENTIAL_CC
18199  fi
18200
18201  if test "x$CC" = x; then
18202
18203    # Print a helpful message on how to acquire the necessary build dependency.
18204    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18205    MISSING_DEPENDENCY=devkit
18206    PKGHANDLER_COMMAND=
18207
18208    case $PKGHANDLER in
18209	apt-get)
18210                apt_help     $MISSING_DEPENDENCY ;;
18211    yum)
18212                yum_help     $MISSING_DEPENDENCY ;;
18213	port)
18214                port_help    $MISSING_DEPENDENCY ;;
18215	pkgutil)
18216                pkgutil_help $MISSING_DEPENDENCY ;;
18217	pkgadd)
18218                pkgadd_help  $MISSING_DEPENDENCY ;;
18219    * )
18220      break ;;
18221    esac
18222
18223    if test "x$PKGHANDLER_COMMAND" != x; then
18224        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18225    fi
18226
18227      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18228  fi
18229
18230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231
18232  # First separate the path from the arguments. This will split at the first
18233  # space.
18234  complete="$CC"
18235  path="${complete%% *}"
18236  tmp="$complete EOL"
18237  arguments="${tmp#* }"
18238
18239  # Input might be given as Windows format, start by converting to
18240  # unix format.
18241  new_path=`$CYGPATH -u "$path"`
18242
18243  # Now try to locate executable using which
18244  new_path=`$WHICH "$new_path" 2> /dev/null`
18245  # bat and cmd files are not always considered executable in cygwin causing which
18246  # to not find them
18247  if test "x$new_path" = x \
18248           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18249           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18250    new_path=`$CYGPATH -u "$path"`
18251  fi
18252  if test "x$new_path" = x; then
18253    # Oops. Which didn't find the executable.
18254    # The splitting of arguments from the executable at a space might have been incorrect,
18255    # since paths with space are more likely in Windows. Give it another try with the whole
18256    # argument.
18257    path="$complete"
18258    arguments="EOL"
18259    new_path=`$CYGPATH -u "$path"`
18260    new_path=`$WHICH "$new_path" 2> /dev/null`
18261    # bat and cmd files are not always considered executable in cygwin causing which
18262    # to not find them
18263    if test "x$new_path" = x \
18264             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18265             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18266      new_path=`$CYGPATH -u "$path"`
18267    fi
18268    if test "x$new_path" = x; then
18269      # It's still not found. Now this is an unrecoverable error.
18270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18271$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18272      has_space=`$ECHO "$complete" | $GREP " "`
18273      if test "x$has_space" != x; then
18274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18276      fi
18277      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18278    fi
18279  fi
18280
18281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18284  # "foo.exe" is OK but "foo" is an error.
18285  #
18286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18287  # It is also a way to make sure we got the proper file name for the real test later on.
18288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18289  if test "x$test_shortpath" = x; then
18290    # Short path failed, file does not exist as specified.
18291    # Try adding .exe or .cmd
18292    if test -f "${new_path}.exe"; then
18293       input_to_shortpath="${new_path}.exe"
18294    elif test -f "${new_path}.cmd"; then
18295       input_to_shortpath="${new_path}.cmd"
18296    else
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18298$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18301      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18302    fi
18303  else
18304    input_to_shortpath="$new_path"
18305  fi
18306
18307  # Call helper function which possibly converts this using DOS-style short mode.
18308  # If so, the updated path is stored in $new_path.
18309  new_path="$input_to_shortpath"
18310
18311  input_path="$input_to_shortpath"
18312  # Check if we need to convert this using DOS-style short mode. If the path
18313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18314  # take no chances and rewrite it.
18315  # Note: m4 eats our [], so we need to use [ and ] instead.
18316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18317  if test "x$has_forbidden_chars" != x; then
18318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18322      # Going to short mode and back again did indeed matter. Since short mode is
18323      # case insensitive, let's make it lowercase to improve readability.
18324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18325      # Now convert it back to Unix-stile (cygpath)
18326      input_path=`$CYGPATH -u "$shortmode_path"`
18327      new_path="$input_path"
18328    fi
18329  fi
18330
18331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18332  if test "x$test_cygdrive_prefix" = x; then
18333    # As a simple fix, exclude /usr/bin since it's not a real path.
18334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18336      # a path prefixed by /cygdrive for fixpath to work.
18337      new_path="$CYGWIN_ROOT_PATH$input_path"
18338    fi
18339  fi
18340
18341  # remove trailing .exe if any
18342  new_path="${new_path/%.exe/}"
18343
18344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18345
18346  # First separate the path from the arguments. This will split at the first
18347  # space.
18348  complete="$CC"
18349  path="${complete%% *}"
18350  tmp="$complete EOL"
18351  arguments="${tmp#* }"
18352
18353  # Input might be given as Windows format, start by converting to
18354  # unix format.
18355  new_path="$path"
18356
18357  windows_path="$new_path"
18358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18359    unix_path=`$CYGPATH -u "$windows_path"`
18360    new_path="$unix_path"
18361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18363    new_path="$unix_path"
18364  fi
18365
18366
18367  # Now try to locate executable using which
18368  new_path=`$WHICH "$new_path" 2> /dev/null`
18369
18370  if test "x$new_path" = x; then
18371    # Oops. Which didn't find the executable.
18372    # The splitting of arguments from the executable at a space might have been incorrect,
18373    # since paths with space are more likely in Windows. Give it another try with the whole
18374    # argument.
18375    path="$complete"
18376    arguments="EOL"
18377    new_path="$path"
18378
18379  windows_path="$new_path"
18380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381    unix_path=`$CYGPATH -u "$windows_path"`
18382    new_path="$unix_path"
18383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18385    new_path="$unix_path"
18386  fi
18387
18388
18389    new_path=`$WHICH "$new_path" 2> /dev/null`
18390
18391    if test "x$new_path" = x; then
18392      # It's still not found. Now this is an unrecoverable error.
18393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18394$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18395      has_space=`$ECHO "$complete" | $GREP " "`
18396      if test "x$has_space" != x; then
18397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18399      fi
18400      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18401    fi
18402  fi
18403
18404  # Now new_path has a complete unix path to the binary
18405  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18406    # Keep paths in /bin as-is, but remove trailing .exe if any
18407    new_path="${new_path/%.exe/}"
18408    # Do not save /bin paths to all_fixpath_prefixes!
18409  else
18410    # Not in mixed or Windows style, start by that.
18411    new_path=`cmd //c echo $new_path`
18412
18413  input_path="$new_path"
18414  # Check if we need to convert this using DOS-style short mode. If the path
18415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18416  # take no chances and rewrite it.
18417  # Note: m4 eats our [], so we need to use [ and ] instead.
18418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18419  if test "x$has_forbidden_chars" != x; then
18420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18422  fi
18423
18424    # Output is in $new_path
18425
18426  windows_path="$new_path"
18427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18428    unix_path=`$CYGPATH -u "$windows_path"`
18429    new_path="$unix_path"
18430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18432    new_path="$unix_path"
18433  fi
18434
18435    # remove trailing .exe if any
18436    new_path="${new_path/%.exe/}"
18437
18438    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18439    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18440  fi
18441
18442  else
18443    # We're on a posix platform. Hooray! :)
18444    # First separate the path from the arguments. This will split at the first
18445    # space.
18446    complete="$CC"
18447    path="${complete%% *}"
18448    tmp="$complete EOL"
18449    arguments="${tmp#* }"
18450
18451    # Cannot rely on the command "which" here since it doesn't always work.
18452    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18453    if test -z "$is_absolute_path"; then
18454      # Path to executable is not absolute. Find it.
18455      IFS_save="$IFS"
18456      IFS=:
18457      for p in $PATH; do
18458        if test -f "$p/$path" && test -x "$p/$path"; then
18459          new_path="$p/$path"
18460          break
18461        fi
18462      done
18463      IFS="$IFS_save"
18464    else
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18466$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18467      new_path="$path"
18468    fi
18469
18470    if test "x$new_path" = x; then
18471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18472$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18473        has_space=`$ECHO "$complete" | $GREP " "`
18474        if test "x$has_space" != x; then
18475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18477        fi
18478        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18479      fi
18480  fi
18481
18482      # Now join together the path and the arguments once again
18483      if test "x$arguments" != xEOL; then
18484        new_complete="$new_path ${arguments% *}"
18485      else
18486        new_complete="$new_path"
18487      fi
18488
18489  if test "x$complete" != "x$new_complete"; then
18490      CC="$new_complete"
18491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18492$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18493    fi
18494
18495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18496$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18497  TEST_COMPILER="$CC"
18498
18499    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18500        # Follow a chain of symbolic links. Use readlink
18501        # where it exists, else fall back to horribly
18502        # complicated shell code.
18503        if test "x$READLINK_TESTED" != yes; then
18504            # On MacOSX there is a readlink tool with a different
18505            # purpose than the GNU readlink tool. Check the found readlink.
18506            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18507            if test "x$ISGNU" = x; then
18508                 # A readlink that we do not know how to use.
18509                 # Are there other non-GNU readlinks out there?
18510                 READLINK_TESTED=yes
18511                 READLINK=
18512            fi
18513        fi
18514
18515        if test "x$READLINK" != x; then
18516            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18517        else
18518            # Save the current directory for restoring afterwards
18519            STARTDIR=$PWD
18520            COUNTER=0
18521            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18522            sym_link_file=`$BASENAME $TEST_COMPILER`
18523            # Use the system pwd and not the shell builtin to resolve directory symlinks
18524            cd $sym_link_dir
18525            cd `$THEPWDCMD`
18526            sym_link_dir=`$THEPWDCMD`
18527            # Resolve file symlinks
18528            while test $COUNTER -lt 20; do
18529                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18530                if test "x$ISLINK" == x; then
18531                    # This is not a symbolic link! We are done!
18532                    break
18533                fi
18534                # Again resolve directory symlinks since the target of the just found
18535                # link could be in a different directory
18536                cd `$DIRNAME $ISLINK`
18537                sym_link_dir=`$THEPWDCMD`
18538                sym_link_file=`$BASENAME $ISLINK`
18539                let COUNTER=COUNTER+1
18540            done
18541            cd $STARTDIR
18542            TEST_COMPILER=$sym_link_dir/$sym_link_file
18543        fi
18544    fi
18545
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18547$as_echo "$TEST_COMPILER" >&6; }
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18549$as_echo_n "checking if CC is disguised ccache... " >&6; }
18550
18551  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18552  if test "x$COMPILER_BASENAME" = "xccache"; then
18553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18554$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18555    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18556    # We want to control ccache invocation ourselves, so ignore this cc and try
18557    # searching again.
18558
18559    # Remove the path to the fake ccache cc from the PATH
18560    RETRY_COMPILER_SAVED_PATH="$PATH"
18561    COMPILER_DIRNAME=`$DIRNAME $CC`
18562    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18563
18564    # Try again looking for our compiler
18565    if test -n "$ac_tool_prefix"; then
18566  for ac_prog in $COMPILER_CHECK_LIST
18567  do
18568    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18569set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18571$as_echo_n "checking for $ac_word... " >&6; }
18572if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18573  $as_echo_n "(cached) " >&6
18574else
18575  if test -n "$PROPER_COMPILER_CC"; then
18576  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18577else
18578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18579for as_dir in $PATH
18580do
18581  IFS=$as_save_IFS
18582  test -z "$as_dir" && as_dir=.
18583    for ac_exec_ext in '' $ac_executable_extensions; do
18584  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18585    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18587    break 2
18588  fi
18589done
18590  done
18591IFS=$as_save_IFS
18592
18593fi
18594fi
18595PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18596if test -n "$PROPER_COMPILER_CC"; then
18597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18598$as_echo "$PROPER_COMPILER_CC" >&6; }
18599else
18600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18601$as_echo "no" >&6; }
18602fi
18603
18604
18605    test -n "$PROPER_COMPILER_CC" && break
18606  done
18607fi
18608if test -z "$PROPER_COMPILER_CC"; then
18609  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18610  for ac_prog in $COMPILER_CHECK_LIST
18611do
18612  # Extract the first word of "$ac_prog", so it can be a program name with args.
18613set dummy $ac_prog; ac_word=$2
18614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18615$as_echo_n "checking for $ac_word... " >&6; }
18616if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18617  $as_echo_n "(cached) " >&6
18618else
18619  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18620  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18621else
18622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18623for as_dir in $PATH
18624do
18625  IFS=$as_save_IFS
18626  test -z "$as_dir" && as_dir=.
18627    for ac_exec_ext in '' $ac_executable_extensions; do
18628  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18629    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18631    break 2
18632  fi
18633done
18634  done
18635IFS=$as_save_IFS
18636
18637fi
18638fi
18639ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18640if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18642$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18643else
18644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18645$as_echo "no" >&6; }
18646fi
18647
18648
18649  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18650done
18651
18652  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18653    PROPER_COMPILER_CC=""
18654  else
18655    case $cross_compiling:$ac_tool_warned in
18656yes:)
18657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18659ac_tool_warned=yes ;;
18660esac
18661    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18662  fi
18663fi
18664
18665
18666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18667
18668  # First separate the path from the arguments. This will split at the first
18669  # space.
18670  complete="$PROPER_COMPILER_CC"
18671  path="${complete%% *}"
18672  tmp="$complete EOL"
18673  arguments="${tmp#* }"
18674
18675  # Input might be given as Windows format, start by converting to
18676  # unix format.
18677  new_path=`$CYGPATH -u "$path"`
18678
18679  # Now try to locate executable using which
18680  new_path=`$WHICH "$new_path" 2> /dev/null`
18681  # bat and cmd files are not always considered executable in cygwin causing which
18682  # to not find them
18683  if test "x$new_path" = x \
18684           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18685           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18686    new_path=`$CYGPATH -u "$path"`
18687  fi
18688  if test "x$new_path" = x; then
18689    # Oops. Which didn't find the executable.
18690    # The splitting of arguments from the executable at a space might have been incorrect,
18691    # since paths with space are more likely in Windows. Give it another try with the whole
18692    # argument.
18693    path="$complete"
18694    arguments="EOL"
18695    new_path=`$CYGPATH -u "$path"`
18696    new_path=`$WHICH "$new_path" 2> /dev/null`
18697    # bat and cmd files are not always considered executable in cygwin causing which
18698    # to not find them
18699    if test "x$new_path" = x \
18700             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18701             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18702      new_path=`$CYGPATH -u "$path"`
18703    fi
18704    if test "x$new_path" = x; then
18705      # It's still not found. Now this is an unrecoverable error.
18706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18707$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18708      has_space=`$ECHO "$complete" | $GREP " "`
18709      if test "x$has_space" != x; then
18710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18712      fi
18713      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18714    fi
18715  fi
18716
18717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18720  # "foo.exe" is OK but "foo" is an error.
18721  #
18722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18723  # It is also a way to make sure we got the proper file name for the real test later on.
18724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18725  if test "x$test_shortpath" = x; then
18726    # Short path failed, file does not exist as specified.
18727    # Try adding .exe or .cmd
18728    if test -f "${new_path}.exe"; then
18729       input_to_shortpath="${new_path}.exe"
18730    elif test -f "${new_path}.cmd"; then
18731       input_to_shortpath="${new_path}.cmd"
18732    else
18733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18734$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18737      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18738    fi
18739  else
18740    input_to_shortpath="$new_path"
18741  fi
18742
18743  # Call helper function which possibly converts this using DOS-style short mode.
18744  # If so, the updated path is stored in $new_path.
18745  new_path="$input_to_shortpath"
18746
18747  input_path="$input_to_shortpath"
18748  # Check if we need to convert this using DOS-style short mode. If the path
18749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18750  # take no chances and rewrite it.
18751  # Note: m4 eats our [], so we need to use [ and ] instead.
18752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18753  if test "x$has_forbidden_chars" != x; then
18754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18758      # Going to short mode and back again did indeed matter. Since short mode is
18759      # case insensitive, let's make it lowercase to improve readability.
18760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18761      # Now convert it back to Unix-stile (cygpath)
18762      input_path=`$CYGPATH -u "$shortmode_path"`
18763      new_path="$input_path"
18764    fi
18765  fi
18766
18767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18768  if test "x$test_cygdrive_prefix" = x; then
18769    # As a simple fix, exclude /usr/bin since it's not a real path.
18770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18772      # a path prefixed by /cygdrive for fixpath to work.
18773      new_path="$CYGWIN_ROOT_PATH$input_path"
18774    fi
18775  fi
18776
18777  # remove trailing .exe if any
18778  new_path="${new_path/%.exe/}"
18779
18780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18781
18782  # First separate the path from the arguments. This will split at the first
18783  # space.
18784  complete="$PROPER_COMPILER_CC"
18785  path="${complete%% *}"
18786  tmp="$complete EOL"
18787  arguments="${tmp#* }"
18788
18789  # Input might be given as Windows format, start by converting to
18790  # unix format.
18791  new_path="$path"
18792
18793  windows_path="$new_path"
18794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18795    unix_path=`$CYGPATH -u "$windows_path"`
18796    new_path="$unix_path"
18797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18799    new_path="$unix_path"
18800  fi
18801
18802
18803  # Now try to locate executable using which
18804  new_path=`$WHICH "$new_path" 2> /dev/null`
18805
18806  if test "x$new_path" = x; then
18807    # Oops. Which didn't find the executable.
18808    # The splitting of arguments from the executable at a space might have been incorrect,
18809    # since paths with space are more likely in Windows. Give it another try with the whole
18810    # argument.
18811    path="$complete"
18812    arguments="EOL"
18813    new_path="$path"
18814
18815  windows_path="$new_path"
18816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18817    unix_path=`$CYGPATH -u "$windows_path"`
18818    new_path="$unix_path"
18819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18821    new_path="$unix_path"
18822  fi
18823
18824
18825    new_path=`$WHICH "$new_path" 2> /dev/null`
18826
18827    if test "x$new_path" = x; then
18828      # It's still not found. Now this is an unrecoverable error.
18829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18830$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18831      has_space=`$ECHO "$complete" | $GREP " "`
18832      if test "x$has_space" != x; then
18833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18835      fi
18836      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18837    fi
18838  fi
18839
18840  # Now new_path has a complete unix path to the binary
18841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18842    # Keep paths in /bin as-is, but remove trailing .exe if any
18843    new_path="${new_path/%.exe/}"
18844    # Do not save /bin paths to all_fixpath_prefixes!
18845  else
18846    # Not in mixed or Windows style, start by that.
18847    new_path=`cmd //c echo $new_path`
18848
18849  input_path="$new_path"
18850  # Check if we need to convert this using DOS-style short mode. If the path
18851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18852  # take no chances and rewrite it.
18853  # Note: m4 eats our [], so we need to use [ and ] instead.
18854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18855  if test "x$has_forbidden_chars" != x; then
18856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18858  fi
18859
18860    # Output is in $new_path
18861
18862  windows_path="$new_path"
18863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18864    unix_path=`$CYGPATH -u "$windows_path"`
18865    new_path="$unix_path"
18866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18868    new_path="$unix_path"
18869  fi
18870
18871    # remove trailing .exe if any
18872    new_path="${new_path/%.exe/}"
18873
18874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18876  fi
18877
18878  else
18879    # We're on a posix platform. Hooray! :)
18880    # First separate the path from the arguments. This will split at the first
18881    # space.
18882    complete="$PROPER_COMPILER_CC"
18883    path="${complete%% *}"
18884    tmp="$complete EOL"
18885    arguments="${tmp#* }"
18886
18887    # Cannot rely on the command "which" here since it doesn't always work.
18888    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18889    if test -z "$is_absolute_path"; then
18890      # Path to executable is not absolute. Find it.
18891      IFS_save="$IFS"
18892      IFS=:
18893      for p in $PATH; do
18894        if test -f "$p/$path" && test -x "$p/$path"; then
18895          new_path="$p/$path"
18896          break
18897        fi
18898      done
18899      IFS="$IFS_save"
18900    else
18901      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18902$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18903      new_path="$path"
18904    fi
18905
18906    if test "x$new_path" = x; then
18907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18908$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18909        has_space=`$ECHO "$complete" | $GREP " "`
18910        if test "x$has_space" != x; then
18911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18913        fi
18914        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18915      fi
18916  fi
18917
18918      # Now join together the path and the arguments once again
18919      if test "x$arguments" != xEOL; then
18920        new_complete="$new_path ${arguments% *}"
18921      else
18922        new_complete="$new_path"
18923      fi
18924
18925  if test "x$complete" != "x$new_complete"; then
18926      PROPER_COMPILER_CC="$new_complete"
18927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18928$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18929    fi
18930
18931    PATH="$RETRY_COMPILER_SAVED_PATH"
18932
18933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18934$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18935
18936    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18937        # Follow a chain of symbolic links. Use readlink
18938        # where it exists, else fall back to horribly
18939        # complicated shell code.
18940        if test "x$READLINK_TESTED" != yes; then
18941            # On MacOSX there is a readlink tool with a different
18942            # purpose than the GNU readlink tool. Check the found readlink.
18943            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18944            if test "x$ISGNU" = x; then
18945                 # A readlink that we do not know how to use.
18946                 # Are there other non-GNU readlinks out there?
18947                 READLINK_TESTED=yes
18948                 READLINK=
18949            fi
18950        fi
18951
18952        if test "x$READLINK" != x; then
18953            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18954        else
18955            # Save the current directory for restoring afterwards
18956            STARTDIR=$PWD
18957            COUNTER=0
18958            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18959            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18960            # Use the system pwd and not the shell builtin to resolve directory symlinks
18961            cd $sym_link_dir
18962            cd `$THEPWDCMD`
18963            sym_link_dir=`$THEPWDCMD`
18964            # Resolve file symlinks
18965            while test $COUNTER -lt 20; do
18966                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18967                if test "x$ISLINK" == x; then
18968                    # This is not a symbolic link! We are done!
18969                    break
18970                fi
18971                # Again resolve directory symlinks since the target of the just found
18972                # link could be in a different directory
18973                cd `$DIRNAME $ISLINK`
18974                sym_link_dir=`$THEPWDCMD`
18975                sym_link_file=`$BASENAME $ISLINK`
18976                let COUNTER=COUNTER+1
18977            done
18978            cd $STARTDIR
18979            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18980        fi
18981    fi
18982
18983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18984$as_echo "$PROPER_COMPILER_CC" >&6; }
18985    CC="$PROPER_COMPILER_CC"
18986  else
18987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18988$as_echo "no, keeping CC" >&6; }
18989    CC="$TEST_COMPILER"
18990  fi
18991
18992  COMPILER=$CC
18993  COMPILER_NAME=$COMPILER_NAME
18994
18995  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18996    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18997    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18998    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18999    if test $? -ne 0; then
19000      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19001
19002      { $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
19003$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19004      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19005$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19006      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19007    else
19008      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19009      COMPILER_VENDOR="Sun Studio"
19010    fi
19011  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19012    # First line typically looks something like:
19013    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19014    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19015    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19016    COMPILER_VENDOR="Microsoft CL.EXE"
19017    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19018    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19019      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19020        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19021      fi
19022    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19023      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19024        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19025      fi
19026    fi
19027  else
19028    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19029    # Check that this is likely to be GCC.
19030    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19031    if test $? -ne 0; then
19032      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19033$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19034      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19035$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19036      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19037    fi
19038
19039    # First line typically looks something like:
19040    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19041    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19042    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19043  fi
19044  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19045  CC_VERSION="$COMPILER_VERSION"
19046  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19047  CC_VENDOR="$COMPILER_VENDOR"
19048
19049  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19050$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19051
19052
19053# Now that we have resolved CC ourself, let autoconf have it's go at it
19054ac_ext=c
19055ac_cpp='$CPP $CPPFLAGS'
19056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19058ac_compiler_gnu=$ac_cv_c_compiler_gnu
19059if test -n "$ac_tool_prefix"; then
19060  for ac_prog in $CC
19061  do
19062    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19063set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19065$as_echo_n "checking for $ac_word... " >&6; }
19066if test "${ac_cv_prog_CC+set}" = set; then :
19067  $as_echo_n "(cached) " >&6
19068else
19069  if test -n "$CC"; then
19070  ac_cv_prog_CC="$CC" # Let the user override the test.
19071else
19072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19073for as_dir in $PATH
19074do
19075  IFS=$as_save_IFS
19076  test -z "$as_dir" && as_dir=.
19077    for ac_exec_ext in '' $ac_executable_extensions; do
19078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19079    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19081    break 2
19082  fi
19083done
19084  done
19085IFS=$as_save_IFS
19086
19087fi
19088fi
19089CC=$ac_cv_prog_CC
19090if test -n "$CC"; then
19091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19092$as_echo "$CC" >&6; }
19093else
19094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19095$as_echo "no" >&6; }
19096fi
19097
19098
19099    test -n "$CC" && break
19100  done
19101fi
19102if test -z "$CC"; then
19103  ac_ct_CC=$CC
19104  for ac_prog in $CC
19105do
19106  # Extract the first word of "$ac_prog", so it can be a program name with args.
19107set dummy $ac_prog; ac_word=$2
19108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19109$as_echo_n "checking for $ac_word... " >&6; }
19110if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19111  $as_echo_n "(cached) " >&6
19112else
19113  if test -n "$ac_ct_CC"; then
19114  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19115else
19116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19117for as_dir in $PATH
19118do
19119  IFS=$as_save_IFS
19120  test -z "$as_dir" && as_dir=.
19121    for ac_exec_ext in '' $ac_executable_extensions; do
19122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19123    ac_cv_prog_ac_ct_CC="$ac_prog"
19124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19125    break 2
19126  fi
19127done
19128  done
19129IFS=$as_save_IFS
19130
19131fi
19132fi
19133ac_ct_CC=$ac_cv_prog_ac_ct_CC
19134if test -n "$ac_ct_CC"; then
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19136$as_echo "$ac_ct_CC" >&6; }
19137else
19138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139$as_echo "no" >&6; }
19140fi
19141
19142
19143  test -n "$ac_ct_CC" && break
19144done
19145
19146  if test "x$ac_ct_CC" = x; then
19147    CC=""
19148  else
19149    case $cross_compiling:$ac_tool_warned in
19150yes:)
19151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19153ac_tool_warned=yes ;;
19154esac
19155    CC=$ac_ct_CC
19156  fi
19157fi
19158
19159
19160test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19162as_fn_error $? "no acceptable C compiler found in \$PATH
19163See \`config.log' for more details" "$LINENO" 5 ; }
19164
19165# Provide some information about the compiler.
19166$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19167set X $ac_compile
19168ac_compiler=$2
19169for ac_option in --version -v -V -qversion; do
19170  { { ac_try="$ac_compiler $ac_option >&5"
19171case "(($ac_try" in
19172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19173  *) ac_try_echo=$ac_try;;
19174esac
19175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19176$as_echo "$ac_try_echo"; } >&5
19177  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19178  ac_status=$?
19179  if test -s conftest.err; then
19180    sed '10a\
19181... rest of stderr output deleted ...
19182         10q' conftest.err >conftest.er1
19183    cat conftest.er1 >&5
19184  fi
19185  rm -f conftest.er1 conftest.err
19186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19187  test $ac_status = 0; }
19188done
19189
19190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19191/* end confdefs.h.  */
19192
19193int
19194main ()
19195{
19196
19197  ;
19198  return 0;
19199}
19200_ACEOF
19201ac_clean_files_save=$ac_clean_files
19202ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19203# Try to create an executable without -o first, disregard a.out.
19204# It will help us diagnose broken compilers, and finding out an intuition
19205# of exeext.
19206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19207$as_echo_n "checking whether the C compiler works... " >&6; }
19208ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19209
19210# The possible output files:
19211ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19212
19213ac_rmfiles=
19214for ac_file in $ac_files
19215do
19216  case $ac_file in
19217    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19218    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19219  esac
19220done
19221rm -f $ac_rmfiles
19222
19223if { { ac_try="$ac_link_default"
19224case "(($ac_try" in
19225  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19226  *) ac_try_echo=$ac_try;;
19227esac
19228eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19229$as_echo "$ac_try_echo"; } >&5
19230  (eval "$ac_link_default") 2>&5
19231  ac_status=$?
19232  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19233  test $ac_status = 0; }; then :
19234  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19235# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19236# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19237# so that the user can short-circuit this test for compilers unknown to
19238# Autoconf.
19239for ac_file in $ac_files ''
19240do
19241  test -f "$ac_file" || continue
19242  case $ac_file in
19243    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19244	;;
19245    [ab].out )
19246	# We found the default executable, but exeext='' is most
19247	# certainly right.
19248	break;;
19249    *.* )
19250	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19251	then :; else
19252	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19253	fi
19254	# We set ac_cv_exeext here because the later test for it is not
19255	# safe: cross compilers may not add the suffix if given an `-o'
19256	# argument, so we may need to know it at that point already.
19257	# Even if this section looks crufty: it has the advantage of
19258	# actually working.
19259	break;;
19260    * )
19261	break;;
19262  esac
19263done
19264test "$ac_cv_exeext" = no && ac_cv_exeext=
19265
19266else
19267  ac_file=''
19268fi
19269if test -z "$ac_file"; then :
19270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19271$as_echo "no" >&6; }
19272$as_echo "$as_me: failed program was:" >&5
19273sed 's/^/| /' conftest.$ac_ext >&5
19274
19275{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19277as_fn_error 77 "C compiler cannot create executables
19278See \`config.log' for more details" "$LINENO" 5 ; }
19279else
19280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19281$as_echo "yes" >&6; }
19282fi
19283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19284$as_echo_n "checking for C compiler default output file name... " >&6; }
19285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19286$as_echo "$ac_file" >&6; }
19287ac_exeext=$ac_cv_exeext
19288
19289rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19290ac_clean_files=$ac_clean_files_save
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19292$as_echo_n "checking for suffix of executables... " >&6; }
19293if { { ac_try="$ac_link"
19294case "(($ac_try" in
19295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19296  *) ac_try_echo=$ac_try;;
19297esac
19298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19299$as_echo "$ac_try_echo"; } >&5
19300  (eval "$ac_link") 2>&5
19301  ac_status=$?
19302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19303  test $ac_status = 0; }; then :
19304  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19305# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19306# work properly (i.e., refer to `conftest.exe'), while it won't with
19307# `rm'.
19308for ac_file in conftest.exe conftest conftest.*; do
19309  test -f "$ac_file" || continue
19310  case $ac_file in
19311    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19312    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19313	  break;;
19314    * ) break;;
19315  esac
19316done
19317else
19318  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19320as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19321See \`config.log' for more details" "$LINENO" 5 ; }
19322fi
19323rm -f conftest conftest$ac_cv_exeext
19324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19325$as_echo "$ac_cv_exeext" >&6; }
19326
19327rm -f conftest.$ac_ext
19328EXEEXT=$ac_cv_exeext
19329ac_exeext=$EXEEXT
19330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19331/* end confdefs.h.  */
19332#include <stdio.h>
19333int
19334main ()
19335{
19336FILE *f = fopen ("conftest.out", "w");
19337 return ferror (f) || fclose (f) != 0;
19338
19339  ;
19340  return 0;
19341}
19342_ACEOF
19343ac_clean_files="$ac_clean_files conftest.out"
19344# Check that the compiler produces executables we can run.  If not, either
19345# the compiler is broken, or we cross compile.
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19347$as_echo_n "checking whether we are cross compiling... " >&6; }
19348if test "$cross_compiling" != yes; then
19349  { { ac_try="$ac_link"
19350case "(($ac_try" in
19351  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19352  *) ac_try_echo=$ac_try;;
19353esac
19354eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19355$as_echo "$ac_try_echo"; } >&5
19356  (eval "$ac_link") 2>&5
19357  ac_status=$?
19358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19359  test $ac_status = 0; }
19360  if { ac_try='./conftest$ac_cv_exeext'
19361  { { case "(($ac_try" in
19362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19363  *) ac_try_echo=$ac_try;;
19364esac
19365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19366$as_echo "$ac_try_echo"; } >&5
19367  (eval "$ac_try") 2>&5
19368  ac_status=$?
19369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19370  test $ac_status = 0; }; }; then
19371    cross_compiling=no
19372  else
19373    if test "$cross_compiling" = maybe; then
19374	cross_compiling=yes
19375    else
19376	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19378as_fn_error $? "cannot run C compiled programs.
19379If you meant to cross compile, use \`--host'.
19380See \`config.log' for more details" "$LINENO" 5 ; }
19381    fi
19382  fi
19383fi
19384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19385$as_echo "$cross_compiling" >&6; }
19386
19387rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19388ac_clean_files=$ac_clean_files_save
19389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19390$as_echo_n "checking for suffix of object files... " >&6; }
19391if test "${ac_cv_objext+set}" = set; then :
19392  $as_echo_n "(cached) " >&6
19393else
19394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395/* end confdefs.h.  */
19396
19397int
19398main ()
19399{
19400
19401  ;
19402  return 0;
19403}
19404_ACEOF
19405rm -f conftest.o conftest.obj
19406if { { ac_try="$ac_compile"
19407case "(($ac_try" in
19408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19409  *) ac_try_echo=$ac_try;;
19410esac
19411eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19412$as_echo "$ac_try_echo"; } >&5
19413  (eval "$ac_compile") 2>&5
19414  ac_status=$?
19415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19416  test $ac_status = 0; }; then :
19417  for ac_file in conftest.o conftest.obj conftest.*; do
19418  test -f "$ac_file" || continue;
19419  case $ac_file in
19420    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19421    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19422       break;;
19423  esac
19424done
19425else
19426  $as_echo "$as_me: failed program was:" >&5
19427sed 's/^/| /' conftest.$ac_ext >&5
19428
19429{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19431as_fn_error $? "cannot compute suffix of object files: cannot compile
19432See \`config.log' for more details" "$LINENO" 5 ; }
19433fi
19434rm -f conftest.$ac_cv_objext conftest.$ac_ext
19435fi
19436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19437$as_echo "$ac_cv_objext" >&6; }
19438OBJEXT=$ac_cv_objext
19439ac_objext=$OBJEXT
19440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19441$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19442if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19443  $as_echo_n "(cached) " >&6
19444else
19445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19446/* end confdefs.h.  */
19447
19448int
19449main ()
19450{
19451#ifndef __GNUC__
19452       choke me
19453#endif
19454
19455  ;
19456  return 0;
19457}
19458_ACEOF
19459if ac_fn_c_try_compile "$LINENO"; then :
19460  ac_compiler_gnu=yes
19461else
19462  ac_compiler_gnu=no
19463fi
19464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19465ac_cv_c_compiler_gnu=$ac_compiler_gnu
19466
19467fi
19468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19469$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19470if test $ac_compiler_gnu = yes; then
19471  GCC=yes
19472else
19473  GCC=
19474fi
19475ac_test_CFLAGS=${CFLAGS+set}
19476ac_save_CFLAGS=$CFLAGS
19477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19478$as_echo_n "checking whether $CC accepts -g... " >&6; }
19479if test "${ac_cv_prog_cc_g+set}" = set; then :
19480  $as_echo_n "(cached) " >&6
19481else
19482  ac_save_c_werror_flag=$ac_c_werror_flag
19483   ac_c_werror_flag=yes
19484   ac_cv_prog_cc_g=no
19485   CFLAGS="-g"
19486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19487/* end confdefs.h.  */
19488
19489int
19490main ()
19491{
19492
19493  ;
19494  return 0;
19495}
19496_ACEOF
19497if ac_fn_c_try_compile "$LINENO"; then :
19498  ac_cv_prog_cc_g=yes
19499else
19500  CFLAGS=""
19501      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19502/* end confdefs.h.  */
19503
19504int
19505main ()
19506{
19507
19508  ;
19509  return 0;
19510}
19511_ACEOF
19512if ac_fn_c_try_compile "$LINENO"; then :
19513
19514else
19515  ac_c_werror_flag=$ac_save_c_werror_flag
19516	 CFLAGS="-g"
19517	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19518/* end confdefs.h.  */
19519
19520int
19521main ()
19522{
19523
19524  ;
19525  return 0;
19526}
19527_ACEOF
19528if ac_fn_c_try_compile "$LINENO"; then :
19529  ac_cv_prog_cc_g=yes
19530fi
19531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19532fi
19533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19534fi
19535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19536   ac_c_werror_flag=$ac_save_c_werror_flag
19537fi
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19539$as_echo "$ac_cv_prog_cc_g" >&6; }
19540if test "$ac_test_CFLAGS" = set; then
19541  CFLAGS=$ac_save_CFLAGS
19542elif test $ac_cv_prog_cc_g = yes; then
19543  if test "$GCC" = yes; then
19544    CFLAGS="-g -O2"
19545  else
19546    CFLAGS="-g"
19547  fi
19548else
19549  if test "$GCC" = yes; then
19550    CFLAGS="-O2"
19551  else
19552    CFLAGS=
19553  fi
19554fi
19555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19556$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19557if test "${ac_cv_prog_cc_c89+set}" = set; then :
19558  $as_echo_n "(cached) " >&6
19559else
19560  ac_cv_prog_cc_c89=no
19561ac_save_CC=$CC
19562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19563/* end confdefs.h.  */
19564#include <stdarg.h>
19565#include <stdio.h>
19566#include <sys/types.h>
19567#include <sys/stat.h>
19568/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19569struct buf { int x; };
19570FILE * (*rcsopen) (struct buf *, struct stat *, int);
19571static char *e (p, i)
19572     char **p;
19573     int i;
19574{
19575  return p[i];
19576}
19577static char *f (char * (*g) (char **, int), char **p, ...)
19578{
19579  char *s;
19580  va_list v;
19581  va_start (v,p);
19582  s = g (p, va_arg (v,int));
19583  va_end (v);
19584  return s;
19585}
19586
19587/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19588   function prototypes and stuff, but not '\xHH' hex character constants.
19589   These don't provoke an error unfortunately, instead are silently treated
19590   as 'x'.  The following induces an error, until -std is added to get
19591   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19592   array size at least.  It's necessary to write '\x00'==0 to get something
19593   that's true only with -std.  */
19594int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19595
19596/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19597   inside strings and character constants.  */
19598#define FOO(x) 'x'
19599int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19600
19601int test (int i, double x);
19602struct s1 {int (*f) (int a);};
19603struct s2 {int (*f) (double a);};
19604int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19605int argc;
19606char **argv;
19607int
19608main ()
19609{
19610return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19611  ;
19612  return 0;
19613}
19614_ACEOF
19615for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19616	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19617do
19618  CC="$ac_save_CC $ac_arg"
19619  if ac_fn_c_try_compile "$LINENO"; then :
19620  ac_cv_prog_cc_c89=$ac_arg
19621fi
19622rm -f core conftest.err conftest.$ac_objext
19623  test "x$ac_cv_prog_cc_c89" != "xno" && break
19624done
19625rm -f conftest.$ac_ext
19626CC=$ac_save_CC
19627
19628fi
19629# AC_CACHE_VAL
19630case "x$ac_cv_prog_cc_c89" in
19631  x)
19632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19633$as_echo "none needed" >&6; } ;;
19634  xno)
19635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19636$as_echo "unsupported" >&6; } ;;
19637  *)
19638    CC="$CC $ac_cv_prog_cc_c89"
19639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19640$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19641esac
19642if test "x$ac_cv_prog_cc_c89" != xno; then :
19643
19644fi
19645
19646ac_ext=cpp
19647ac_cpp='$CXXCPP $CPPFLAGS'
19648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19651
19652
19653### Locate C++ compiler (CXX)
19654
19655if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19656  # Do not probe for CC on MacOSX.
19657  COMPILER_CHECK_LIST="cl g++"
19658else
19659  COMPILER_CHECK_LIST="cl CC g++"
19660fi
19661
19662  COMPILER_NAME=C++
19663
19664  CXX=
19665  # If TOOLS_DIR is set, check for all compiler names in there first
19666  # before checking the rest of the PATH.
19667  if test -n "$TOOLS_DIR"; then
19668    PATH_save="$PATH"
19669    PATH="$TOOLS_DIR"
19670    for ac_prog in $COMPILER_CHECK_LIST
19671do
19672  # Extract the first word of "$ac_prog", so it can be a program name with args.
19673set dummy $ac_prog; ac_word=$2
19674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19675$as_echo_n "checking for $ac_word... " >&6; }
19676if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19677  $as_echo_n "(cached) " >&6
19678else
19679  case $TOOLS_DIR_CXX in
19680  [\\/]* | ?:[\\/]*)
19681  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19682  ;;
19683  *)
19684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19685for as_dir in $PATH
19686do
19687  IFS=$as_save_IFS
19688  test -z "$as_dir" && as_dir=.
19689    for ac_exec_ext in '' $ac_executable_extensions; do
19690  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19691    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19693    break 2
19694  fi
19695done
19696  done
19697IFS=$as_save_IFS
19698
19699  ;;
19700esac
19701fi
19702TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19703if test -n "$TOOLS_DIR_CXX"; then
19704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19705$as_echo "$TOOLS_DIR_CXX" >&6; }
19706else
19707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19708$as_echo "no" >&6; }
19709fi
19710
19711
19712  test -n "$TOOLS_DIR_CXX" && break
19713done
19714
19715    CXX=$TOOLS_DIR_CXX
19716    PATH="$PATH_save"
19717  fi
19718
19719  # AC_PATH_PROGS can't be run multiple times with the same variable,
19720  # so create a new name for this run.
19721  if test "x$CXX" = x; then
19722    for ac_prog in $COMPILER_CHECK_LIST
19723do
19724  # Extract the first word of "$ac_prog", so it can be a program name with args.
19725set dummy $ac_prog; ac_word=$2
19726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19727$as_echo_n "checking for $ac_word... " >&6; }
19728if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19729  $as_echo_n "(cached) " >&6
19730else
19731  case $POTENTIAL_CXX in
19732  [\\/]* | ?:[\\/]*)
19733  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19734  ;;
19735  *)
19736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19737for as_dir in $PATH
19738do
19739  IFS=$as_save_IFS
19740  test -z "$as_dir" && as_dir=.
19741    for ac_exec_ext in '' $ac_executable_extensions; do
19742  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19743    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19745    break 2
19746  fi
19747done
19748  done
19749IFS=$as_save_IFS
19750
19751  ;;
19752esac
19753fi
19754POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19755if test -n "$POTENTIAL_CXX"; then
19756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19757$as_echo "$POTENTIAL_CXX" >&6; }
19758else
19759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19760$as_echo "no" >&6; }
19761fi
19762
19763
19764  test -n "$POTENTIAL_CXX" && break
19765done
19766
19767    CXX=$POTENTIAL_CXX
19768  fi
19769
19770  if test "x$CXX" = x; then
19771
19772    # Print a helpful message on how to acquire the necessary build dependency.
19773    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19774    MISSING_DEPENDENCY=devkit
19775    PKGHANDLER_COMMAND=
19776
19777    case $PKGHANDLER in
19778	apt-get)
19779                apt_help     $MISSING_DEPENDENCY ;;
19780    yum)
19781                yum_help     $MISSING_DEPENDENCY ;;
19782	port)
19783                port_help    $MISSING_DEPENDENCY ;;
19784	pkgutil)
19785                pkgutil_help $MISSING_DEPENDENCY ;;
19786	pkgadd)
19787                pkgadd_help  $MISSING_DEPENDENCY ;;
19788    * )
19789      break ;;
19790    esac
19791
19792    if test "x$PKGHANDLER_COMMAND" != x; then
19793        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19794    fi
19795
19796      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19797  fi
19798
19799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19800
19801  # First separate the path from the arguments. This will split at the first
19802  # space.
19803  complete="$CXX"
19804  path="${complete%% *}"
19805  tmp="$complete EOL"
19806  arguments="${tmp#* }"
19807
19808  # Input might be given as Windows format, start by converting to
19809  # unix format.
19810  new_path=`$CYGPATH -u "$path"`
19811
19812  # Now try to locate executable using which
19813  new_path=`$WHICH "$new_path" 2> /dev/null`
19814  # bat and cmd files are not always considered executable in cygwin causing which
19815  # to not find them
19816  if test "x$new_path" = x \
19817           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19818           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19819    new_path=`$CYGPATH -u "$path"`
19820  fi
19821  if test "x$new_path" = x; then
19822    # Oops. Which didn't find the executable.
19823    # The splitting of arguments from the executable at a space might have been incorrect,
19824    # since paths with space are more likely in Windows. Give it another try with the whole
19825    # argument.
19826    path="$complete"
19827    arguments="EOL"
19828    new_path=`$CYGPATH -u "$path"`
19829    new_path=`$WHICH "$new_path" 2> /dev/null`
19830    # bat and cmd files are not always considered executable in cygwin causing which
19831    # to not find them
19832    if test "x$new_path" = x \
19833             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19834             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19835      new_path=`$CYGPATH -u "$path"`
19836    fi
19837    if test "x$new_path" = x; then
19838      # It's still not found. Now this is an unrecoverable error.
19839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19840$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19841      has_space=`$ECHO "$complete" | $GREP " "`
19842      if test "x$has_space" != x; then
19843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19845      fi
19846      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19847    fi
19848  fi
19849
19850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19853  # "foo.exe" is OK but "foo" is an error.
19854  #
19855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19856  # It is also a way to make sure we got the proper file name for the real test later on.
19857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19858  if test "x$test_shortpath" = x; then
19859    # Short path failed, file does not exist as specified.
19860    # Try adding .exe or .cmd
19861    if test -f "${new_path}.exe"; then
19862       input_to_shortpath="${new_path}.exe"
19863    elif test -f "${new_path}.cmd"; then
19864       input_to_shortpath="${new_path}.cmd"
19865    else
19866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19867$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19870      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19871    fi
19872  else
19873    input_to_shortpath="$new_path"
19874  fi
19875
19876  # Call helper function which possibly converts this using DOS-style short mode.
19877  # If so, the updated path is stored in $new_path.
19878  new_path="$input_to_shortpath"
19879
19880  input_path="$input_to_shortpath"
19881  # Check if we need to convert this using DOS-style short mode. If the path
19882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19883  # take no chances and rewrite it.
19884  # Note: m4 eats our [], so we need to use [ and ] instead.
19885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19886  if test "x$has_forbidden_chars" != x; then
19887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19891      # Going to short mode and back again did indeed matter. Since short mode is
19892      # case insensitive, let's make it lowercase to improve readability.
19893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19894      # Now convert it back to Unix-stile (cygpath)
19895      input_path=`$CYGPATH -u "$shortmode_path"`
19896      new_path="$input_path"
19897    fi
19898  fi
19899
19900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19901  if test "x$test_cygdrive_prefix" = x; then
19902    # As a simple fix, exclude /usr/bin since it's not a real path.
19903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19905      # a path prefixed by /cygdrive for fixpath to work.
19906      new_path="$CYGWIN_ROOT_PATH$input_path"
19907    fi
19908  fi
19909
19910  # remove trailing .exe if any
19911  new_path="${new_path/%.exe/}"
19912
19913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19914
19915  # First separate the path from the arguments. This will split at the first
19916  # space.
19917  complete="$CXX"
19918  path="${complete%% *}"
19919  tmp="$complete EOL"
19920  arguments="${tmp#* }"
19921
19922  # Input might be given as Windows format, start by converting to
19923  # unix format.
19924  new_path="$path"
19925
19926  windows_path="$new_path"
19927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19928    unix_path=`$CYGPATH -u "$windows_path"`
19929    new_path="$unix_path"
19930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19932    new_path="$unix_path"
19933  fi
19934
19935
19936  # Now try to locate executable using which
19937  new_path=`$WHICH "$new_path" 2> /dev/null`
19938
19939  if test "x$new_path" = x; then
19940    # Oops. Which didn't find the executable.
19941    # The splitting of arguments from the executable at a space might have been incorrect,
19942    # since paths with space are more likely in Windows. Give it another try with the whole
19943    # argument.
19944    path="$complete"
19945    arguments="EOL"
19946    new_path="$path"
19947
19948  windows_path="$new_path"
19949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19950    unix_path=`$CYGPATH -u "$windows_path"`
19951    new_path="$unix_path"
19952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19954    new_path="$unix_path"
19955  fi
19956
19957
19958    new_path=`$WHICH "$new_path" 2> /dev/null`
19959
19960    if test "x$new_path" = x; then
19961      # It's still not found. Now this is an unrecoverable error.
19962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19963$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19964      has_space=`$ECHO "$complete" | $GREP " "`
19965      if test "x$has_space" != x; then
19966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19968      fi
19969      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19970    fi
19971  fi
19972
19973  # Now new_path has a complete unix path to the binary
19974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19975    # Keep paths in /bin as-is, but remove trailing .exe if any
19976    new_path="${new_path/%.exe/}"
19977    # Do not save /bin paths to all_fixpath_prefixes!
19978  else
19979    # Not in mixed or Windows style, start by that.
19980    new_path=`cmd //c echo $new_path`
19981
19982  input_path="$new_path"
19983  # Check if we need to convert this using DOS-style short mode. If the path
19984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19985  # take no chances and rewrite it.
19986  # Note: m4 eats our [], so we need to use [ and ] instead.
19987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19988  if test "x$has_forbidden_chars" != x; then
19989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19991  fi
19992
19993    # Output is in $new_path
19994
19995  windows_path="$new_path"
19996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19997    unix_path=`$CYGPATH -u "$windows_path"`
19998    new_path="$unix_path"
19999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20001    new_path="$unix_path"
20002  fi
20003
20004    # remove trailing .exe if any
20005    new_path="${new_path/%.exe/}"
20006
20007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20009  fi
20010
20011  else
20012    # We're on a posix platform. Hooray! :)
20013    # First separate the path from the arguments. This will split at the first
20014    # space.
20015    complete="$CXX"
20016    path="${complete%% *}"
20017    tmp="$complete EOL"
20018    arguments="${tmp#* }"
20019
20020    # Cannot rely on the command "which" here since it doesn't always work.
20021    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20022    if test -z "$is_absolute_path"; then
20023      # Path to executable is not absolute. Find it.
20024      IFS_save="$IFS"
20025      IFS=:
20026      for p in $PATH; do
20027        if test -f "$p/$path" && test -x "$p/$path"; then
20028          new_path="$p/$path"
20029          break
20030        fi
20031      done
20032      IFS="$IFS_save"
20033    else
20034      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20035$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20036      new_path="$path"
20037    fi
20038
20039    if test "x$new_path" = x; then
20040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20041$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20042        has_space=`$ECHO "$complete" | $GREP " "`
20043        if test "x$has_space" != x; then
20044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20046        fi
20047        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20048      fi
20049  fi
20050
20051      # Now join together the path and the arguments once again
20052      if test "x$arguments" != xEOL; then
20053        new_complete="$new_path ${arguments% *}"
20054      else
20055        new_complete="$new_path"
20056      fi
20057
20058  if test "x$complete" != "x$new_complete"; then
20059      CXX="$new_complete"
20060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20061$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20062    fi
20063
20064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20065$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20066  TEST_COMPILER="$CXX"
20067
20068    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20069        # Follow a chain of symbolic links. Use readlink
20070        # where it exists, else fall back to horribly
20071        # complicated shell code.
20072        if test "x$READLINK_TESTED" != yes; then
20073            # On MacOSX there is a readlink tool with a different
20074            # purpose than the GNU readlink tool. Check the found readlink.
20075            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20076            if test "x$ISGNU" = x; then
20077                 # A readlink that we do not know how to use.
20078                 # Are there other non-GNU readlinks out there?
20079                 READLINK_TESTED=yes
20080                 READLINK=
20081            fi
20082        fi
20083
20084        if test "x$READLINK" != x; then
20085            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20086        else
20087            # Save the current directory for restoring afterwards
20088            STARTDIR=$PWD
20089            COUNTER=0
20090            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20091            sym_link_file=`$BASENAME $TEST_COMPILER`
20092            # Use the system pwd and not the shell builtin to resolve directory symlinks
20093            cd $sym_link_dir
20094            cd `$THEPWDCMD`
20095            sym_link_dir=`$THEPWDCMD`
20096            # Resolve file symlinks
20097            while test $COUNTER -lt 20; do
20098                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20099                if test "x$ISLINK" == x; then
20100                    # This is not a symbolic link! We are done!
20101                    break
20102                fi
20103                # Again resolve directory symlinks since the target of the just found
20104                # link could be in a different directory
20105                cd `$DIRNAME $ISLINK`
20106                sym_link_dir=`$THEPWDCMD`
20107                sym_link_file=`$BASENAME $ISLINK`
20108                let COUNTER=COUNTER+1
20109            done
20110            cd $STARTDIR
20111            TEST_COMPILER=$sym_link_dir/$sym_link_file
20112        fi
20113    fi
20114
20115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20116$as_echo "$TEST_COMPILER" >&6; }
20117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20118$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20119
20120  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20121  if test "x$COMPILER_BASENAME" = "xccache"; then
20122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20123$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20124    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20125    # We want to control ccache invocation ourselves, so ignore this cc and try
20126    # searching again.
20127
20128    # Remove the path to the fake ccache cc from the PATH
20129    RETRY_COMPILER_SAVED_PATH="$PATH"
20130    COMPILER_DIRNAME=`$DIRNAME $CXX`
20131    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20132
20133    # Try again looking for our compiler
20134    if test -n "$ac_tool_prefix"; then
20135  for ac_prog in $COMPILER_CHECK_LIST
20136  do
20137    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20138set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20140$as_echo_n "checking for $ac_word... " >&6; }
20141if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20142  $as_echo_n "(cached) " >&6
20143else
20144  if test -n "$PROPER_COMPILER_CXX"; then
20145  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20146else
20147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20148for as_dir in $PATH
20149do
20150  IFS=$as_save_IFS
20151  test -z "$as_dir" && as_dir=.
20152    for ac_exec_ext in '' $ac_executable_extensions; do
20153  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20154    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20156    break 2
20157  fi
20158done
20159  done
20160IFS=$as_save_IFS
20161
20162fi
20163fi
20164PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20165if test -n "$PROPER_COMPILER_CXX"; then
20166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20167$as_echo "$PROPER_COMPILER_CXX" >&6; }
20168else
20169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20170$as_echo "no" >&6; }
20171fi
20172
20173
20174    test -n "$PROPER_COMPILER_CXX" && break
20175  done
20176fi
20177if test -z "$PROPER_COMPILER_CXX"; then
20178  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20179  for ac_prog in $COMPILER_CHECK_LIST
20180do
20181  # Extract the first word of "$ac_prog", so it can be a program name with args.
20182set dummy $ac_prog; ac_word=$2
20183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20184$as_echo_n "checking for $ac_word... " >&6; }
20185if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20186  $as_echo_n "(cached) " >&6
20187else
20188  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20189  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20190else
20191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20192for as_dir in $PATH
20193do
20194  IFS=$as_save_IFS
20195  test -z "$as_dir" && as_dir=.
20196    for ac_exec_ext in '' $ac_executable_extensions; do
20197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20198    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20200    break 2
20201  fi
20202done
20203  done
20204IFS=$as_save_IFS
20205
20206fi
20207fi
20208ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20209if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20211$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20212else
20213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20214$as_echo "no" >&6; }
20215fi
20216
20217
20218  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20219done
20220
20221  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20222    PROPER_COMPILER_CXX=""
20223  else
20224    case $cross_compiling:$ac_tool_warned in
20225yes:)
20226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20228ac_tool_warned=yes ;;
20229esac
20230    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20231  fi
20232fi
20233
20234
20235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20236
20237  # First separate the path from the arguments. This will split at the first
20238  # space.
20239  complete="$PROPER_COMPILER_CXX"
20240  path="${complete%% *}"
20241  tmp="$complete EOL"
20242  arguments="${tmp#* }"
20243
20244  # Input might be given as Windows format, start by converting to
20245  # unix format.
20246  new_path=`$CYGPATH -u "$path"`
20247
20248  # Now try to locate executable using which
20249  new_path=`$WHICH "$new_path" 2> /dev/null`
20250  # bat and cmd files are not always considered executable in cygwin causing which
20251  # to not find them
20252  if test "x$new_path" = x \
20253           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20254           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20255    new_path=`$CYGPATH -u "$path"`
20256  fi
20257  if test "x$new_path" = x; then
20258    # Oops. Which didn't find the executable.
20259    # The splitting of arguments from the executable at a space might have been incorrect,
20260    # since paths with space are more likely in Windows. Give it another try with the whole
20261    # argument.
20262    path="$complete"
20263    arguments="EOL"
20264    new_path=`$CYGPATH -u "$path"`
20265    new_path=`$WHICH "$new_path" 2> /dev/null`
20266    # bat and cmd files are not always considered executable in cygwin causing which
20267    # to not find them
20268    if test "x$new_path" = x \
20269             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20270             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20271      new_path=`$CYGPATH -u "$path"`
20272    fi
20273    if test "x$new_path" = x; then
20274      # It's still not found. Now this is an unrecoverable error.
20275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20276$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20277      has_space=`$ECHO "$complete" | $GREP " "`
20278      if test "x$has_space" != x; then
20279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20281      fi
20282      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20283    fi
20284  fi
20285
20286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20289  # "foo.exe" is OK but "foo" is an error.
20290  #
20291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20292  # It is also a way to make sure we got the proper file name for the real test later on.
20293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20294  if test "x$test_shortpath" = x; then
20295    # Short path failed, file does not exist as specified.
20296    # Try adding .exe or .cmd
20297    if test -f "${new_path}.exe"; then
20298       input_to_shortpath="${new_path}.exe"
20299    elif test -f "${new_path}.cmd"; then
20300       input_to_shortpath="${new_path}.cmd"
20301    else
20302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20303$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20306      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20307    fi
20308  else
20309    input_to_shortpath="$new_path"
20310  fi
20311
20312  # Call helper function which possibly converts this using DOS-style short mode.
20313  # If so, the updated path is stored in $new_path.
20314  new_path="$input_to_shortpath"
20315
20316  input_path="$input_to_shortpath"
20317  # Check if we need to convert this using DOS-style short mode. If the path
20318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20319  # take no chances and rewrite it.
20320  # Note: m4 eats our [], so we need to use [ and ] instead.
20321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20322  if test "x$has_forbidden_chars" != x; then
20323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20327      # Going to short mode and back again did indeed matter. Since short mode is
20328      # case insensitive, let's make it lowercase to improve readability.
20329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20330      # Now convert it back to Unix-stile (cygpath)
20331      input_path=`$CYGPATH -u "$shortmode_path"`
20332      new_path="$input_path"
20333    fi
20334  fi
20335
20336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20337  if test "x$test_cygdrive_prefix" = x; then
20338    # As a simple fix, exclude /usr/bin since it's not a real path.
20339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20341      # a path prefixed by /cygdrive for fixpath to work.
20342      new_path="$CYGWIN_ROOT_PATH$input_path"
20343    fi
20344  fi
20345
20346  # remove trailing .exe if any
20347  new_path="${new_path/%.exe/}"
20348
20349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20350
20351  # First separate the path from the arguments. This will split at the first
20352  # space.
20353  complete="$PROPER_COMPILER_CXX"
20354  path="${complete%% *}"
20355  tmp="$complete EOL"
20356  arguments="${tmp#* }"
20357
20358  # Input might be given as Windows format, start by converting to
20359  # unix format.
20360  new_path="$path"
20361
20362  windows_path="$new_path"
20363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20364    unix_path=`$CYGPATH -u "$windows_path"`
20365    new_path="$unix_path"
20366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20368    new_path="$unix_path"
20369  fi
20370
20371
20372  # Now try to locate executable using which
20373  new_path=`$WHICH "$new_path" 2> /dev/null`
20374
20375  if test "x$new_path" = x; then
20376    # Oops. Which didn't find the executable.
20377    # The splitting of arguments from the executable at a space might have been incorrect,
20378    # since paths with space are more likely in Windows. Give it another try with the whole
20379    # argument.
20380    path="$complete"
20381    arguments="EOL"
20382    new_path="$path"
20383
20384  windows_path="$new_path"
20385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20386    unix_path=`$CYGPATH -u "$windows_path"`
20387    new_path="$unix_path"
20388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20390    new_path="$unix_path"
20391  fi
20392
20393
20394    new_path=`$WHICH "$new_path" 2> /dev/null`
20395
20396    if test "x$new_path" = x; then
20397      # It's still not found. Now this is an unrecoverable error.
20398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20399$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20400      has_space=`$ECHO "$complete" | $GREP " "`
20401      if test "x$has_space" != x; then
20402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20404      fi
20405      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20406    fi
20407  fi
20408
20409  # Now new_path has a complete unix path to the binary
20410  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20411    # Keep paths in /bin as-is, but remove trailing .exe if any
20412    new_path="${new_path/%.exe/}"
20413    # Do not save /bin paths to all_fixpath_prefixes!
20414  else
20415    # Not in mixed or Windows style, start by that.
20416    new_path=`cmd //c echo $new_path`
20417
20418  input_path="$new_path"
20419  # Check if we need to convert this using DOS-style short mode. If the path
20420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20421  # take no chances and rewrite it.
20422  # Note: m4 eats our [], so we need to use [ and ] instead.
20423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20424  if test "x$has_forbidden_chars" != x; then
20425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20427  fi
20428
20429    # Output is in $new_path
20430
20431  windows_path="$new_path"
20432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20433    unix_path=`$CYGPATH -u "$windows_path"`
20434    new_path="$unix_path"
20435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20437    new_path="$unix_path"
20438  fi
20439
20440    # remove trailing .exe if any
20441    new_path="${new_path/%.exe/}"
20442
20443    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20444    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20445  fi
20446
20447  else
20448    # We're on a posix platform. Hooray! :)
20449    # First separate the path from the arguments. This will split at the first
20450    # space.
20451    complete="$PROPER_COMPILER_CXX"
20452    path="${complete%% *}"
20453    tmp="$complete EOL"
20454    arguments="${tmp#* }"
20455
20456    # Cannot rely on the command "which" here since it doesn't always work.
20457    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20458    if test -z "$is_absolute_path"; then
20459      # Path to executable is not absolute. Find it.
20460      IFS_save="$IFS"
20461      IFS=:
20462      for p in $PATH; do
20463        if test -f "$p/$path" && test -x "$p/$path"; then
20464          new_path="$p/$path"
20465          break
20466        fi
20467      done
20468      IFS="$IFS_save"
20469    else
20470      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20471$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20472      new_path="$path"
20473    fi
20474
20475    if test "x$new_path" = x; then
20476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20477$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20478        has_space=`$ECHO "$complete" | $GREP " "`
20479        if test "x$has_space" != x; then
20480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20482        fi
20483        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20484      fi
20485  fi
20486
20487      # Now join together the path and the arguments once again
20488      if test "x$arguments" != xEOL; then
20489        new_complete="$new_path ${arguments% *}"
20490      else
20491        new_complete="$new_path"
20492      fi
20493
20494  if test "x$complete" != "x$new_complete"; then
20495      PROPER_COMPILER_CXX="$new_complete"
20496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20497$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20498    fi
20499
20500    PATH="$RETRY_COMPILER_SAVED_PATH"
20501
20502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20503$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20504
20505    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20506        # Follow a chain of symbolic links. Use readlink
20507        # where it exists, else fall back to horribly
20508        # complicated shell code.
20509        if test "x$READLINK_TESTED" != yes; then
20510            # On MacOSX there is a readlink tool with a different
20511            # purpose than the GNU readlink tool. Check the found readlink.
20512            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20513            if test "x$ISGNU" = x; then
20514                 # A readlink that we do not know how to use.
20515                 # Are there other non-GNU readlinks out there?
20516                 READLINK_TESTED=yes
20517                 READLINK=
20518            fi
20519        fi
20520
20521        if test "x$READLINK" != x; then
20522            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20523        else
20524            # Save the current directory for restoring afterwards
20525            STARTDIR=$PWD
20526            COUNTER=0
20527            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20528            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20529            # Use the system pwd and not the shell builtin to resolve directory symlinks
20530            cd $sym_link_dir
20531            cd `$THEPWDCMD`
20532            sym_link_dir=`$THEPWDCMD`
20533            # Resolve file symlinks
20534            while test $COUNTER -lt 20; do
20535                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20536                if test "x$ISLINK" == x; then
20537                    # This is not a symbolic link! We are done!
20538                    break
20539                fi
20540                # Again resolve directory symlinks since the target of the just found
20541                # link could be in a different directory
20542                cd `$DIRNAME $ISLINK`
20543                sym_link_dir=`$THEPWDCMD`
20544                sym_link_file=`$BASENAME $ISLINK`
20545                let COUNTER=COUNTER+1
20546            done
20547            cd $STARTDIR
20548            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20549        fi
20550    fi
20551
20552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20553$as_echo "$PROPER_COMPILER_CXX" >&6; }
20554    CXX="$PROPER_COMPILER_CXX"
20555  else
20556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20557$as_echo "no, keeping CXX" >&6; }
20558    CXX="$TEST_COMPILER"
20559  fi
20560
20561  COMPILER=$CXX
20562  COMPILER_NAME=$COMPILER_NAME
20563
20564  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20565    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20566    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20567    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20568    if test $? -ne 0; then
20569      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20570
20571      { $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
20572$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20573      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20574$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20575      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20576    else
20577      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20578      COMPILER_VENDOR="Sun Studio"
20579    fi
20580  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20581    # First line typically looks something like:
20582    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20583    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20584    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20585    COMPILER_VENDOR="Microsoft CL.EXE"
20586    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20587    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20588      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20589        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20590      fi
20591    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20592      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20593        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20594      fi
20595    fi
20596  else
20597    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20598    # Check that this is likely to be GCC.
20599    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20600    if test $? -ne 0; then
20601      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20602$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20603      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20604$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20605      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20606    fi
20607
20608    # First line typically looks something like:
20609    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20610    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20611    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20612  fi
20613  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20614  CXX_VERSION="$COMPILER_VERSION"
20615  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20616  CXX_VENDOR="$COMPILER_VENDOR"
20617
20618  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20619$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20620
20621
20622# Now that we have resolved CXX ourself, let autoconf have it's go at it
20623ac_ext=cpp
20624ac_cpp='$CXXCPP $CPPFLAGS'
20625ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20626ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20627ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20628if test -z "$CXX"; then
20629  if test -n "$CCC"; then
20630    CXX=$CCC
20631  else
20632    if test -n "$ac_tool_prefix"; then
20633  for ac_prog in $CXX
20634  do
20635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20638$as_echo_n "checking for $ac_word... " >&6; }
20639if test "${ac_cv_prog_CXX+set}" = set; then :
20640  $as_echo_n "(cached) " >&6
20641else
20642  if test -n "$CXX"; then
20643  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20644else
20645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20646for as_dir in $PATH
20647do
20648  IFS=$as_save_IFS
20649  test -z "$as_dir" && as_dir=.
20650    for ac_exec_ext in '' $ac_executable_extensions; do
20651  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20652    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20654    break 2
20655  fi
20656done
20657  done
20658IFS=$as_save_IFS
20659
20660fi
20661fi
20662CXX=$ac_cv_prog_CXX
20663if test -n "$CXX"; then
20664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20665$as_echo "$CXX" >&6; }
20666else
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20668$as_echo "no" >&6; }
20669fi
20670
20671
20672    test -n "$CXX" && break
20673  done
20674fi
20675if test -z "$CXX"; then
20676  ac_ct_CXX=$CXX
20677  for ac_prog in $CXX
20678do
20679  # Extract the first word of "$ac_prog", so it can be a program name with args.
20680set dummy $ac_prog; ac_word=$2
20681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20682$as_echo_n "checking for $ac_word... " >&6; }
20683if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20684  $as_echo_n "(cached) " >&6
20685else
20686  if test -n "$ac_ct_CXX"; then
20687  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20688else
20689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20690for as_dir in $PATH
20691do
20692  IFS=$as_save_IFS
20693  test -z "$as_dir" && as_dir=.
20694    for ac_exec_ext in '' $ac_executable_extensions; do
20695  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20696    ac_cv_prog_ac_ct_CXX="$ac_prog"
20697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20698    break 2
20699  fi
20700done
20701  done
20702IFS=$as_save_IFS
20703
20704fi
20705fi
20706ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20707if test -n "$ac_ct_CXX"; then
20708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20709$as_echo "$ac_ct_CXX" >&6; }
20710else
20711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20712$as_echo "no" >&6; }
20713fi
20714
20715
20716  test -n "$ac_ct_CXX" && break
20717done
20718
20719  if test "x$ac_ct_CXX" = x; then
20720    CXX="g++"
20721  else
20722    case $cross_compiling:$ac_tool_warned in
20723yes:)
20724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20726ac_tool_warned=yes ;;
20727esac
20728    CXX=$ac_ct_CXX
20729  fi
20730fi
20731
20732  fi
20733fi
20734# Provide some information about the compiler.
20735$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20736set X $ac_compile
20737ac_compiler=$2
20738for ac_option in --version -v -V -qversion; do
20739  { { ac_try="$ac_compiler $ac_option >&5"
20740case "(($ac_try" in
20741  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20742  *) ac_try_echo=$ac_try;;
20743esac
20744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20745$as_echo "$ac_try_echo"; } >&5
20746  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20747  ac_status=$?
20748  if test -s conftest.err; then
20749    sed '10a\
20750... rest of stderr output deleted ...
20751         10q' conftest.err >conftest.er1
20752    cat conftest.er1 >&5
20753  fi
20754  rm -f conftest.er1 conftest.err
20755  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20756  test $ac_status = 0; }
20757done
20758
20759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20760$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20761if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20762  $as_echo_n "(cached) " >&6
20763else
20764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20765/* end confdefs.h.  */
20766
20767int
20768main ()
20769{
20770#ifndef __GNUC__
20771       choke me
20772#endif
20773
20774  ;
20775  return 0;
20776}
20777_ACEOF
20778if ac_fn_cxx_try_compile "$LINENO"; then :
20779  ac_compiler_gnu=yes
20780else
20781  ac_compiler_gnu=no
20782fi
20783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20784ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20785
20786fi
20787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20788$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20789if test $ac_compiler_gnu = yes; then
20790  GXX=yes
20791else
20792  GXX=
20793fi
20794ac_test_CXXFLAGS=${CXXFLAGS+set}
20795ac_save_CXXFLAGS=$CXXFLAGS
20796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20797$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20798if test "${ac_cv_prog_cxx_g+set}" = set; then :
20799  $as_echo_n "(cached) " >&6
20800else
20801  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20802   ac_cxx_werror_flag=yes
20803   ac_cv_prog_cxx_g=no
20804   CXXFLAGS="-g"
20805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20806/* end confdefs.h.  */
20807
20808int
20809main ()
20810{
20811
20812  ;
20813  return 0;
20814}
20815_ACEOF
20816if ac_fn_cxx_try_compile "$LINENO"; then :
20817  ac_cv_prog_cxx_g=yes
20818else
20819  CXXFLAGS=""
20820      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20821/* end confdefs.h.  */
20822
20823int
20824main ()
20825{
20826
20827  ;
20828  return 0;
20829}
20830_ACEOF
20831if ac_fn_cxx_try_compile "$LINENO"; then :
20832
20833else
20834  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20835	 CXXFLAGS="-g"
20836	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20837/* end confdefs.h.  */
20838
20839int
20840main ()
20841{
20842
20843  ;
20844  return 0;
20845}
20846_ACEOF
20847if ac_fn_cxx_try_compile "$LINENO"; then :
20848  ac_cv_prog_cxx_g=yes
20849fi
20850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20851fi
20852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20853fi
20854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20855   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20856fi
20857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20858$as_echo "$ac_cv_prog_cxx_g" >&6; }
20859if test "$ac_test_CXXFLAGS" = set; then
20860  CXXFLAGS=$ac_save_CXXFLAGS
20861elif test $ac_cv_prog_cxx_g = yes; then
20862  if test "$GXX" = yes; then
20863    CXXFLAGS="-g -O2"
20864  else
20865    CXXFLAGS="-g"
20866  fi
20867else
20868  if test "$GXX" = yes; then
20869    CXXFLAGS="-O2"
20870  else
20871    CXXFLAGS=
20872  fi
20873fi
20874ac_ext=cpp
20875ac_cpp='$CXXCPP $CPPFLAGS'
20876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20879
20880
20881### Locate other tools
20882
20883if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20884    ac_ext=m
20885ac_cpp='$OBJCPP $CPPFLAGS'
20886ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20887ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20888ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20889if test -n "$ac_tool_prefix"; then
20890  for ac_prog in gcc objcc objc cc CC
20891  do
20892    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20893set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20895$as_echo_n "checking for $ac_word... " >&6; }
20896if test "${ac_cv_prog_OBJC+set}" = set; then :
20897  $as_echo_n "(cached) " >&6
20898else
20899  if test -n "$OBJC"; then
20900  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20901else
20902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20903for as_dir in $PATH
20904do
20905  IFS=$as_save_IFS
20906  test -z "$as_dir" && as_dir=.
20907    for ac_exec_ext in '' $ac_executable_extensions; do
20908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20909    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20911    break 2
20912  fi
20913done
20914  done
20915IFS=$as_save_IFS
20916
20917fi
20918fi
20919OBJC=$ac_cv_prog_OBJC
20920if test -n "$OBJC"; then
20921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20922$as_echo "$OBJC" >&6; }
20923else
20924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20925$as_echo "no" >&6; }
20926fi
20927
20928
20929    test -n "$OBJC" && break
20930  done
20931fi
20932if test -z "$OBJC"; then
20933  ac_ct_OBJC=$OBJC
20934  for ac_prog in gcc objcc objc cc CC
20935do
20936  # Extract the first word of "$ac_prog", so it can be a program name with args.
20937set dummy $ac_prog; ac_word=$2
20938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20939$as_echo_n "checking for $ac_word... " >&6; }
20940if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20941  $as_echo_n "(cached) " >&6
20942else
20943  if test -n "$ac_ct_OBJC"; then
20944  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20945else
20946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20947for as_dir in $PATH
20948do
20949  IFS=$as_save_IFS
20950  test -z "$as_dir" && as_dir=.
20951    for ac_exec_ext in '' $ac_executable_extensions; do
20952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20953    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20955    break 2
20956  fi
20957done
20958  done
20959IFS=$as_save_IFS
20960
20961fi
20962fi
20963ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20964if test -n "$ac_ct_OBJC"; then
20965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20966$as_echo "$ac_ct_OBJC" >&6; }
20967else
20968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20969$as_echo "no" >&6; }
20970fi
20971
20972
20973  test -n "$ac_ct_OBJC" && break
20974done
20975
20976  if test "x$ac_ct_OBJC" = x; then
20977    OBJC="gcc"
20978  else
20979    case $cross_compiling:$ac_tool_warned in
20980yes:)
20981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20983ac_tool_warned=yes ;;
20984esac
20985    OBJC=$ac_ct_OBJC
20986  fi
20987fi
20988
20989# Provide some information about the compiler.
20990$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20991set X $ac_compile
20992ac_compiler=$2
20993for ac_option in --version -v -V -qversion; do
20994  { { ac_try="$ac_compiler $ac_option >&5"
20995case "(($ac_try" in
20996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20997  *) ac_try_echo=$ac_try;;
20998esac
20999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21000$as_echo "$ac_try_echo"; } >&5
21001  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21002  ac_status=$?
21003  if test -s conftest.err; then
21004    sed '10a\
21005... rest of stderr output deleted ...
21006         10q' conftest.err >conftest.er1
21007    cat conftest.er1 >&5
21008  fi
21009  rm -f conftest.er1 conftest.err
21010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21011  test $ac_status = 0; }
21012done
21013
21014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21015$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21016if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21017  $as_echo_n "(cached) " >&6
21018else
21019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21020/* end confdefs.h.  */
21021
21022int
21023main ()
21024{
21025#ifndef __GNUC__
21026       choke me
21027#endif
21028
21029  ;
21030  return 0;
21031}
21032_ACEOF
21033if ac_fn_objc_try_compile "$LINENO"; then :
21034  ac_compiler_gnu=yes
21035else
21036  ac_compiler_gnu=no
21037fi
21038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21039ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21040
21041fi
21042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21043$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21044if test $ac_compiler_gnu = yes; then
21045  GOBJC=yes
21046else
21047  GOBJC=
21048fi
21049ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21050ac_save_OBJCFLAGS=$OBJCFLAGS
21051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21052$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21053if test "${ac_cv_prog_objc_g+set}" = set; then :
21054  $as_echo_n "(cached) " >&6
21055else
21056  ac_save_objc_werror_flag=$ac_objc_werror_flag
21057   ac_objc_werror_flag=yes
21058   ac_cv_prog_objc_g=no
21059   OBJCFLAGS="-g"
21060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21061/* end confdefs.h.  */
21062
21063int
21064main ()
21065{
21066
21067  ;
21068  return 0;
21069}
21070_ACEOF
21071if ac_fn_objc_try_compile "$LINENO"; then :
21072  ac_cv_prog_objc_g=yes
21073else
21074  OBJCFLAGS=""
21075      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21076/* end confdefs.h.  */
21077
21078int
21079main ()
21080{
21081
21082  ;
21083  return 0;
21084}
21085_ACEOF
21086if ac_fn_objc_try_compile "$LINENO"; then :
21087
21088else
21089  ac_objc_werror_flag=$ac_save_objc_werror_flag
21090	 OBJCFLAGS="-g"
21091	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21092/* end confdefs.h.  */
21093
21094int
21095main ()
21096{
21097
21098  ;
21099  return 0;
21100}
21101_ACEOF
21102if ac_fn_objc_try_compile "$LINENO"; then :
21103  ac_cv_prog_objc_g=yes
21104fi
21105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21106fi
21107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21108fi
21109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21110   ac_objc_werror_flag=$ac_save_objc_werror_flag
21111fi
21112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21113$as_echo "$ac_cv_prog_objc_g" >&6; }
21114if test "$ac_test_OBJCFLAGS" = set; then
21115  OBJCFLAGS=$ac_save_OBJCFLAGS
21116elif test $ac_cv_prog_objc_g = yes; then
21117  if test "$GOBJC" = yes; then
21118    OBJCFLAGS="-g -O2"
21119  else
21120    OBJCFLAGS="-g"
21121  fi
21122else
21123  if test "$GOBJC" = yes; then
21124    OBJCFLAGS="-O2"
21125  else
21126    OBJCFLAGS=
21127  fi
21128fi
21129ac_ext=cpp
21130ac_cpp='$CXXCPP $CPPFLAGS'
21131ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21132ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21133ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21134
21135
21136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21137
21138  # First separate the path from the arguments. This will split at the first
21139  # space.
21140  complete="$OBJC"
21141  path="${complete%% *}"
21142  tmp="$complete EOL"
21143  arguments="${tmp#* }"
21144
21145  # Input might be given as Windows format, start by converting to
21146  # unix format.
21147  new_path=`$CYGPATH -u "$path"`
21148
21149  # Now try to locate executable using which
21150  new_path=`$WHICH "$new_path" 2> /dev/null`
21151  # bat and cmd files are not always considered executable in cygwin causing which
21152  # to not find them
21153  if test "x$new_path" = x \
21154           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21155           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21156    new_path=`$CYGPATH -u "$path"`
21157  fi
21158  if test "x$new_path" = x; then
21159    # Oops. Which didn't find the executable.
21160    # The splitting of arguments from the executable at a space might have been incorrect,
21161    # since paths with space are more likely in Windows. Give it another try with the whole
21162    # argument.
21163    path="$complete"
21164    arguments="EOL"
21165    new_path=`$CYGPATH -u "$path"`
21166    new_path=`$WHICH "$new_path" 2> /dev/null`
21167    # bat and cmd files are not always considered executable in cygwin causing which
21168    # to not find them
21169    if test "x$new_path" = x \
21170             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21171             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21172      new_path=`$CYGPATH -u "$path"`
21173    fi
21174    if test "x$new_path" = x; then
21175      # It's still not found. Now this is an unrecoverable error.
21176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21177$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21178      has_space=`$ECHO "$complete" | $GREP " "`
21179      if test "x$has_space" != x; then
21180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21182      fi
21183      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21184    fi
21185  fi
21186
21187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21190  # "foo.exe" is OK but "foo" is an error.
21191  #
21192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21193  # It is also a way to make sure we got the proper file name for the real test later on.
21194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21195  if test "x$test_shortpath" = x; then
21196    # Short path failed, file does not exist as specified.
21197    # Try adding .exe or .cmd
21198    if test -f "${new_path}.exe"; then
21199       input_to_shortpath="${new_path}.exe"
21200    elif test -f "${new_path}.cmd"; then
21201       input_to_shortpath="${new_path}.cmd"
21202    else
21203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21204$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21205      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21206$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21207      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21208    fi
21209  else
21210    input_to_shortpath="$new_path"
21211  fi
21212
21213  # Call helper function which possibly converts this using DOS-style short mode.
21214  # If so, the updated path is stored in $new_path.
21215  new_path="$input_to_shortpath"
21216
21217  input_path="$input_to_shortpath"
21218  # Check if we need to convert this using DOS-style short mode. If the path
21219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21220  # take no chances and rewrite it.
21221  # Note: m4 eats our [], so we need to use [ and ] instead.
21222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21223  if test "x$has_forbidden_chars" != x; then
21224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21228      # Going to short mode and back again did indeed matter. Since short mode is
21229      # case insensitive, let's make it lowercase to improve readability.
21230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21231      # Now convert it back to Unix-stile (cygpath)
21232      input_path=`$CYGPATH -u "$shortmode_path"`
21233      new_path="$input_path"
21234    fi
21235  fi
21236
21237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21238  if test "x$test_cygdrive_prefix" = x; then
21239    # As a simple fix, exclude /usr/bin since it's not a real path.
21240    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21242      # a path prefixed by /cygdrive for fixpath to work.
21243      new_path="$CYGWIN_ROOT_PATH$input_path"
21244    fi
21245  fi
21246
21247  # remove trailing .exe if any
21248  new_path="${new_path/%.exe/}"
21249
21250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21251
21252  # First separate the path from the arguments. This will split at the first
21253  # space.
21254  complete="$OBJC"
21255  path="${complete%% *}"
21256  tmp="$complete EOL"
21257  arguments="${tmp#* }"
21258
21259  # Input might be given as Windows format, start by converting to
21260  # unix format.
21261  new_path="$path"
21262
21263  windows_path="$new_path"
21264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21265    unix_path=`$CYGPATH -u "$windows_path"`
21266    new_path="$unix_path"
21267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21269    new_path="$unix_path"
21270  fi
21271
21272
21273  # Now try to locate executable using which
21274  new_path=`$WHICH "$new_path" 2> /dev/null`
21275
21276  if test "x$new_path" = x; then
21277    # Oops. Which didn't find the executable.
21278    # The splitting of arguments from the executable at a space might have been incorrect,
21279    # since paths with space are more likely in Windows. Give it another try with the whole
21280    # argument.
21281    path="$complete"
21282    arguments="EOL"
21283    new_path="$path"
21284
21285  windows_path="$new_path"
21286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21287    unix_path=`$CYGPATH -u "$windows_path"`
21288    new_path="$unix_path"
21289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21291    new_path="$unix_path"
21292  fi
21293
21294
21295    new_path=`$WHICH "$new_path" 2> /dev/null`
21296
21297    if test "x$new_path" = x; then
21298      # It's still not found. Now this is an unrecoverable error.
21299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21300$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21301      has_space=`$ECHO "$complete" | $GREP " "`
21302      if test "x$has_space" != x; then
21303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21305      fi
21306      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21307    fi
21308  fi
21309
21310  # Now new_path has a complete unix path to the binary
21311  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21312    # Keep paths in /bin as-is, but remove trailing .exe if any
21313    new_path="${new_path/%.exe/}"
21314    # Do not save /bin paths to all_fixpath_prefixes!
21315  else
21316    # Not in mixed or Windows style, start by that.
21317    new_path=`cmd //c echo $new_path`
21318
21319  input_path="$new_path"
21320  # Check if we need to convert this using DOS-style short mode. If the path
21321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21322  # take no chances and rewrite it.
21323  # Note: m4 eats our [], so we need to use [ and ] instead.
21324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21325  if test "x$has_forbidden_chars" != x; then
21326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21328  fi
21329
21330    # Output is in $new_path
21331
21332  windows_path="$new_path"
21333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21334    unix_path=`$CYGPATH -u "$windows_path"`
21335    new_path="$unix_path"
21336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21338    new_path="$unix_path"
21339  fi
21340
21341    # remove trailing .exe if any
21342    new_path="${new_path/%.exe/}"
21343
21344    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21345    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21346  fi
21347
21348  else
21349    # We're on a posix platform. Hooray! :)
21350    # First separate the path from the arguments. This will split at the first
21351    # space.
21352    complete="$OBJC"
21353    path="${complete%% *}"
21354    tmp="$complete EOL"
21355    arguments="${tmp#* }"
21356
21357    # Cannot rely on the command "which" here since it doesn't always work.
21358    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21359    if test -z "$is_absolute_path"; then
21360      # Path to executable is not absolute. Find it.
21361      IFS_save="$IFS"
21362      IFS=:
21363      for p in $PATH; do
21364        if test -f "$p/$path" && test -x "$p/$path"; then
21365          new_path="$p/$path"
21366          break
21367        fi
21368      done
21369      IFS="$IFS_save"
21370    else
21371      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21372$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21373      new_path="$path"
21374    fi
21375
21376    if test "x$new_path" = x; then
21377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21378$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21379        has_space=`$ECHO "$complete" | $GREP " "`
21380        if test "x$has_space" != x; then
21381          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21382$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21383        fi
21384        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21385      fi
21386  fi
21387
21388      # Now join together the path and the arguments once again
21389      if test "x$arguments" != xEOL; then
21390        new_complete="$new_path ${arguments% *}"
21391      else
21392        new_complete="$new_path"
21393      fi
21394
21395  if test "x$complete" != "x$new_complete"; then
21396      OBJC="$new_complete"
21397      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21398$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21399    fi
21400
21401else
21402    OBJC=
21403fi
21404
21405# Restore the flags to the user specified values.
21406# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21407CFLAGS="$ORG_CFLAGS"
21408CXXFLAGS="$ORG_CXXFLAGS"
21409OBJCFLAGS="$ORG_OBJCFLAGS"
21410
21411LD="$CC"
21412LDEXE="$CC"
21413LDCXX="$CXX"
21414LDEXECXX="$CXX"
21415
21416# LDEXE is the linker to use, when creating executables.
21417
21418# Linking C++ libraries.
21419
21420# Linking C++ executables.
21421
21422
21423if test "x$OPENJDK_TARGET_OS" != xwindows; then
21424    if test -n "$ac_tool_prefix"; then
21425  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21426set dummy ${ac_tool_prefix}ar; ac_word=$2
21427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21428$as_echo_n "checking for $ac_word... " >&6; }
21429if test "${ac_cv_prog_AR+set}" = set; then :
21430  $as_echo_n "(cached) " >&6
21431else
21432  if test -n "$AR"; then
21433  ac_cv_prog_AR="$AR" # Let the user override the test.
21434else
21435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21436for as_dir in $PATH
21437do
21438  IFS=$as_save_IFS
21439  test -z "$as_dir" && as_dir=.
21440    for ac_exec_ext in '' $ac_executable_extensions; do
21441  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21442    ac_cv_prog_AR="${ac_tool_prefix}ar"
21443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21444    break 2
21445  fi
21446done
21447  done
21448IFS=$as_save_IFS
21449
21450fi
21451fi
21452AR=$ac_cv_prog_AR
21453if test -n "$AR"; then
21454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21455$as_echo "$AR" >&6; }
21456else
21457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21458$as_echo "no" >&6; }
21459fi
21460
21461
21462fi
21463if test -z "$ac_cv_prog_AR"; then
21464  ac_ct_AR=$AR
21465  # Extract the first word of "ar", so it can be a program name with args.
21466set dummy ar; ac_word=$2
21467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21468$as_echo_n "checking for $ac_word... " >&6; }
21469if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21470  $as_echo_n "(cached) " >&6
21471else
21472  if test -n "$ac_ct_AR"; then
21473  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21474else
21475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21476for as_dir in $PATH
21477do
21478  IFS=$as_save_IFS
21479  test -z "$as_dir" && as_dir=.
21480    for ac_exec_ext in '' $ac_executable_extensions; do
21481  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21482    ac_cv_prog_ac_ct_AR="ar"
21483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21484    break 2
21485  fi
21486done
21487  done
21488IFS=$as_save_IFS
21489
21490fi
21491fi
21492ac_ct_AR=$ac_cv_prog_ac_ct_AR
21493if test -n "$ac_ct_AR"; then
21494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21495$as_echo "$ac_ct_AR" >&6; }
21496else
21497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21498$as_echo "no" >&6; }
21499fi
21500
21501  if test "x$ac_ct_AR" = x; then
21502    AR=""
21503  else
21504    case $cross_compiling:$ac_tool_warned in
21505yes:)
21506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21508ac_tool_warned=yes ;;
21509esac
21510    AR=$ac_ct_AR
21511  fi
21512else
21513  AR="$ac_cv_prog_AR"
21514fi
21515
21516
21517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21518
21519  # First separate the path from the arguments. This will split at the first
21520  # space.
21521  complete="$AR"
21522  path="${complete%% *}"
21523  tmp="$complete EOL"
21524  arguments="${tmp#* }"
21525
21526  # Input might be given as Windows format, start by converting to
21527  # unix format.
21528  new_path=`$CYGPATH -u "$path"`
21529
21530  # Now try to locate executable using which
21531  new_path=`$WHICH "$new_path" 2> /dev/null`
21532  # bat and cmd files are not always considered executable in cygwin causing which
21533  # to not find them
21534  if test "x$new_path" = x \
21535           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21536           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21537    new_path=`$CYGPATH -u "$path"`
21538  fi
21539  if test "x$new_path" = x; then
21540    # Oops. Which didn't find the executable.
21541    # The splitting of arguments from the executable at a space might have been incorrect,
21542    # since paths with space are more likely in Windows. Give it another try with the whole
21543    # argument.
21544    path="$complete"
21545    arguments="EOL"
21546    new_path=`$CYGPATH -u "$path"`
21547    new_path=`$WHICH "$new_path" 2> /dev/null`
21548    # bat and cmd files are not always considered executable in cygwin causing which
21549    # to not find them
21550    if test "x$new_path" = x \
21551             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21552             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21553      new_path=`$CYGPATH -u "$path"`
21554    fi
21555    if test "x$new_path" = x; then
21556      # It's still not found. Now this is an unrecoverable error.
21557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21558$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21559      has_space=`$ECHO "$complete" | $GREP " "`
21560      if test "x$has_space" != x; then
21561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21563      fi
21564      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21565    fi
21566  fi
21567
21568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21571  # "foo.exe" is OK but "foo" is an error.
21572  #
21573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21574  # It is also a way to make sure we got the proper file name for the real test later on.
21575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21576  if test "x$test_shortpath" = x; then
21577    # Short path failed, file does not exist as specified.
21578    # Try adding .exe or .cmd
21579    if test -f "${new_path}.exe"; then
21580       input_to_shortpath="${new_path}.exe"
21581    elif test -f "${new_path}.cmd"; then
21582       input_to_shortpath="${new_path}.cmd"
21583    else
21584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21585$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21586      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21587$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21588      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21589    fi
21590  else
21591    input_to_shortpath="$new_path"
21592  fi
21593
21594  # Call helper function which possibly converts this using DOS-style short mode.
21595  # If so, the updated path is stored in $new_path.
21596  new_path="$input_to_shortpath"
21597
21598  input_path="$input_to_shortpath"
21599  # Check if we need to convert this using DOS-style short mode. If the path
21600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21601  # take no chances and rewrite it.
21602  # Note: m4 eats our [], so we need to use [ and ] instead.
21603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21604  if test "x$has_forbidden_chars" != x; then
21605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21609      # Going to short mode and back again did indeed matter. Since short mode is
21610      # case insensitive, let's make it lowercase to improve readability.
21611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21612      # Now convert it back to Unix-stile (cygpath)
21613      input_path=`$CYGPATH -u "$shortmode_path"`
21614      new_path="$input_path"
21615    fi
21616  fi
21617
21618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21619  if test "x$test_cygdrive_prefix" = x; then
21620    # As a simple fix, exclude /usr/bin since it's not a real path.
21621    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21623      # a path prefixed by /cygdrive for fixpath to work.
21624      new_path="$CYGWIN_ROOT_PATH$input_path"
21625    fi
21626  fi
21627
21628  # remove trailing .exe if any
21629  new_path="${new_path/%.exe/}"
21630
21631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21632
21633  # First separate the path from the arguments. This will split at the first
21634  # space.
21635  complete="$AR"
21636  path="${complete%% *}"
21637  tmp="$complete EOL"
21638  arguments="${tmp#* }"
21639
21640  # Input might be given as Windows format, start by converting to
21641  # unix format.
21642  new_path="$path"
21643
21644  windows_path="$new_path"
21645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21646    unix_path=`$CYGPATH -u "$windows_path"`
21647    new_path="$unix_path"
21648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21650    new_path="$unix_path"
21651  fi
21652
21653
21654  # Now try to locate executable using which
21655  new_path=`$WHICH "$new_path" 2> /dev/null`
21656
21657  if test "x$new_path" = x; then
21658    # Oops. Which didn't find the executable.
21659    # The splitting of arguments from the executable at a space might have been incorrect,
21660    # since paths with space are more likely in Windows. Give it another try with the whole
21661    # argument.
21662    path="$complete"
21663    arguments="EOL"
21664    new_path="$path"
21665
21666  windows_path="$new_path"
21667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21668    unix_path=`$CYGPATH -u "$windows_path"`
21669    new_path="$unix_path"
21670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21672    new_path="$unix_path"
21673  fi
21674
21675
21676    new_path=`$WHICH "$new_path" 2> /dev/null`
21677
21678    if test "x$new_path" = x; then
21679      # It's still not found. Now this is an unrecoverable error.
21680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21681$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21682      has_space=`$ECHO "$complete" | $GREP " "`
21683      if test "x$has_space" != x; then
21684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21686      fi
21687      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21688    fi
21689  fi
21690
21691  # Now new_path has a complete unix path to the binary
21692  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21693    # Keep paths in /bin as-is, but remove trailing .exe if any
21694    new_path="${new_path/%.exe/}"
21695    # Do not save /bin paths to all_fixpath_prefixes!
21696  else
21697    # Not in mixed or Windows style, start by that.
21698    new_path=`cmd //c echo $new_path`
21699
21700  input_path="$new_path"
21701  # Check if we need to convert this using DOS-style short mode. If the path
21702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21703  # take no chances and rewrite it.
21704  # Note: m4 eats our [], so we need to use [ and ] instead.
21705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21706  if test "x$has_forbidden_chars" != x; then
21707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21709  fi
21710
21711    # Output is in $new_path
21712
21713  windows_path="$new_path"
21714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21715    unix_path=`$CYGPATH -u "$windows_path"`
21716    new_path="$unix_path"
21717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21719    new_path="$unix_path"
21720  fi
21721
21722    # remove trailing .exe if any
21723    new_path="${new_path/%.exe/}"
21724
21725    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21726    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21727  fi
21728
21729  else
21730    # We're on a posix platform. Hooray! :)
21731    # First separate the path from the arguments. This will split at the first
21732    # space.
21733    complete="$AR"
21734    path="${complete%% *}"
21735    tmp="$complete EOL"
21736    arguments="${tmp#* }"
21737
21738    # Cannot rely on the command "which" here since it doesn't always work.
21739    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21740    if test -z "$is_absolute_path"; then
21741      # Path to executable is not absolute. Find it.
21742      IFS_save="$IFS"
21743      IFS=:
21744      for p in $PATH; do
21745        if test -f "$p/$path" && test -x "$p/$path"; then
21746          new_path="$p/$path"
21747          break
21748        fi
21749      done
21750      IFS="$IFS_save"
21751    else
21752      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21753$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21754      new_path="$path"
21755    fi
21756
21757    if test "x$new_path" = x; then
21758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21759$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21760        has_space=`$ECHO "$complete" | $GREP " "`
21761        if test "x$has_space" != x; then
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21763$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21764        fi
21765        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21766      fi
21767  fi
21768
21769      # Now join together the path and the arguments once again
21770      if test "x$arguments" != xEOL; then
21771        new_complete="$new_path ${arguments% *}"
21772      else
21773        new_complete="$new_path"
21774      fi
21775
21776  if test "x$complete" != "x$new_complete"; then
21777      AR="$new_complete"
21778      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21779$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21780    fi
21781
21782fi
21783if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21784    ARFLAGS="-r"
21785else
21786    ARFLAGS=""
21787fi
21788
21789
21790# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21791HOTSPOT_CXX="$CXX"
21792HOTSPOT_LD="$LD"
21793
21794
21795
21796COMPILER_NAME=gcc
21797COMPILER_TYPE=CC
21798if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21799
21800    # For now, assume that we are always compiling using cl.exe.
21801    CC_OUT_OPTION=-Fo
21802    EXE_OUT_OPTION=-out:
21803    LD_OUT_OPTION=-out:
21804    AR_OUT_OPTION=-out:
21805    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21806    # program for something completely different.
21807    # Extract the first word of "link", so it can be a program name with args.
21808set dummy link; ac_word=$2
21809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21810$as_echo_n "checking for $ac_word... " >&6; }
21811if test "${ac_cv_prog_WINLD+set}" = set; then :
21812  $as_echo_n "(cached) " >&6
21813else
21814  if test -n "$WINLD"; then
21815  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21816else
21817  ac_prog_rejected=no
21818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21819for as_dir in $PATH
21820do
21821  IFS=$as_save_IFS
21822  test -z "$as_dir" && as_dir=.
21823    for ac_exec_ext in '' $ac_executable_extensions; do
21824  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21825    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21826       ac_prog_rejected=yes
21827       continue
21828     fi
21829    ac_cv_prog_WINLD="link"
21830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21831    break 2
21832  fi
21833done
21834  done
21835IFS=$as_save_IFS
21836
21837if test $ac_prog_rejected = yes; then
21838  # We found a bogon in the path, so make sure we never use it.
21839  set dummy $ac_cv_prog_WINLD
21840  shift
21841  if test $# != 0; then
21842    # We chose a different compiler from the bogus one.
21843    # However, it has the same basename, so the bogon will be chosen
21844    # first if we set WINLD to just the basename; use the full file name.
21845    shift
21846    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21847  fi
21848fi
21849fi
21850fi
21851WINLD=$ac_cv_prog_WINLD
21852if test -n "$WINLD"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21854$as_echo "$WINLD" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861    # Since we must ignore the first found link, WINLD will contain
21862    # the full path to the link.exe program.
21863
21864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21865
21866  # First separate the path from the arguments. This will split at the first
21867  # space.
21868  complete="$WINLD"
21869  path="${complete%% *}"
21870  tmp="$complete EOL"
21871  arguments="${tmp#* }"
21872
21873  # Input might be given as Windows format, start by converting to
21874  # unix format.
21875  new_path=`$CYGPATH -u "$path"`
21876
21877  # Now try to locate executable using which
21878  new_path=`$WHICH "$new_path" 2> /dev/null`
21879  # bat and cmd files are not always considered executable in cygwin causing which
21880  # to not find them
21881  if test "x$new_path" = x \
21882           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21883           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21884    new_path=`$CYGPATH -u "$path"`
21885  fi
21886  if test "x$new_path" = x; then
21887    # Oops. Which didn't find the executable.
21888    # The splitting of arguments from the executable at a space might have been incorrect,
21889    # since paths with space are more likely in Windows. Give it another try with the whole
21890    # argument.
21891    path="$complete"
21892    arguments="EOL"
21893    new_path=`$CYGPATH -u "$path"`
21894    new_path=`$WHICH "$new_path" 2> /dev/null`
21895    # bat and cmd files are not always considered executable in cygwin causing which
21896    # to not find them
21897    if test "x$new_path" = x \
21898             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21899             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21900      new_path=`$CYGPATH -u "$path"`
21901    fi
21902    if test "x$new_path" = x; then
21903      # It's still not found. Now this is an unrecoverable error.
21904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21905$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21906      has_space=`$ECHO "$complete" | $GREP " "`
21907      if test "x$has_space" != x; then
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21910      fi
21911      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21912    fi
21913  fi
21914
21915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21918  # "foo.exe" is OK but "foo" is an error.
21919  #
21920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21921  # It is also a way to make sure we got the proper file name for the real test later on.
21922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21923  if test "x$test_shortpath" = x; then
21924    # Short path failed, file does not exist as specified.
21925    # Try adding .exe or .cmd
21926    if test -f "${new_path}.exe"; then
21927       input_to_shortpath="${new_path}.exe"
21928    elif test -f "${new_path}.cmd"; then
21929       input_to_shortpath="${new_path}.cmd"
21930    else
21931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21932$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21935      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21936    fi
21937  else
21938    input_to_shortpath="$new_path"
21939  fi
21940
21941  # Call helper function which possibly converts this using DOS-style short mode.
21942  # If so, the updated path is stored in $new_path.
21943  new_path="$input_to_shortpath"
21944
21945  input_path="$input_to_shortpath"
21946  # Check if we need to convert this using DOS-style short mode. If the path
21947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21948  # take no chances and rewrite it.
21949  # Note: m4 eats our [], so we need to use [ and ] instead.
21950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21951  if test "x$has_forbidden_chars" != x; then
21952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21956      # Going to short mode and back again did indeed matter. Since short mode is
21957      # case insensitive, let's make it lowercase to improve readability.
21958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21959      # Now convert it back to Unix-stile (cygpath)
21960      input_path=`$CYGPATH -u "$shortmode_path"`
21961      new_path="$input_path"
21962    fi
21963  fi
21964
21965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21966  if test "x$test_cygdrive_prefix" = x; then
21967    # As a simple fix, exclude /usr/bin since it's not a real path.
21968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21970      # a path prefixed by /cygdrive for fixpath to work.
21971      new_path="$CYGWIN_ROOT_PATH$input_path"
21972    fi
21973  fi
21974
21975  # remove trailing .exe if any
21976  new_path="${new_path/%.exe/}"
21977
21978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21979
21980  # First separate the path from the arguments. This will split at the first
21981  # space.
21982  complete="$WINLD"
21983  path="${complete%% *}"
21984  tmp="$complete EOL"
21985  arguments="${tmp#* }"
21986
21987  # Input might be given as Windows format, start by converting to
21988  # unix format.
21989  new_path="$path"
21990
21991  windows_path="$new_path"
21992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21993    unix_path=`$CYGPATH -u "$windows_path"`
21994    new_path="$unix_path"
21995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21997    new_path="$unix_path"
21998  fi
21999
22000
22001  # Now try to locate executable using which
22002  new_path=`$WHICH "$new_path" 2> /dev/null`
22003
22004  if test "x$new_path" = x; then
22005    # Oops. Which didn't find the executable.
22006    # The splitting of arguments from the executable at a space might have been incorrect,
22007    # since paths with space are more likely in Windows. Give it another try with the whole
22008    # argument.
22009    path="$complete"
22010    arguments="EOL"
22011    new_path="$path"
22012
22013  windows_path="$new_path"
22014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22015    unix_path=`$CYGPATH -u "$windows_path"`
22016    new_path="$unix_path"
22017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22019    new_path="$unix_path"
22020  fi
22021
22022
22023    new_path=`$WHICH "$new_path" 2> /dev/null`
22024
22025    if test "x$new_path" = x; then
22026      # It's still not found. Now this is an unrecoverable error.
22027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22028$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22029      has_space=`$ECHO "$complete" | $GREP " "`
22030      if test "x$has_space" != x; then
22031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22033      fi
22034      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22035    fi
22036  fi
22037
22038  # Now new_path has a complete unix path to the binary
22039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22040    # Keep paths in /bin as-is, but remove trailing .exe if any
22041    new_path="${new_path/%.exe/}"
22042    # Do not save /bin paths to all_fixpath_prefixes!
22043  else
22044    # Not in mixed or Windows style, start by that.
22045    new_path=`cmd //c echo $new_path`
22046
22047  input_path="$new_path"
22048  # Check if we need to convert this using DOS-style short mode. If the path
22049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22050  # take no chances and rewrite it.
22051  # Note: m4 eats our [], so we need to use [ and ] instead.
22052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22053  if test "x$has_forbidden_chars" != x; then
22054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22056  fi
22057
22058    # Output is in $new_path
22059
22060  windows_path="$new_path"
22061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22062    unix_path=`$CYGPATH -u "$windows_path"`
22063    new_path="$unix_path"
22064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22066    new_path="$unix_path"
22067  fi
22068
22069    # remove trailing .exe if any
22070    new_path="${new_path/%.exe/}"
22071
22072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22074  fi
22075
22076  else
22077    # We're on a posix platform. Hooray! :)
22078    # First separate the path from the arguments. This will split at the first
22079    # space.
22080    complete="$WINLD"
22081    path="${complete%% *}"
22082    tmp="$complete EOL"
22083    arguments="${tmp#* }"
22084
22085    # Cannot rely on the command "which" here since it doesn't always work.
22086    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22087    if test -z "$is_absolute_path"; then
22088      # Path to executable is not absolute. Find it.
22089      IFS_save="$IFS"
22090      IFS=:
22091      for p in $PATH; do
22092        if test -f "$p/$path" && test -x "$p/$path"; then
22093          new_path="$p/$path"
22094          break
22095        fi
22096      done
22097      IFS="$IFS_save"
22098    else
22099      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22100$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22101      new_path="$path"
22102    fi
22103
22104    if test "x$new_path" = x; then
22105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22106$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22107        has_space=`$ECHO "$complete" | $GREP " "`
22108        if test "x$has_space" != x; then
22109          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22111        fi
22112        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22113      fi
22114  fi
22115
22116      # Now join together the path and the arguments once again
22117      if test "x$arguments" != xEOL; then
22118        new_complete="$new_path ${arguments% *}"
22119      else
22120        new_complete="$new_path"
22121      fi
22122
22123  if test "x$complete" != "x$new_complete"; then
22124      WINLD="$new_complete"
22125      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22126$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22127    fi
22128
22129    printf "Windows linker was found at $WINLD\n"
22130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22131$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22132    "$WINLD" --version > /dev/null
22133    if test $? -eq 0 ; then
22134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22135$as_echo "no" >&6; }
22136      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22137    else
22138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22139$as_echo "yes" >&6; }
22140    fi
22141    LD="$WINLD"
22142    LDEXE="$WINLD"
22143    LDCXX="$WINLD"
22144    LDEXECXX="$WINLD"
22145
22146    # Extract the first word of "mt", so it can be a program name with args.
22147set dummy mt; ac_word=$2
22148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22149$as_echo_n "checking for $ac_word... " >&6; }
22150if test "${ac_cv_prog_MT+set}" = set; then :
22151  $as_echo_n "(cached) " >&6
22152else
22153  if test -n "$MT"; then
22154  ac_cv_prog_MT="$MT" # Let the user override the test.
22155else
22156  ac_prog_rejected=no
22157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22158for as_dir in $PATH
22159do
22160  IFS=$as_save_IFS
22161  test -z "$as_dir" && as_dir=.
22162    for ac_exec_ext in '' $ac_executable_extensions; do
22163  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22164    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22165       ac_prog_rejected=yes
22166       continue
22167     fi
22168    ac_cv_prog_MT="mt"
22169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22170    break 2
22171  fi
22172done
22173  done
22174IFS=$as_save_IFS
22175
22176if test $ac_prog_rejected = yes; then
22177  # We found a bogon in the path, so make sure we never use it.
22178  set dummy $ac_cv_prog_MT
22179  shift
22180  if test $# != 0; then
22181    # We chose a different compiler from the bogus one.
22182    # However, it has the same basename, so the bogon will be chosen
22183    # first if we set MT to just the basename; use the full file name.
22184    shift
22185    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22186  fi
22187fi
22188fi
22189fi
22190MT=$ac_cv_prog_MT
22191if test -n "$MT"; then
22192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22193$as_echo "$MT" >&6; }
22194else
22195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22196$as_echo "no" >&6; }
22197fi
22198
22199
22200
22201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22202
22203  # First separate the path from the arguments. This will split at the first
22204  # space.
22205  complete="$MT"
22206  path="${complete%% *}"
22207  tmp="$complete EOL"
22208  arguments="${tmp#* }"
22209
22210  # Input might be given as Windows format, start by converting to
22211  # unix format.
22212  new_path=`$CYGPATH -u "$path"`
22213
22214  # Now try to locate executable using which
22215  new_path=`$WHICH "$new_path" 2> /dev/null`
22216  # bat and cmd files are not always considered executable in cygwin causing which
22217  # to not find them
22218  if test "x$new_path" = x \
22219           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22220           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22221    new_path=`$CYGPATH -u "$path"`
22222  fi
22223  if test "x$new_path" = x; then
22224    # Oops. Which didn't find the executable.
22225    # The splitting of arguments from the executable at a space might have been incorrect,
22226    # since paths with space are more likely in Windows. Give it another try with the whole
22227    # argument.
22228    path="$complete"
22229    arguments="EOL"
22230    new_path=`$CYGPATH -u "$path"`
22231    new_path=`$WHICH "$new_path" 2> /dev/null`
22232    # bat and cmd files are not always considered executable in cygwin causing which
22233    # to not find them
22234    if test "x$new_path" = x \
22235             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22236             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22237      new_path=`$CYGPATH -u "$path"`
22238    fi
22239    if test "x$new_path" = x; then
22240      # It's still not found. Now this is an unrecoverable error.
22241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22242$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22243      has_space=`$ECHO "$complete" | $GREP " "`
22244      if test "x$has_space" != x; then
22245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22247      fi
22248      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22249    fi
22250  fi
22251
22252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22255  # "foo.exe" is OK but "foo" is an error.
22256  #
22257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22258  # It is also a way to make sure we got the proper file name for the real test later on.
22259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22260  if test "x$test_shortpath" = x; then
22261    # Short path failed, file does not exist as specified.
22262    # Try adding .exe or .cmd
22263    if test -f "${new_path}.exe"; then
22264       input_to_shortpath="${new_path}.exe"
22265    elif test -f "${new_path}.cmd"; then
22266       input_to_shortpath="${new_path}.cmd"
22267    else
22268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22269$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22272      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22273    fi
22274  else
22275    input_to_shortpath="$new_path"
22276  fi
22277
22278  # Call helper function which possibly converts this using DOS-style short mode.
22279  # If so, the updated path is stored in $new_path.
22280  new_path="$input_to_shortpath"
22281
22282  input_path="$input_to_shortpath"
22283  # Check if we need to convert this using DOS-style short mode. If the path
22284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22285  # take no chances and rewrite it.
22286  # Note: m4 eats our [], so we need to use [ and ] instead.
22287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22288  if test "x$has_forbidden_chars" != x; then
22289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22293      # Going to short mode and back again did indeed matter. Since short mode is
22294      # case insensitive, let's make it lowercase to improve readability.
22295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22296      # Now convert it back to Unix-stile (cygpath)
22297      input_path=`$CYGPATH -u "$shortmode_path"`
22298      new_path="$input_path"
22299    fi
22300  fi
22301
22302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22303  if test "x$test_cygdrive_prefix" = x; then
22304    # As a simple fix, exclude /usr/bin since it's not a real path.
22305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22307      # a path prefixed by /cygdrive for fixpath to work.
22308      new_path="$CYGWIN_ROOT_PATH$input_path"
22309    fi
22310  fi
22311
22312  # remove trailing .exe if any
22313  new_path="${new_path/%.exe/}"
22314
22315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22316
22317  # First separate the path from the arguments. This will split at the first
22318  # space.
22319  complete="$MT"
22320  path="${complete%% *}"
22321  tmp="$complete EOL"
22322  arguments="${tmp#* }"
22323
22324  # Input might be given as Windows format, start by converting to
22325  # unix format.
22326  new_path="$path"
22327
22328  windows_path="$new_path"
22329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22330    unix_path=`$CYGPATH -u "$windows_path"`
22331    new_path="$unix_path"
22332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22334    new_path="$unix_path"
22335  fi
22336
22337
22338  # Now try to locate executable using which
22339  new_path=`$WHICH "$new_path" 2> /dev/null`
22340
22341  if test "x$new_path" = x; then
22342    # Oops. Which didn't find the executable.
22343    # The splitting of arguments from the executable at a space might have been incorrect,
22344    # since paths with space are more likely in Windows. Give it another try with the whole
22345    # argument.
22346    path="$complete"
22347    arguments="EOL"
22348    new_path="$path"
22349
22350  windows_path="$new_path"
22351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22352    unix_path=`$CYGPATH -u "$windows_path"`
22353    new_path="$unix_path"
22354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22356    new_path="$unix_path"
22357  fi
22358
22359
22360    new_path=`$WHICH "$new_path" 2> /dev/null`
22361
22362    if test "x$new_path" = x; then
22363      # It's still not found. Now this is an unrecoverable error.
22364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22365$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22366      has_space=`$ECHO "$complete" | $GREP " "`
22367      if test "x$has_space" != x; then
22368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22370      fi
22371      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22372    fi
22373  fi
22374
22375  # Now new_path has a complete unix path to the binary
22376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22377    # Keep paths in /bin as-is, but remove trailing .exe if any
22378    new_path="${new_path/%.exe/}"
22379    # Do not save /bin paths to all_fixpath_prefixes!
22380  else
22381    # Not in mixed or Windows style, start by that.
22382    new_path=`cmd //c echo $new_path`
22383
22384  input_path="$new_path"
22385  # Check if we need to convert this using DOS-style short mode. If the path
22386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22387  # take no chances and rewrite it.
22388  # Note: m4 eats our [], so we need to use [ and ] instead.
22389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22390  if test "x$has_forbidden_chars" != x; then
22391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22393  fi
22394
22395    # Output is in $new_path
22396
22397  windows_path="$new_path"
22398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22399    unix_path=`$CYGPATH -u "$windows_path"`
22400    new_path="$unix_path"
22401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22403    new_path="$unix_path"
22404  fi
22405
22406    # remove trailing .exe if any
22407    new_path="${new_path/%.exe/}"
22408
22409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22411  fi
22412
22413  else
22414    # We're on a posix platform. Hooray! :)
22415    # First separate the path from the arguments. This will split at the first
22416    # space.
22417    complete="$MT"
22418    path="${complete%% *}"
22419    tmp="$complete EOL"
22420    arguments="${tmp#* }"
22421
22422    # Cannot rely on the command "which" here since it doesn't always work.
22423    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22424    if test -z "$is_absolute_path"; then
22425      # Path to executable is not absolute. Find it.
22426      IFS_save="$IFS"
22427      IFS=:
22428      for p in $PATH; do
22429        if test -f "$p/$path" && test -x "$p/$path"; then
22430          new_path="$p/$path"
22431          break
22432        fi
22433      done
22434      IFS="$IFS_save"
22435    else
22436      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22437$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22438      new_path="$path"
22439    fi
22440
22441    if test "x$new_path" = x; then
22442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22443$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22444        has_space=`$ECHO "$complete" | $GREP " "`
22445        if test "x$has_space" != x; then
22446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22448        fi
22449        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22450      fi
22451  fi
22452
22453      # Now join together the path and the arguments once again
22454      if test "x$arguments" != xEOL; then
22455        new_complete="$new_path ${arguments% *}"
22456      else
22457        new_complete="$new_path"
22458      fi
22459
22460  if test "x$complete" != "x$new_complete"; then
22461      MT="$new_complete"
22462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22463$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22464    fi
22465
22466    # The resource compiler
22467    # Extract the first word of "rc", so it can be a program name with args.
22468set dummy rc; ac_word=$2
22469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22470$as_echo_n "checking for $ac_word... " >&6; }
22471if test "${ac_cv_prog_RC+set}" = set; then :
22472  $as_echo_n "(cached) " >&6
22473else
22474  if test -n "$RC"; then
22475  ac_cv_prog_RC="$RC" # Let the user override the test.
22476else
22477  ac_prog_rejected=no
22478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22479for as_dir in $PATH
22480do
22481  IFS=$as_save_IFS
22482  test -z "$as_dir" && as_dir=.
22483    for ac_exec_ext in '' $ac_executable_extensions; do
22484  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22485    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22486       ac_prog_rejected=yes
22487       continue
22488     fi
22489    ac_cv_prog_RC="rc"
22490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22491    break 2
22492  fi
22493done
22494  done
22495IFS=$as_save_IFS
22496
22497if test $ac_prog_rejected = yes; then
22498  # We found a bogon in the path, so make sure we never use it.
22499  set dummy $ac_cv_prog_RC
22500  shift
22501  if test $# != 0; then
22502    # We chose a different compiler from the bogus one.
22503    # However, it has the same basename, so the bogon will be chosen
22504    # first if we set RC to just the basename; use the full file name.
22505    shift
22506    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22507  fi
22508fi
22509fi
22510fi
22511RC=$ac_cv_prog_RC
22512if test -n "$RC"; then
22513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22514$as_echo "$RC" >&6; }
22515else
22516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22517$as_echo "no" >&6; }
22518fi
22519
22520
22521
22522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22523
22524  # First separate the path from the arguments. This will split at the first
22525  # space.
22526  complete="$RC"
22527  path="${complete%% *}"
22528  tmp="$complete EOL"
22529  arguments="${tmp#* }"
22530
22531  # Input might be given as Windows format, start by converting to
22532  # unix format.
22533  new_path=`$CYGPATH -u "$path"`
22534
22535  # Now try to locate executable using which
22536  new_path=`$WHICH "$new_path" 2> /dev/null`
22537  # bat and cmd files are not always considered executable in cygwin causing which
22538  # to not find them
22539  if test "x$new_path" = x \
22540           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22541           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22542    new_path=`$CYGPATH -u "$path"`
22543  fi
22544  if test "x$new_path" = x; then
22545    # Oops. Which didn't find the executable.
22546    # The splitting of arguments from the executable at a space might have been incorrect,
22547    # since paths with space are more likely in Windows. Give it another try with the whole
22548    # argument.
22549    path="$complete"
22550    arguments="EOL"
22551    new_path=`$CYGPATH -u "$path"`
22552    new_path=`$WHICH "$new_path" 2> /dev/null`
22553    # bat and cmd files are not always considered executable in cygwin causing which
22554    # to not find them
22555    if test "x$new_path" = x \
22556             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22557             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22558      new_path=`$CYGPATH -u "$path"`
22559    fi
22560    if test "x$new_path" = x; then
22561      # It's still not found. Now this is an unrecoverable error.
22562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22563$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22564      has_space=`$ECHO "$complete" | $GREP " "`
22565      if test "x$has_space" != x; then
22566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22568      fi
22569      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22570    fi
22571  fi
22572
22573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22576  # "foo.exe" is OK but "foo" is an error.
22577  #
22578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22579  # It is also a way to make sure we got the proper file name for the real test later on.
22580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22581  if test "x$test_shortpath" = x; then
22582    # Short path failed, file does not exist as specified.
22583    # Try adding .exe or .cmd
22584    if test -f "${new_path}.exe"; then
22585       input_to_shortpath="${new_path}.exe"
22586    elif test -f "${new_path}.cmd"; then
22587       input_to_shortpath="${new_path}.cmd"
22588    else
22589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22590$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22593      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22594    fi
22595  else
22596    input_to_shortpath="$new_path"
22597  fi
22598
22599  # Call helper function which possibly converts this using DOS-style short mode.
22600  # If so, the updated path is stored in $new_path.
22601  new_path="$input_to_shortpath"
22602
22603  input_path="$input_to_shortpath"
22604  # Check if we need to convert this using DOS-style short mode. If the path
22605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22606  # take no chances and rewrite it.
22607  # Note: m4 eats our [], so we need to use [ and ] instead.
22608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22609  if test "x$has_forbidden_chars" != x; then
22610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22614      # Going to short mode and back again did indeed matter. Since short mode is
22615      # case insensitive, let's make it lowercase to improve readability.
22616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22617      # Now convert it back to Unix-stile (cygpath)
22618      input_path=`$CYGPATH -u "$shortmode_path"`
22619      new_path="$input_path"
22620    fi
22621  fi
22622
22623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22624  if test "x$test_cygdrive_prefix" = x; then
22625    # As a simple fix, exclude /usr/bin since it's not a real path.
22626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22628      # a path prefixed by /cygdrive for fixpath to work.
22629      new_path="$CYGWIN_ROOT_PATH$input_path"
22630    fi
22631  fi
22632
22633  # remove trailing .exe if any
22634  new_path="${new_path/%.exe/}"
22635
22636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22637
22638  # First separate the path from the arguments. This will split at the first
22639  # space.
22640  complete="$RC"
22641  path="${complete%% *}"
22642  tmp="$complete EOL"
22643  arguments="${tmp#* }"
22644
22645  # Input might be given as Windows format, start by converting to
22646  # unix format.
22647  new_path="$path"
22648
22649  windows_path="$new_path"
22650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22651    unix_path=`$CYGPATH -u "$windows_path"`
22652    new_path="$unix_path"
22653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22655    new_path="$unix_path"
22656  fi
22657
22658
22659  # Now try to locate executable using which
22660  new_path=`$WHICH "$new_path" 2> /dev/null`
22661
22662  if test "x$new_path" = x; then
22663    # Oops. Which didn't find the executable.
22664    # The splitting of arguments from the executable at a space might have been incorrect,
22665    # since paths with space are more likely in Windows. Give it another try with the whole
22666    # argument.
22667    path="$complete"
22668    arguments="EOL"
22669    new_path="$path"
22670
22671  windows_path="$new_path"
22672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22673    unix_path=`$CYGPATH -u "$windows_path"`
22674    new_path="$unix_path"
22675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22677    new_path="$unix_path"
22678  fi
22679
22680
22681    new_path=`$WHICH "$new_path" 2> /dev/null`
22682
22683    if test "x$new_path" = x; then
22684      # It's still not found. Now this is an unrecoverable error.
22685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22686$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22687      has_space=`$ECHO "$complete" | $GREP " "`
22688      if test "x$has_space" != x; then
22689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22691      fi
22692      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22693    fi
22694  fi
22695
22696  # Now new_path has a complete unix path to the binary
22697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22698    # Keep paths in /bin as-is, but remove trailing .exe if any
22699    new_path="${new_path/%.exe/}"
22700    # Do not save /bin paths to all_fixpath_prefixes!
22701  else
22702    # Not in mixed or Windows style, start by that.
22703    new_path=`cmd //c echo $new_path`
22704
22705  input_path="$new_path"
22706  # Check if we need to convert this using DOS-style short mode. If the path
22707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22708  # take no chances and rewrite it.
22709  # Note: m4 eats our [], so we need to use [ and ] instead.
22710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22711  if test "x$has_forbidden_chars" != x; then
22712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22714  fi
22715
22716    # Output is in $new_path
22717
22718  windows_path="$new_path"
22719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22720    unix_path=`$CYGPATH -u "$windows_path"`
22721    new_path="$unix_path"
22722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22724    new_path="$unix_path"
22725  fi
22726
22727    # remove trailing .exe if any
22728    new_path="${new_path/%.exe/}"
22729
22730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22732  fi
22733
22734  else
22735    # We're on a posix platform. Hooray! :)
22736    # First separate the path from the arguments. This will split at the first
22737    # space.
22738    complete="$RC"
22739    path="${complete%% *}"
22740    tmp="$complete EOL"
22741    arguments="${tmp#* }"
22742
22743    # Cannot rely on the command "which" here since it doesn't always work.
22744    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22745    if test -z "$is_absolute_path"; then
22746      # Path to executable is not absolute. Find it.
22747      IFS_save="$IFS"
22748      IFS=:
22749      for p in $PATH; do
22750        if test -f "$p/$path" && test -x "$p/$path"; then
22751          new_path="$p/$path"
22752          break
22753        fi
22754      done
22755      IFS="$IFS_save"
22756    else
22757      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22758$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22759      new_path="$path"
22760    fi
22761
22762    if test "x$new_path" = x; then
22763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22764$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22765        has_space=`$ECHO "$complete" | $GREP " "`
22766        if test "x$has_space" != x; then
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22768$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22769        fi
22770        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22771      fi
22772  fi
22773
22774      # Now join together the path and the arguments once again
22775      if test "x$arguments" != xEOL; then
22776        new_complete="$new_path ${arguments% *}"
22777      else
22778        new_complete="$new_path"
22779      fi
22780
22781  if test "x$complete" != "x$new_complete"; then
22782      RC="$new_complete"
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22784$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22785    fi
22786
22787
22788    # For hotspot, we need these in Windows mixed path,
22789    # so rewrite them all. Need added .exe suffix.
22790    HOTSPOT_CXX="$CXX.exe"
22791    HOTSPOT_LD="$LD.exe"
22792    HOTSPOT_MT="$MT.exe"
22793    HOTSPOT_RC="$RC.exe"
22794
22795  unix_path="$HOTSPOT_CXX"
22796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22797    windows_path=`$CYGPATH -m "$unix_path"`
22798    HOTSPOT_CXX="$windows_path"
22799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22800    windows_path=`cmd //c echo $unix_path`
22801    HOTSPOT_CXX="$windows_path"
22802  fi
22803
22804
22805  unix_path="$HOTSPOT_LD"
22806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22807    windows_path=`$CYGPATH -m "$unix_path"`
22808    HOTSPOT_LD="$windows_path"
22809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22810    windows_path=`cmd //c echo $unix_path`
22811    HOTSPOT_LD="$windows_path"
22812  fi
22813
22814
22815  unix_path="$HOTSPOT_MT"
22816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22817    windows_path=`$CYGPATH -m "$unix_path"`
22818    HOTSPOT_MT="$windows_path"
22819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22820    windows_path=`cmd //c echo $unix_path`
22821    HOTSPOT_MT="$windows_path"
22822  fi
22823
22824
22825  unix_path="$HOTSPOT_RC"
22826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22827    windows_path=`$CYGPATH -m "$unix_path"`
22828    HOTSPOT_RC="$windows_path"
22829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22830    windows_path=`cmd //c echo $unix_path`
22831    HOTSPOT_RC="$windows_path"
22832  fi
22833
22834
22835
22836
22837    RC_FLAGS="-nologo -l 0x409 -r"
22838    if test "x$VARIANT" = xOPT; then :
22839
22840        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22841
22842fi
22843    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22844    if test "x$JDK_UPDATE_VERSION" = x; then :
22845
22846        JDK_UPDATE_VERSION_NOTNULL=0
22847
22848fi
22849    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22850    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22851    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22852    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22853    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22854    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22855    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22856
22857    # lib.exe is used to create static libraries.
22858    # Extract the first word of "lib", so it can be a program name with args.
22859set dummy lib; ac_word=$2
22860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22861$as_echo_n "checking for $ac_word... " >&6; }
22862if test "${ac_cv_prog_WINAR+set}" = set; then :
22863  $as_echo_n "(cached) " >&6
22864else
22865  if test -n "$WINAR"; then
22866  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22867else
22868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22869for as_dir in $PATH
22870do
22871  IFS=$as_save_IFS
22872  test -z "$as_dir" && as_dir=.
22873    for ac_exec_ext in '' $ac_executable_extensions; do
22874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22875    ac_cv_prog_WINAR="lib"
22876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22877    break 2
22878  fi
22879done
22880  done
22881IFS=$as_save_IFS
22882
22883fi
22884fi
22885WINAR=$ac_cv_prog_WINAR
22886if test -n "$WINAR"; then
22887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22888$as_echo "$WINAR" >&6; }
22889else
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22891$as_echo "no" >&6; }
22892fi
22893
22894
22895
22896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22897
22898  # First separate the path from the arguments. This will split at the first
22899  # space.
22900  complete="$WINAR"
22901  path="${complete%% *}"
22902  tmp="$complete EOL"
22903  arguments="${tmp#* }"
22904
22905  # Input might be given as Windows format, start by converting to
22906  # unix format.
22907  new_path=`$CYGPATH -u "$path"`
22908
22909  # Now try to locate executable using which
22910  new_path=`$WHICH "$new_path" 2> /dev/null`
22911  # bat and cmd files are not always considered executable in cygwin causing which
22912  # to not find them
22913  if test "x$new_path" = x \
22914           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22915           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22916    new_path=`$CYGPATH -u "$path"`
22917  fi
22918  if test "x$new_path" = x; then
22919    # Oops. Which didn't find the executable.
22920    # The splitting of arguments from the executable at a space might have been incorrect,
22921    # since paths with space are more likely in Windows. Give it another try with the whole
22922    # argument.
22923    path="$complete"
22924    arguments="EOL"
22925    new_path=`$CYGPATH -u "$path"`
22926    new_path=`$WHICH "$new_path" 2> /dev/null`
22927    # bat and cmd files are not always considered executable in cygwin causing which
22928    # to not find them
22929    if test "x$new_path" = x \
22930             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22931             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22932      new_path=`$CYGPATH -u "$path"`
22933    fi
22934    if test "x$new_path" = x; then
22935      # It's still not found. Now this is an unrecoverable error.
22936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22937$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22938      has_space=`$ECHO "$complete" | $GREP " "`
22939      if test "x$has_space" != x; then
22940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22942      fi
22943      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22944    fi
22945  fi
22946
22947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22950  # "foo.exe" is OK but "foo" is an error.
22951  #
22952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22953  # It is also a way to make sure we got the proper file name for the real test later on.
22954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22955  if test "x$test_shortpath" = x; then
22956    # Short path failed, file does not exist as specified.
22957    # Try adding .exe or .cmd
22958    if test -f "${new_path}.exe"; then
22959       input_to_shortpath="${new_path}.exe"
22960    elif test -f "${new_path}.cmd"; then
22961       input_to_shortpath="${new_path}.cmd"
22962    else
22963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22964$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22965      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22966$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22967      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22968    fi
22969  else
22970    input_to_shortpath="$new_path"
22971  fi
22972
22973  # Call helper function which possibly converts this using DOS-style short mode.
22974  # If so, the updated path is stored in $new_path.
22975  new_path="$input_to_shortpath"
22976
22977  input_path="$input_to_shortpath"
22978  # Check if we need to convert this using DOS-style short mode. If the path
22979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22980  # take no chances and rewrite it.
22981  # Note: m4 eats our [], so we need to use [ and ] instead.
22982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22983  if test "x$has_forbidden_chars" != x; then
22984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22988      # Going to short mode and back again did indeed matter. Since short mode is
22989      # case insensitive, let's make it lowercase to improve readability.
22990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22991      # Now convert it back to Unix-stile (cygpath)
22992      input_path=`$CYGPATH -u "$shortmode_path"`
22993      new_path="$input_path"
22994    fi
22995  fi
22996
22997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22998  if test "x$test_cygdrive_prefix" = x; then
22999    # As a simple fix, exclude /usr/bin since it's not a real path.
23000    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23002      # a path prefixed by /cygdrive for fixpath to work.
23003      new_path="$CYGWIN_ROOT_PATH$input_path"
23004    fi
23005  fi
23006
23007  # remove trailing .exe if any
23008  new_path="${new_path/%.exe/}"
23009
23010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23011
23012  # First separate the path from the arguments. This will split at the first
23013  # space.
23014  complete="$WINAR"
23015  path="${complete%% *}"
23016  tmp="$complete EOL"
23017  arguments="${tmp#* }"
23018
23019  # Input might be given as Windows format, start by converting to
23020  # unix format.
23021  new_path="$path"
23022
23023  windows_path="$new_path"
23024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23025    unix_path=`$CYGPATH -u "$windows_path"`
23026    new_path="$unix_path"
23027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23029    new_path="$unix_path"
23030  fi
23031
23032
23033  # Now try to locate executable using which
23034  new_path=`$WHICH "$new_path" 2> /dev/null`
23035
23036  if test "x$new_path" = x; then
23037    # Oops. Which didn't find the executable.
23038    # The splitting of arguments from the executable at a space might have been incorrect,
23039    # since paths with space are more likely in Windows. Give it another try with the whole
23040    # argument.
23041    path="$complete"
23042    arguments="EOL"
23043    new_path="$path"
23044
23045  windows_path="$new_path"
23046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23047    unix_path=`$CYGPATH -u "$windows_path"`
23048    new_path="$unix_path"
23049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23051    new_path="$unix_path"
23052  fi
23053
23054
23055    new_path=`$WHICH "$new_path" 2> /dev/null`
23056
23057    if test "x$new_path" = x; then
23058      # It's still not found. Now this is an unrecoverable error.
23059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23060$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23061      has_space=`$ECHO "$complete" | $GREP " "`
23062      if test "x$has_space" != x; then
23063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23065      fi
23066      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23067    fi
23068  fi
23069
23070  # Now new_path has a complete unix path to the binary
23071  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23072    # Keep paths in /bin as-is, but remove trailing .exe if any
23073    new_path="${new_path/%.exe/}"
23074    # Do not save /bin paths to all_fixpath_prefixes!
23075  else
23076    # Not in mixed or Windows style, start by that.
23077    new_path=`cmd //c echo $new_path`
23078
23079  input_path="$new_path"
23080  # Check if we need to convert this using DOS-style short mode. If the path
23081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23082  # take no chances and rewrite it.
23083  # Note: m4 eats our [], so we need to use [ and ] instead.
23084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23085  if test "x$has_forbidden_chars" != x; then
23086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23088  fi
23089
23090    # Output is in $new_path
23091
23092  windows_path="$new_path"
23093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23094    unix_path=`$CYGPATH -u "$windows_path"`
23095    new_path="$unix_path"
23096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23098    new_path="$unix_path"
23099  fi
23100
23101    # remove trailing .exe if any
23102    new_path="${new_path/%.exe/}"
23103
23104    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23105    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23106  fi
23107
23108  else
23109    # We're on a posix platform. Hooray! :)
23110    # First separate the path from the arguments. This will split at the first
23111    # space.
23112    complete="$WINAR"
23113    path="${complete%% *}"
23114    tmp="$complete EOL"
23115    arguments="${tmp#* }"
23116
23117    # Cannot rely on the command "which" here since it doesn't always work.
23118    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23119    if test -z "$is_absolute_path"; then
23120      # Path to executable is not absolute. Find it.
23121      IFS_save="$IFS"
23122      IFS=:
23123      for p in $PATH; do
23124        if test -f "$p/$path" && test -x "$p/$path"; then
23125          new_path="$p/$path"
23126          break
23127        fi
23128      done
23129      IFS="$IFS_save"
23130    else
23131      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23132$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23133      new_path="$path"
23134    fi
23135
23136    if test "x$new_path" = x; then
23137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23138$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23139        has_space=`$ECHO "$complete" | $GREP " "`
23140        if test "x$has_space" != x; then
23141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23143        fi
23144        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23145      fi
23146  fi
23147
23148      # Now join together the path and the arguments once again
23149      if test "x$arguments" != xEOL; then
23150        new_complete="$new_path ${arguments% *}"
23151      else
23152        new_complete="$new_path"
23153      fi
23154
23155  if test "x$complete" != "x$new_complete"; then
23156      WINAR="$new_complete"
23157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23158$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23159    fi
23160
23161    AR="$WINAR"
23162    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23163
23164    # Extract the first word of "dumpbin", so it can be a program name with args.
23165set dummy dumpbin; ac_word=$2
23166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23167$as_echo_n "checking for $ac_word... " >&6; }
23168if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23169  $as_echo_n "(cached) " >&6
23170else
23171  if test -n "$DUMPBIN"; then
23172  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23173else
23174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23175for as_dir in $PATH
23176do
23177  IFS=$as_save_IFS
23178  test -z "$as_dir" && as_dir=.
23179    for ac_exec_ext in '' $ac_executable_extensions; do
23180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23181    ac_cv_prog_DUMPBIN="dumpbin"
23182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23183    break 2
23184  fi
23185done
23186  done
23187IFS=$as_save_IFS
23188
23189fi
23190fi
23191DUMPBIN=$ac_cv_prog_DUMPBIN
23192if test -n "$DUMPBIN"; then
23193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23194$as_echo "$DUMPBIN" >&6; }
23195else
23196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23197$as_echo "no" >&6; }
23198fi
23199
23200
23201
23202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23203
23204  # First separate the path from the arguments. This will split at the first
23205  # space.
23206  complete="$DUMPBIN"
23207  path="${complete%% *}"
23208  tmp="$complete EOL"
23209  arguments="${tmp#* }"
23210
23211  # Input might be given as Windows format, start by converting to
23212  # unix format.
23213  new_path=`$CYGPATH -u "$path"`
23214
23215  # Now try to locate executable using which
23216  new_path=`$WHICH "$new_path" 2> /dev/null`
23217  # bat and cmd files are not always considered executable in cygwin causing which
23218  # to not find them
23219  if test "x$new_path" = x \
23220           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23221           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23222    new_path=`$CYGPATH -u "$path"`
23223  fi
23224  if test "x$new_path" = x; then
23225    # Oops. Which didn't find the executable.
23226    # The splitting of arguments from the executable at a space might have been incorrect,
23227    # since paths with space are more likely in Windows. Give it another try with the whole
23228    # argument.
23229    path="$complete"
23230    arguments="EOL"
23231    new_path=`$CYGPATH -u "$path"`
23232    new_path=`$WHICH "$new_path" 2> /dev/null`
23233    # bat and cmd files are not always considered executable in cygwin causing which
23234    # to not find them
23235    if test "x$new_path" = x \
23236             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23237             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23238      new_path=`$CYGPATH -u "$path"`
23239    fi
23240    if test "x$new_path" = x; then
23241      # It's still not found. Now this is an unrecoverable error.
23242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23243$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23244      has_space=`$ECHO "$complete" | $GREP " "`
23245      if test "x$has_space" != x; then
23246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23248      fi
23249      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23250    fi
23251  fi
23252
23253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23256  # "foo.exe" is OK but "foo" is an error.
23257  #
23258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23259  # It is also a way to make sure we got the proper file name for the real test later on.
23260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23261  if test "x$test_shortpath" = x; then
23262    # Short path failed, file does not exist as specified.
23263    # Try adding .exe or .cmd
23264    if test -f "${new_path}.exe"; then
23265       input_to_shortpath="${new_path}.exe"
23266    elif test -f "${new_path}.cmd"; then
23267       input_to_shortpath="${new_path}.cmd"
23268    else
23269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23270$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23273      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23274    fi
23275  else
23276    input_to_shortpath="$new_path"
23277  fi
23278
23279  # Call helper function which possibly converts this using DOS-style short mode.
23280  # If so, the updated path is stored in $new_path.
23281  new_path="$input_to_shortpath"
23282
23283  input_path="$input_to_shortpath"
23284  # Check if we need to convert this using DOS-style short mode. If the path
23285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23286  # take no chances and rewrite it.
23287  # Note: m4 eats our [], so we need to use [ and ] instead.
23288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23289  if test "x$has_forbidden_chars" != x; then
23290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23294      # Going to short mode and back again did indeed matter. Since short mode is
23295      # case insensitive, let's make it lowercase to improve readability.
23296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23297      # Now convert it back to Unix-stile (cygpath)
23298      input_path=`$CYGPATH -u "$shortmode_path"`
23299      new_path="$input_path"
23300    fi
23301  fi
23302
23303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23304  if test "x$test_cygdrive_prefix" = x; then
23305    # As a simple fix, exclude /usr/bin since it's not a real path.
23306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23308      # a path prefixed by /cygdrive for fixpath to work.
23309      new_path="$CYGWIN_ROOT_PATH$input_path"
23310    fi
23311  fi
23312
23313  # remove trailing .exe if any
23314  new_path="${new_path/%.exe/}"
23315
23316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23317
23318  # First separate the path from the arguments. This will split at the first
23319  # space.
23320  complete="$DUMPBIN"
23321  path="${complete%% *}"
23322  tmp="$complete EOL"
23323  arguments="${tmp#* }"
23324
23325  # Input might be given as Windows format, start by converting to
23326  # unix format.
23327  new_path="$path"
23328
23329  windows_path="$new_path"
23330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23331    unix_path=`$CYGPATH -u "$windows_path"`
23332    new_path="$unix_path"
23333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23335    new_path="$unix_path"
23336  fi
23337
23338
23339  # Now try to locate executable using which
23340  new_path=`$WHICH "$new_path" 2> /dev/null`
23341
23342  if test "x$new_path" = x; then
23343    # Oops. Which didn't find the executable.
23344    # The splitting of arguments from the executable at a space might have been incorrect,
23345    # since paths with space are more likely in Windows. Give it another try with the whole
23346    # argument.
23347    path="$complete"
23348    arguments="EOL"
23349    new_path="$path"
23350
23351  windows_path="$new_path"
23352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23353    unix_path=`$CYGPATH -u "$windows_path"`
23354    new_path="$unix_path"
23355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23357    new_path="$unix_path"
23358  fi
23359
23360
23361    new_path=`$WHICH "$new_path" 2> /dev/null`
23362
23363    if test "x$new_path" = x; then
23364      # It's still not found. Now this is an unrecoverable error.
23365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23366$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23367      has_space=`$ECHO "$complete" | $GREP " "`
23368      if test "x$has_space" != x; then
23369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23371      fi
23372      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23373    fi
23374  fi
23375
23376  # Now new_path has a complete unix path to the binary
23377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23378    # Keep paths in /bin as-is, but remove trailing .exe if any
23379    new_path="${new_path/%.exe/}"
23380    # Do not save /bin paths to all_fixpath_prefixes!
23381  else
23382    # Not in mixed or Windows style, start by that.
23383    new_path=`cmd //c echo $new_path`
23384
23385  input_path="$new_path"
23386  # Check if we need to convert this using DOS-style short mode. If the path
23387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23388  # take no chances and rewrite it.
23389  # Note: m4 eats our [], so we need to use [ and ] instead.
23390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23391  if test "x$has_forbidden_chars" != x; then
23392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23394  fi
23395
23396    # Output is in $new_path
23397
23398  windows_path="$new_path"
23399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23400    unix_path=`$CYGPATH -u "$windows_path"`
23401    new_path="$unix_path"
23402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23404    new_path="$unix_path"
23405  fi
23406
23407    # remove trailing .exe if any
23408    new_path="${new_path/%.exe/}"
23409
23410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23412  fi
23413
23414  else
23415    # We're on a posix platform. Hooray! :)
23416    # First separate the path from the arguments. This will split at the first
23417    # space.
23418    complete="$DUMPBIN"
23419    path="${complete%% *}"
23420    tmp="$complete EOL"
23421    arguments="${tmp#* }"
23422
23423    # Cannot rely on the command "which" here since it doesn't always work.
23424    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23425    if test -z "$is_absolute_path"; then
23426      # Path to executable is not absolute. Find it.
23427      IFS_save="$IFS"
23428      IFS=:
23429      for p in $PATH; do
23430        if test -f "$p/$path" && test -x "$p/$path"; then
23431          new_path="$p/$path"
23432          break
23433        fi
23434      done
23435      IFS="$IFS_save"
23436    else
23437      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23438$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23439      new_path="$path"
23440    fi
23441
23442    if test "x$new_path" = x; then
23443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23444$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23445        has_space=`$ECHO "$complete" | $GREP " "`
23446        if test "x$has_space" != x; then
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23449        fi
23450        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23451      fi
23452  fi
23453
23454      # Now join together the path and the arguments once again
23455      if test "x$arguments" != xEOL; then
23456        new_complete="$new_path ${arguments% *}"
23457      else
23458        new_complete="$new_path"
23459      fi
23460
23461  if test "x$complete" != "x$new_complete"; then
23462      DUMPBIN="$new_complete"
23463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23464$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23465    fi
23466
23467
23468    COMPILER_TYPE=CL
23469    CCXXFLAGS="$CCXXFLAGS -nologo"
23470
23471fi
23472
23473
23474
23475ac_ext=c
23476ac_cpp='$CPP $CPPFLAGS'
23477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23479ac_compiler_gnu=$ac_cv_c_compiler_gnu
23480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23481$as_echo_n "checking how to run the C preprocessor... " >&6; }
23482# On Suns, sometimes $CPP names a directory.
23483if test -n "$CPP" && test -d "$CPP"; then
23484  CPP=
23485fi
23486if test -z "$CPP"; then
23487  if test "${ac_cv_prog_CPP+set}" = set; then :
23488  $as_echo_n "(cached) " >&6
23489else
23490      # Double quotes because CPP needs to be expanded
23491    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23492    do
23493      ac_preproc_ok=false
23494for ac_c_preproc_warn_flag in '' yes
23495do
23496  # Use a header file that comes with gcc, so configuring glibc
23497  # with a fresh cross-compiler works.
23498  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23499  # <limits.h> exists even on freestanding compilers.
23500  # On the NeXT, cc -E runs the code through the compiler's parser,
23501  # not just through cpp. "Syntax error" is here to catch this case.
23502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23503/* end confdefs.h.  */
23504#ifdef __STDC__
23505# include <limits.h>
23506#else
23507# include <assert.h>
23508#endif
23509		     Syntax error
23510_ACEOF
23511if ac_fn_c_try_cpp "$LINENO"; then :
23512
23513else
23514  # Broken: fails on valid input.
23515continue
23516fi
23517rm -f conftest.err conftest.i conftest.$ac_ext
23518
23519  # OK, works on sane cases.  Now check whether nonexistent headers
23520  # can be detected and how.
23521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23522/* end confdefs.h.  */
23523#include <ac_nonexistent.h>
23524_ACEOF
23525if ac_fn_c_try_cpp "$LINENO"; then :
23526  # Broken: success on invalid input.
23527continue
23528else
23529  # Passes both tests.
23530ac_preproc_ok=:
23531break
23532fi
23533rm -f conftest.err conftest.i conftest.$ac_ext
23534
23535done
23536# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23537rm -f conftest.i conftest.err conftest.$ac_ext
23538if $ac_preproc_ok; then :
23539  break
23540fi
23541
23542    done
23543    ac_cv_prog_CPP=$CPP
23544
23545fi
23546  CPP=$ac_cv_prog_CPP
23547else
23548  ac_cv_prog_CPP=$CPP
23549fi
23550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23551$as_echo "$CPP" >&6; }
23552ac_preproc_ok=false
23553for ac_c_preproc_warn_flag in '' yes
23554do
23555  # Use a header file that comes with gcc, so configuring glibc
23556  # with a fresh cross-compiler works.
23557  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23558  # <limits.h> exists even on freestanding compilers.
23559  # On the NeXT, cc -E runs the code through the compiler's parser,
23560  # not just through cpp. "Syntax error" is here to catch this case.
23561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23562/* end confdefs.h.  */
23563#ifdef __STDC__
23564# include <limits.h>
23565#else
23566# include <assert.h>
23567#endif
23568		     Syntax error
23569_ACEOF
23570if ac_fn_c_try_cpp "$LINENO"; then :
23571
23572else
23573  # Broken: fails on valid input.
23574continue
23575fi
23576rm -f conftest.err conftest.i conftest.$ac_ext
23577
23578  # OK, works on sane cases.  Now check whether nonexistent headers
23579  # can be detected and how.
23580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23581/* end confdefs.h.  */
23582#include <ac_nonexistent.h>
23583_ACEOF
23584if ac_fn_c_try_cpp "$LINENO"; then :
23585  # Broken: success on invalid input.
23586continue
23587else
23588  # Passes both tests.
23589ac_preproc_ok=:
23590break
23591fi
23592rm -f conftest.err conftest.i conftest.$ac_ext
23593
23594done
23595# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23596rm -f conftest.i conftest.err conftest.$ac_ext
23597if $ac_preproc_ok; then :
23598
23599else
23600  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23602as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23603See \`config.log' for more details" "$LINENO" 5 ; }
23604fi
23605
23606ac_ext=cpp
23607ac_cpp='$CXXCPP $CPPFLAGS'
23608ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23609ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23610ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23611
23612
23613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23614
23615  # First separate the path from the arguments. This will split at the first
23616  # space.
23617  complete="$CPP"
23618  path="${complete%% *}"
23619  tmp="$complete EOL"
23620  arguments="${tmp#* }"
23621
23622  # Input might be given as Windows format, start by converting to
23623  # unix format.
23624  new_path=`$CYGPATH -u "$path"`
23625
23626  # Now try to locate executable using which
23627  new_path=`$WHICH "$new_path" 2> /dev/null`
23628  # bat and cmd files are not always considered executable in cygwin causing which
23629  # to not find them
23630  if test "x$new_path" = x \
23631           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23632           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23633    new_path=`$CYGPATH -u "$path"`
23634  fi
23635  if test "x$new_path" = x; then
23636    # Oops. Which didn't find the executable.
23637    # The splitting of arguments from the executable at a space might have been incorrect,
23638    # since paths with space are more likely in Windows. Give it another try with the whole
23639    # argument.
23640    path="$complete"
23641    arguments="EOL"
23642    new_path=`$CYGPATH -u "$path"`
23643    new_path=`$WHICH "$new_path" 2> /dev/null`
23644    # bat and cmd files are not always considered executable in cygwin causing which
23645    # to not find them
23646    if test "x$new_path" = x \
23647             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23648             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23649      new_path=`$CYGPATH -u "$path"`
23650    fi
23651    if test "x$new_path" = x; then
23652      # It's still not found. Now this is an unrecoverable error.
23653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23654$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23655      has_space=`$ECHO "$complete" | $GREP " "`
23656      if test "x$has_space" != x; then
23657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23659      fi
23660      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23661    fi
23662  fi
23663
23664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23667  # "foo.exe" is OK but "foo" is an error.
23668  #
23669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23670  # It is also a way to make sure we got the proper file name for the real test later on.
23671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23672  if test "x$test_shortpath" = x; then
23673    # Short path failed, file does not exist as specified.
23674    # Try adding .exe or .cmd
23675    if test -f "${new_path}.exe"; then
23676       input_to_shortpath="${new_path}.exe"
23677    elif test -f "${new_path}.cmd"; then
23678       input_to_shortpath="${new_path}.cmd"
23679    else
23680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23681$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23684      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23685    fi
23686  else
23687    input_to_shortpath="$new_path"
23688  fi
23689
23690  # Call helper function which possibly converts this using DOS-style short mode.
23691  # If so, the updated path is stored in $new_path.
23692  new_path="$input_to_shortpath"
23693
23694  input_path="$input_to_shortpath"
23695  # Check if we need to convert this using DOS-style short mode. If the path
23696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23697  # take no chances and rewrite it.
23698  # Note: m4 eats our [], so we need to use [ and ] instead.
23699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23700  if test "x$has_forbidden_chars" != x; then
23701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23705      # Going to short mode and back again did indeed matter. Since short mode is
23706      # case insensitive, let's make it lowercase to improve readability.
23707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23708      # Now convert it back to Unix-stile (cygpath)
23709      input_path=`$CYGPATH -u "$shortmode_path"`
23710      new_path="$input_path"
23711    fi
23712  fi
23713
23714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23715  if test "x$test_cygdrive_prefix" = x; then
23716    # As a simple fix, exclude /usr/bin since it's not a real path.
23717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23719      # a path prefixed by /cygdrive for fixpath to work.
23720      new_path="$CYGWIN_ROOT_PATH$input_path"
23721    fi
23722  fi
23723
23724  # remove trailing .exe if any
23725  new_path="${new_path/%.exe/}"
23726
23727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23728
23729  # First separate the path from the arguments. This will split at the first
23730  # space.
23731  complete="$CPP"
23732  path="${complete%% *}"
23733  tmp="$complete EOL"
23734  arguments="${tmp#* }"
23735
23736  # Input might be given as Windows format, start by converting to
23737  # unix format.
23738  new_path="$path"
23739
23740  windows_path="$new_path"
23741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23742    unix_path=`$CYGPATH -u "$windows_path"`
23743    new_path="$unix_path"
23744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23746    new_path="$unix_path"
23747  fi
23748
23749
23750  # Now try to locate executable using which
23751  new_path=`$WHICH "$new_path" 2> /dev/null`
23752
23753  if test "x$new_path" = x; then
23754    # Oops. Which didn't find the executable.
23755    # The splitting of arguments from the executable at a space might have been incorrect,
23756    # since paths with space are more likely in Windows. Give it another try with the whole
23757    # argument.
23758    path="$complete"
23759    arguments="EOL"
23760    new_path="$path"
23761
23762  windows_path="$new_path"
23763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23764    unix_path=`$CYGPATH -u "$windows_path"`
23765    new_path="$unix_path"
23766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23768    new_path="$unix_path"
23769  fi
23770
23771
23772    new_path=`$WHICH "$new_path" 2> /dev/null`
23773
23774    if test "x$new_path" = x; then
23775      # It's still not found. Now this is an unrecoverable error.
23776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23777$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23778      has_space=`$ECHO "$complete" | $GREP " "`
23779      if test "x$has_space" != x; then
23780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23782      fi
23783      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23784    fi
23785  fi
23786
23787  # Now new_path has a complete unix path to the binary
23788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23789    # Keep paths in /bin as-is, but remove trailing .exe if any
23790    new_path="${new_path/%.exe/}"
23791    # Do not save /bin paths to all_fixpath_prefixes!
23792  else
23793    # Not in mixed or Windows style, start by that.
23794    new_path=`cmd //c echo $new_path`
23795
23796  input_path="$new_path"
23797  # Check if we need to convert this using DOS-style short mode. If the path
23798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23799  # take no chances and rewrite it.
23800  # Note: m4 eats our [], so we need to use [ and ] instead.
23801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23802  if test "x$has_forbidden_chars" != x; then
23803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23805  fi
23806
23807    # Output is in $new_path
23808
23809  windows_path="$new_path"
23810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23811    unix_path=`$CYGPATH -u "$windows_path"`
23812    new_path="$unix_path"
23813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23815    new_path="$unix_path"
23816  fi
23817
23818    # remove trailing .exe if any
23819    new_path="${new_path/%.exe/}"
23820
23821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23823  fi
23824
23825  else
23826    # We're on a posix platform. Hooray! :)
23827    # First separate the path from the arguments. This will split at the first
23828    # space.
23829    complete="$CPP"
23830    path="${complete%% *}"
23831    tmp="$complete EOL"
23832    arguments="${tmp#* }"
23833
23834    # Cannot rely on the command "which" here since it doesn't always work.
23835    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23836    if test -z "$is_absolute_path"; then
23837      # Path to executable is not absolute. Find it.
23838      IFS_save="$IFS"
23839      IFS=:
23840      for p in $PATH; do
23841        if test -f "$p/$path" && test -x "$p/$path"; then
23842          new_path="$p/$path"
23843          break
23844        fi
23845      done
23846      IFS="$IFS_save"
23847    else
23848      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23849$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23850      new_path="$path"
23851    fi
23852
23853    if test "x$new_path" = x; then
23854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23855$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23856        has_space=`$ECHO "$complete" | $GREP " "`
23857        if test "x$has_space" != x; then
23858          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23859$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23860        fi
23861        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23862      fi
23863  fi
23864
23865      # Now join together the path and the arguments once again
23866      if test "x$arguments" != xEOL; then
23867        new_complete="$new_path ${arguments% *}"
23868      else
23869        new_complete="$new_path"
23870      fi
23871
23872  if test "x$complete" != "x$new_complete"; then
23873      CPP="$new_complete"
23874      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23875$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23876    fi
23877
23878
23879ac_ext=cpp
23880ac_cpp='$CXXCPP $CPPFLAGS'
23881ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23882ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23883ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23885$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23886if test -z "$CXXCPP"; then
23887  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23888  $as_echo_n "(cached) " >&6
23889else
23890      # Double quotes because CXXCPP needs to be expanded
23891    for CXXCPP in "$CXX -E" "/lib/cpp"
23892    do
23893      ac_preproc_ok=false
23894for ac_cxx_preproc_warn_flag in '' yes
23895do
23896  # Use a header file that comes with gcc, so configuring glibc
23897  # with a fresh cross-compiler works.
23898  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23899  # <limits.h> exists even on freestanding compilers.
23900  # On the NeXT, cc -E runs the code through the compiler's parser,
23901  # not just through cpp. "Syntax error" is here to catch this case.
23902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23903/* end confdefs.h.  */
23904#ifdef __STDC__
23905# include <limits.h>
23906#else
23907# include <assert.h>
23908#endif
23909		     Syntax error
23910_ACEOF
23911if ac_fn_cxx_try_cpp "$LINENO"; then :
23912
23913else
23914  # Broken: fails on valid input.
23915continue
23916fi
23917rm -f conftest.err conftest.i conftest.$ac_ext
23918
23919  # OK, works on sane cases.  Now check whether nonexistent headers
23920  # can be detected and how.
23921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23922/* end confdefs.h.  */
23923#include <ac_nonexistent.h>
23924_ACEOF
23925if ac_fn_cxx_try_cpp "$LINENO"; then :
23926  # Broken: success on invalid input.
23927continue
23928else
23929  # Passes both tests.
23930ac_preproc_ok=:
23931break
23932fi
23933rm -f conftest.err conftest.i conftest.$ac_ext
23934
23935done
23936# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23937rm -f conftest.i conftest.err conftest.$ac_ext
23938if $ac_preproc_ok; then :
23939  break
23940fi
23941
23942    done
23943    ac_cv_prog_CXXCPP=$CXXCPP
23944
23945fi
23946  CXXCPP=$ac_cv_prog_CXXCPP
23947else
23948  ac_cv_prog_CXXCPP=$CXXCPP
23949fi
23950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23951$as_echo "$CXXCPP" >&6; }
23952ac_preproc_ok=false
23953for ac_cxx_preproc_warn_flag in '' yes
23954do
23955  # Use a header file that comes with gcc, so configuring glibc
23956  # with a fresh cross-compiler works.
23957  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23958  # <limits.h> exists even on freestanding compilers.
23959  # On the NeXT, cc -E runs the code through the compiler's parser,
23960  # not just through cpp. "Syntax error" is here to catch this case.
23961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23962/* end confdefs.h.  */
23963#ifdef __STDC__
23964# include <limits.h>
23965#else
23966# include <assert.h>
23967#endif
23968		     Syntax error
23969_ACEOF
23970if ac_fn_cxx_try_cpp "$LINENO"; then :
23971
23972else
23973  # Broken: fails on valid input.
23974continue
23975fi
23976rm -f conftest.err conftest.i conftest.$ac_ext
23977
23978  # OK, works on sane cases.  Now check whether nonexistent headers
23979  # can be detected and how.
23980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23981/* end confdefs.h.  */
23982#include <ac_nonexistent.h>
23983_ACEOF
23984if ac_fn_cxx_try_cpp "$LINENO"; then :
23985  # Broken: success on invalid input.
23986continue
23987else
23988  # Passes both tests.
23989ac_preproc_ok=:
23990break
23991fi
23992rm -f conftest.err conftest.i conftest.$ac_ext
23993
23994done
23995# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23996rm -f conftest.i conftest.err conftest.$ac_ext
23997if $ac_preproc_ok; then :
23998
23999else
24000  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24002as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24003See \`config.log' for more details" "$LINENO" 5 ; }
24004fi
24005
24006ac_ext=cpp
24007ac_cpp='$CXXCPP $CPPFLAGS'
24008ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24009ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24010ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24011
24012
24013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24014
24015  # First separate the path from the arguments. This will split at the first
24016  # space.
24017  complete="$CXXCPP"
24018  path="${complete%% *}"
24019  tmp="$complete EOL"
24020  arguments="${tmp#* }"
24021
24022  # Input might be given as Windows format, start by converting to
24023  # unix format.
24024  new_path=`$CYGPATH -u "$path"`
24025
24026  # Now try to locate executable using which
24027  new_path=`$WHICH "$new_path" 2> /dev/null`
24028  # bat and cmd files are not always considered executable in cygwin causing which
24029  # to not find them
24030  if test "x$new_path" = x \
24031           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24032           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24033    new_path=`$CYGPATH -u "$path"`
24034  fi
24035  if test "x$new_path" = x; then
24036    # Oops. Which didn't find the executable.
24037    # The splitting of arguments from the executable at a space might have been incorrect,
24038    # since paths with space are more likely in Windows. Give it another try with the whole
24039    # argument.
24040    path="$complete"
24041    arguments="EOL"
24042    new_path=`$CYGPATH -u "$path"`
24043    new_path=`$WHICH "$new_path" 2> /dev/null`
24044    # bat and cmd files are not always considered executable in cygwin causing which
24045    # to not find them
24046    if test "x$new_path" = x \
24047             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24048             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24049      new_path=`$CYGPATH -u "$path"`
24050    fi
24051    if test "x$new_path" = x; then
24052      # It's still not found. Now this is an unrecoverable error.
24053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24054$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24055      has_space=`$ECHO "$complete" | $GREP " "`
24056      if test "x$has_space" != x; then
24057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24059      fi
24060      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24061    fi
24062  fi
24063
24064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24067  # "foo.exe" is OK but "foo" is an error.
24068  #
24069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24070  # It is also a way to make sure we got the proper file name for the real test later on.
24071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24072  if test "x$test_shortpath" = x; then
24073    # Short path failed, file does not exist as specified.
24074    # Try adding .exe or .cmd
24075    if test -f "${new_path}.exe"; then
24076       input_to_shortpath="${new_path}.exe"
24077    elif test -f "${new_path}.cmd"; then
24078       input_to_shortpath="${new_path}.cmd"
24079    else
24080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24081$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24084      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24085    fi
24086  else
24087    input_to_shortpath="$new_path"
24088  fi
24089
24090  # Call helper function which possibly converts this using DOS-style short mode.
24091  # If so, the updated path is stored in $new_path.
24092  new_path="$input_to_shortpath"
24093
24094  input_path="$input_to_shortpath"
24095  # Check if we need to convert this using DOS-style short mode. If the path
24096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24097  # take no chances and rewrite it.
24098  # Note: m4 eats our [], so we need to use [ and ] instead.
24099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24100  if test "x$has_forbidden_chars" != x; then
24101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24105      # Going to short mode and back again did indeed matter. Since short mode is
24106      # case insensitive, let's make it lowercase to improve readability.
24107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24108      # Now convert it back to Unix-stile (cygpath)
24109      input_path=`$CYGPATH -u "$shortmode_path"`
24110      new_path="$input_path"
24111    fi
24112  fi
24113
24114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24115  if test "x$test_cygdrive_prefix" = x; then
24116    # As a simple fix, exclude /usr/bin since it's not a real path.
24117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24119      # a path prefixed by /cygdrive for fixpath to work.
24120      new_path="$CYGWIN_ROOT_PATH$input_path"
24121    fi
24122  fi
24123
24124  # remove trailing .exe if any
24125  new_path="${new_path/%.exe/}"
24126
24127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24128
24129  # First separate the path from the arguments. This will split at the first
24130  # space.
24131  complete="$CXXCPP"
24132  path="${complete%% *}"
24133  tmp="$complete EOL"
24134  arguments="${tmp#* }"
24135
24136  # Input might be given as Windows format, start by converting to
24137  # unix format.
24138  new_path="$path"
24139
24140  windows_path="$new_path"
24141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24142    unix_path=`$CYGPATH -u "$windows_path"`
24143    new_path="$unix_path"
24144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24146    new_path="$unix_path"
24147  fi
24148
24149
24150  # Now try to locate executable using which
24151  new_path=`$WHICH "$new_path" 2> /dev/null`
24152
24153  if test "x$new_path" = x; then
24154    # Oops. Which didn't find the executable.
24155    # The splitting of arguments from the executable at a space might have been incorrect,
24156    # since paths with space are more likely in Windows. Give it another try with the whole
24157    # argument.
24158    path="$complete"
24159    arguments="EOL"
24160    new_path="$path"
24161
24162  windows_path="$new_path"
24163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24164    unix_path=`$CYGPATH -u "$windows_path"`
24165    new_path="$unix_path"
24166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24168    new_path="$unix_path"
24169  fi
24170
24171
24172    new_path=`$WHICH "$new_path" 2> /dev/null`
24173
24174    if test "x$new_path" = x; then
24175      # It's still not found. Now this is an unrecoverable error.
24176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24177$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24178      has_space=`$ECHO "$complete" | $GREP " "`
24179      if test "x$has_space" != x; then
24180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24182      fi
24183      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24184    fi
24185  fi
24186
24187  # Now new_path has a complete unix path to the binary
24188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24189    # Keep paths in /bin as-is, but remove trailing .exe if any
24190    new_path="${new_path/%.exe/}"
24191    # Do not save /bin paths to all_fixpath_prefixes!
24192  else
24193    # Not in mixed or Windows style, start by that.
24194    new_path=`cmd //c echo $new_path`
24195
24196  input_path="$new_path"
24197  # Check if we need to convert this using DOS-style short mode. If the path
24198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24199  # take no chances and rewrite it.
24200  # Note: m4 eats our [], so we need to use [ and ] instead.
24201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24202  if test "x$has_forbidden_chars" != x; then
24203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24205  fi
24206
24207    # Output is in $new_path
24208
24209  windows_path="$new_path"
24210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24211    unix_path=`$CYGPATH -u "$windows_path"`
24212    new_path="$unix_path"
24213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24215    new_path="$unix_path"
24216  fi
24217
24218    # remove trailing .exe if any
24219    new_path="${new_path/%.exe/}"
24220
24221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24223  fi
24224
24225  else
24226    # We're on a posix platform. Hooray! :)
24227    # First separate the path from the arguments. This will split at the first
24228    # space.
24229    complete="$CXXCPP"
24230    path="${complete%% *}"
24231    tmp="$complete EOL"
24232    arguments="${tmp#* }"
24233
24234    # Cannot rely on the command "which" here since it doesn't always work.
24235    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24236    if test -z "$is_absolute_path"; then
24237      # Path to executable is not absolute. Find it.
24238      IFS_save="$IFS"
24239      IFS=:
24240      for p in $PATH; do
24241        if test -f "$p/$path" && test -x "$p/$path"; then
24242          new_path="$p/$path"
24243          break
24244        fi
24245      done
24246      IFS="$IFS_save"
24247    else
24248      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24249$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24250      new_path="$path"
24251    fi
24252
24253    if test "x$new_path" = x; then
24254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24255$as_echo "$as_me: The path of CXXCPP, 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}: This might be caused by spaces in the path, which is not allowed." >&5
24259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24260        fi
24261        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24262      fi
24263  fi
24264
24265      # Now join together the path and the arguments once again
24266      if test "x$arguments" != xEOL; then
24267        new_complete="$new_path ${arguments% *}"
24268      else
24269        new_complete="$new_path"
24270      fi
24271
24272  if test "x$complete" != "x$new_complete"; then
24273      CXXCPP="$new_complete"
24274      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24275$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24276    fi
24277
24278
24279if test "x$COMPILE_TYPE" != "xcross"; then
24280    # If we are not cross compiling, use the same compilers for
24281    # building the build platform executables. The cross-compilation
24282    # case needed to be done earlier, but this can only be done after
24283    # the native tools have been localized.
24284    BUILD_CC="$CC"
24285    BUILD_CXX="$CXX"
24286    BUILD_LD="$LD"
24287fi
24288
24289# for solaris we really need solaris tools, and not gnu equivalent
24290#   these seems to normally reside in /usr/ccs/bin so add that to path before
24291#   starting to probe
24292#
24293#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24294#         so that it can be overriden --with-tools-dir
24295if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24296    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24297fi
24298
24299# Find the right assembler.
24300if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24301    # Extract the first word of "as", so it can be a program name with args.
24302set dummy as; ac_word=$2
24303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24304$as_echo_n "checking for $ac_word... " >&6; }
24305if test "${ac_cv_path_AS+set}" = set; then :
24306  $as_echo_n "(cached) " >&6
24307else
24308  case $AS in
24309  [\\/]* | ?:[\\/]*)
24310  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24311  ;;
24312  *)
24313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24314for as_dir in $PATH
24315do
24316  IFS=$as_save_IFS
24317  test -z "$as_dir" && as_dir=.
24318    for ac_exec_ext in '' $ac_executable_extensions; do
24319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24320    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24322    break 2
24323  fi
24324done
24325  done
24326IFS=$as_save_IFS
24327
24328  ;;
24329esac
24330fi
24331AS=$ac_cv_path_AS
24332if test -n "$AS"; then
24333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24334$as_echo "$AS" >&6; }
24335else
24336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24337$as_echo "no" >&6; }
24338fi
24339
24340
24341
24342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24343
24344  # First separate the path from the arguments. This will split at the first
24345  # space.
24346  complete="$AS"
24347  path="${complete%% *}"
24348  tmp="$complete EOL"
24349  arguments="${tmp#* }"
24350
24351  # Input might be given as Windows format, start by converting to
24352  # unix format.
24353  new_path=`$CYGPATH -u "$path"`
24354
24355  # Now try to locate executable using which
24356  new_path=`$WHICH "$new_path" 2> /dev/null`
24357  # bat and cmd files are not always considered executable in cygwin causing which
24358  # to not find them
24359  if test "x$new_path" = x \
24360           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24361           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24362    new_path=`$CYGPATH -u "$path"`
24363  fi
24364  if test "x$new_path" = x; then
24365    # Oops. Which didn't find the executable.
24366    # The splitting of arguments from the executable at a space might have been incorrect,
24367    # since paths with space are more likely in Windows. Give it another try with the whole
24368    # argument.
24369    path="$complete"
24370    arguments="EOL"
24371    new_path=`$CYGPATH -u "$path"`
24372    new_path=`$WHICH "$new_path" 2> /dev/null`
24373    # bat and cmd files are not always considered executable in cygwin causing which
24374    # to not find them
24375    if test "x$new_path" = x \
24376             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24377             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24378      new_path=`$CYGPATH -u "$path"`
24379    fi
24380    if test "x$new_path" = x; then
24381      # It's still not found. Now this is an unrecoverable error.
24382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24383$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24384      has_space=`$ECHO "$complete" | $GREP " "`
24385      if test "x$has_space" != x; then
24386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24388      fi
24389      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24390    fi
24391  fi
24392
24393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24396  # "foo.exe" is OK but "foo" is an error.
24397  #
24398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24399  # It is also a way to make sure we got the proper file name for the real test later on.
24400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24401  if test "x$test_shortpath" = x; then
24402    # Short path failed, file does not exist as specified.
24403    # Try adding .exe or .cmd
24404    if test -f "${new_path}.exe"; then
24405       input_to_shortpath="${new_path}.exe"
24406    elif test -f "${new_path}.cmd"; then
24407       input_to_shortpath="${new_path}.cmd"
24408    else
24409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24410$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24413      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24414    fi
24415  else
24416    input_to_shortpath="$new_path"
24417  fi
24418
24419  # Call helper function which possibly converts this using DOS-style short mode.
24420  # If so, the updated path is stored in $new_path.
24421  new_path="$input_to_shortpath"
24422
24423  input_path="$input_to_shortpath"
24424  # Check if we need to convert this using DOS-style short mode. If the path
24425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24426  # take no chances and rewrite it.
24427  # Note: m4 eats our [], so we need to use [ and ] instead.
24428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24429  if test "x$has_forbidden_chars" != x; then
24430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24434      # Going to short mode and back again did indeed matter. Since short mode is
24435      # case insensitive, let's make it lowercase to improve readability.
24436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24437      # Now convert it back to Unix-stile (cygpath)
24438      input_path=`$CYGPATH -u "$shortmode_path"`
24439      new_path="$input_path"
24440    fi
24441  fi
24442
24443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24444  if test "x$test_cygdrive_prefix" = x; then
24445    # As a simple fix, exclude /usr/bin since it's not a real path.
24446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24448      # a path prefixed by /cygdrive for fixpath to work.
24449      new_path="$CYGWIN_ROOT_PATH$input_path"
24450    fi
24451  fi
24452
24453  # remove trailing .exe if any
24454  new_path="${new_path/%.exe/}"
24455
24456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24457
24458  # First separate the path from the arguments. This will split at the first
24459  # space.
24460  complete="$AS"
24461  path="${complete%% *}"
24462  tmp="$complete EOL"
24463  arguments="${tmp#* }"
24464
24465  # Input might be given as Windows format, start by converting to
24466  # unix format.
24467  new_path="$path"
24468
24469  windows_path="$new_path"
24470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24471    unix_path=`$CYGPATH -u "$windows_path"`
24472    new_path="$unix_path"
24473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24475    new_path="$unix_path"
24476  fi
24477
24478
24479  # Now try to locate executable using which
24480  new_path=`$WHICH "$new_path" 2> /dev/null`
24481
24482  if test "x$new_path" = x; then
24483    # Oops. Which didn't find the executable.
24484    # The splitting of arguments from the executable at a space might have been incorrect,
24485    # since paths with space are more likely in Windows. Give it another try with the whole
24486    # argument.
24487    path="$complete"
24488    arguments="EOL"
24489    new_path="$path"
24490
24491  windows_path="$new_path"
24492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24493    unix_path=`$CYGPATH -u "$windows_path"`
24494    new_path="$unix_path"
24495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24497    new_path="$unix_path"
24498  fi
24499
24500
24501    new_path=`$WHICH "$new_path" 2> /dev/null`
24502
24503    if test "x$new_path" = x; then
24504      # It's still not found. Now this is an unrecoverable error.
24505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24506$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24507      has_space=`$ECHO "$complete" | $GREP " "`
24508      if test "x$has_space" != x; then
24509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24511      fi
24512      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24513    fi
24514  fi
24515
24516  # Now new_path has a complete unix path to the binary
24517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24518    # Keep paths in /bin as-is, but remove trailing .exe if any
24519    new_path="${new_path/%.exe/}"
24520    # Do not save /bin paths to all_fixpath_prefixes!
24521  else
24522    # Not in mixed or Windows style, start by that.
24523    new_path=`cmd //c echo $new_path`
24524
24525  input_path="$new_path"
24526  # Check if we need to convert this using DOS-style short mode. If the path
24527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24528  # take no chances and rewrite it.
24529  # Note: m4 eats our [], so we need to use [ and ] instead.
24530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24531  if test "x$has_forbidden_chars" != x; then
24532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24534  fi
24535
24536    # Output is in $new_path
24537
24538  windows_path="$new_path"
24539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24540    unix_path=`$CYGPATH -u "$windows_path"`
24541    new_path="$unix_path"
24542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24544    new_path="$unix_path"
24545  fi
24546
24547    # remove trailing .exe if any
24548    new_path="${new_path/%.exe/}"
24549
24550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24552  fi
24553
24554  else
24555    # We're on a posix platform. Hooray! :)
24556    # First separate the path from the arguments. This will split at the first
24557    # space.
24558    complete="$AS"
24559    path="${complete%% *}"
24560    tmp="$complete EOL"
24561    arguments="${tmp#* }"
24562
24563    # Cannot rely on the command "which" here since it doesn't always work.
24564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24565    if test -z "$is_absolute_path"; then
24566      # Path to executable is not absolute. Find it.
24567      IFS_save="$IFS"
24568      IFS=:
24569      for p in $PATH; do
24570        if test -f "$p/$path" && test -x "$p/$path"; then
24571          new_path="$p/$path"
24572          break
24573        fi
24574      done
24575      IFS="$IFS_save"
24576    else
24577      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24578$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24579      new_path="$path"
24580    fi
24581
24582    if test "x$new_path" = x; then
24583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24584$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24585        has_space=`$ECHO "$complete" | $GREP " "`
24586        if test "x$has_space" != x; then
24587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24589        fi
24590        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24591      fi
24592  fi
24593
24594      # Now join together the path and the arguments once again
24595      if test "x$arguments" != xEOL; then
24596        new_complete="$new_path ${arguments% *}"
24597      else
24598        new_complete="$new_path"
24599      fi
24600
24601  if test "x$complete" != "x$new_complete"; then
24602      AS="$new_complete"
24603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24604$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24605    fi
24606
24607else
24608    AS="$CC -c"
24609fi
24610
24611
24612if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24613    for ac_prog in gnm nm
24614do
24615  # Extract the first word of "$ac_prog", so it can be a program name with args.
24616set dummy $ac_prog; ac_word=$2
24617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24618$as_echo_n "checking for $ac_word... " >&6; }
24619if test "${ac_cv_path_NM+set}" = set; then :
24620  $as_echo_n "(cached) " >&6
24621else
24622  case $NM in
24623  [\\/]* | ?:[\\/]*)
24624  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24625  ;;
24626  *)
24627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24628for as_dir in $PATH
24629do
24630  IFS=$as_save_IFS
24631  test -z "$as_dir" && as_dir=.
24632    for ac_exec_ext in '' $ac_executable_extensions; do
24633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24634    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24636    break 2
24637  fi
24638done
24639  done
24640IFS=$as_save_IFS
24641
24642  ;;
24643esac
24644fi
24645NM=$ac_cv_path_NM
24646if test -n "$NM"; then
24647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24648$as_echo "$NM" >&6; }
24649else
24650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24651$as_echo "no" >&6; }
24652fi
24653
24654
24655  test -n "$NM" && break
24656done
24657
24658
24659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24660
24661  # First separate the path from the arguments. This will split at the first
24662  # space.
24663  complete="$NM"
24664  path="${complete%% *}"
24665  tmp="$complete EOL"
24666  arguments="${tmp#* }"
24667
24668  # Input might be given as Windows format, start by converting to
24669  # unix format.
24670  new_path=`$CYGPATH -u "$path"`
24671
24672  # Now try to locate executable using which
24673  new_path=`$WHICH "$new_path" 2> /dev/null`
24674  # bat and cmd files are not always considered executable in cygwin causing which
24675  # to not find them
24676  if test "x$new_path" = x \
24677           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24678           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24679    new_path=`$CYGPATH -u "$path"`
24680  fi
24681  if test "x$new_path" = x; then
24682    # Oops. Which didn't find the executable.
24683    # The splitting of arguments from the executable at a space might have been incorrect,
24684    # since paths with space are more likely in Windows. Give it another try with the whole
24685    # argument.
24686    path="$complete"
24687    arguments="EOL"
24688    new_path=`$CYGPATH -u "$path"`
24689    new_path=`$WHICH "$new_path" 2> /dev/null`
24690    # bat and cmd files are not always considered executable in cygwin causing which
24691    # to not find them
24692    if test "x$new_path" = x \
24693             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24694             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24695      new_path=`$CYGPATH -u "$path"`
24696    fi
24697    if test "x$new_path" = x; then
24698      # It's still not found. Now this is an unrecoverable error.
24699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24700$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24701      has_space=`$ECHO "$complete" | $GREP " "`
24702      if test "x$has_space" != x; then
24703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24705      fi
24706      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24707    fi
24708  fi
24709
24710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24713  # "foo.exe" is OK but "foo" is an error.
24714  #
24715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24716  # It is also a way to make sure we got the proper file name for the real test later on.
24717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24718  if test "x$test_shortpath" = x; then
24719    # Short path failed, file does not exist as specified.
24720    # Try adding .exe or .cmd
24721    if test -f "${new_path}.exe"; then
24722       input_to_shortpath="${new_path}.exe"
24723    elif test -f "${new_path}.cmd"; then
24724       input_to_shortpath="${new_path}.cmd"
24725    else
24726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24727$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24730      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24731    fi
24732  else
24733    input_to_shortpath="$new_path"
24734  fi
24735
24736  # Call helper function which possibly converts this using DOS-style short mode.
24737  # If so, the updated path is stored in $new_path.
24738  new_path="$input_to_shortpath"
24739
24740  input_path="$input_to_shortpath"
24741  # Check if we need to convert this using DOS-style short mode. If the path
24742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24743  # take no chances and rewrite it.
24744  # Note: m4 eats our [], so we need to use [ and ] instead.
24745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24746  if test "x$has_forbidden_chars" != x; then
24747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24751      # Going to short mode and back again did indeed matter. Since short mode is
24752      # case insensitive, let's make it lowercase to improve readability.
24753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24754      # Now convert it back to Unix-stile (cygpath)
24755      input_path=`$CYGPATH -u "$shortmode_path"`
24756      new_path="$input_path"
24757    fi
24758  fi
24759
24760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24761  if test "x$test_cygdrive_prefix" = x; then
24762    # As a simple fix, exclude /usr/bin since it's not a real path.
24763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24765      # a path prefixed by /cygdrive for fixpath to work.
24766      new_path="$CYGWIN_ROOT_PATH$input_path"
24767    fi
24768  fi
24769
24770  # remove trailing .exe if any
24771  new_path="${new_path/%.exe/}"
24772
24773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24774
24775  # First separate the path from the arguments. This will split at the first
24776  # space.
24777  complete="$NM"
24778  path="${complete%% *}"
24779  tmp="$complete EOL"
24780  arguments="${tmp#* }"
24781
24782  # Input might be given as Windows format, start by converting to
24783  # unix format.
24784  new_path="$path"
24785
24786  windows_path="$new_path"
24787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24788    unix_path=`$CYGPATH -u "$windows_path"`
24789    new_path="$unix_path"
24790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24792    new_path="$unix_path"
24793  fi
24794
24795
24796  # Now try to locate executable using which
24797  new_path=`$WHICH "$new_path" 2> /dev/null`
24798
24799  if test "x$new_path" = x; then
24800    # Oops. Which didn't find the executable.
24801    # The splitting of arguments from the executable at a space might have been incorrect,
24802    # since paths with space are more likely in Windows. Give it another try with the whole
24803    # argument.
24804    path="$complete"
24805    arguments="EOL"
24806    new_path="$path"
24807
24808  windows_path="$new_path"
24809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24810    unix_path=`$CYGPATH -u "$windows_path"`
24811    new_path="$unix_path"
24812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24814    new_path="$unix_path"
24815  fi
24816
24817
24818    new_path=`$WHICH "$new_path" 2> /dev/null`
24819
24820    if test "x$new_path" = x; then
24821      # It's still not found. Now this is an unrecoverable error.
24822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24823$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24824      has_space=`$ECHO "$complete" | $GREP " "`
24825      if test "x$has_space" != x; then
24826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24828      fi
24829      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24830    fi
24831  fi
24832
24833  # Now new_path has a complete unix path to the binary
24834  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24835    # Keep paths in /bin as-is, but remove trailing .exe if any
24836    new_path="${new_path/%.exe/}"
24837    # Do not save /bin paths to all_fixpath_prefixes!
24838  else
24839    # Not in mixed or Windows style, start by that.
24840    new_path=`cmd //c echo $new_path`
24841
24842  input_path="$new_path"
24843  # Check if we need to convert this using DOS-style short mode. If the path
24844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24845  # take no chances and rewrite it.
24846  # Note: m4 eats our [], so we need to use [ and ] instead.
24847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24848  if test "x$has_forbidden_chars" != x; then
24849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24851  fi
24852
24853    # Output is in $new_path
24854
24855  windows_path="$new_path"
24856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24857    unix_path=`$CYGPATH -u "$windows_path"`
24858    new_path="$unix_path"
24859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24861    new_path="$unix_path"
24862  fi
24863
24864    # remove trailing .exe if any
24865    new_path="${new_path/%.exe/}"
24866
24867    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24868    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24869  fi
24870
24871  else
24872    # We're on a posix platform. Hooray! :)
24873    # First separate the path from the arguments. This will split at the first
24874    # space.
24875    complete="$NM"
24876    path="${complete%% *}"
24877    tmp="$complete EOL"
24878    arguments="${tmp#* }"
24879
24880    # Cannot rely on the command "which" here since it doesn't always work.
24881    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24882    if test -z "$is_absolute_path"; then
24883      # Path to executable is not absolute. Find it.
24884      IFS_save="$IFS"
24885      IFS=:
24886      for p in $PATH; do
24887        if test -f "$p/$path" && test -x "$p/$path"; then
24888          new_path="$p/$path"
24889          break
24890        fi
24891      done
24892      IFS="$IFS_save"
24893    else
24894      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24895$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24896      new_path="$path"
24897    fi
24898
24899    if test "x$new_path" = x; then
24900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24901$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24902        has_space=`$ECHO "$complete" | $GREP " "`
24903        if test "x$has_space" != x; then
24904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24906        fi
24907        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24908      fi
24909  fi
24910
24911      # Now join together the path and the arguments once again
24912      if test "x$arguments" != xEOL; then
24913        new_complete="$new_path ${arguments% *}"
24914      else
24915        new_complete="$new_path"
24916      fi
24917
24918  if test "x$complete" != "x$new_complete"; then
24919      NM="$new_complete"
24920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24921$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24922    fi
24923
24924    # Extract the first word of "strip", so it can be a program name with args.
24925set dummy strip; ac_word=$2
24926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24927$as_echo_n "checking for $ac_word... " >&6; }
24928if test "${ac_cv_path_STRIP+set}" = set; then :
24929  $as_echo_n "(cached) " >&6
24930else
24931  case $STRIP in
24932  [\\/]* | ?:[\\/]*)
24933  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24934  ;;
24935  *)
24936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24937for as_dir in $PATH
24938do
24939  IFS=$as_save_IFS
24940  test -z "$as_dir" && as_dir=.
24941    for ac_exec_ext in '' $ac_executable_extensions; do
24942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24943    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24945    break 2
24946  fi
24947done
24948  done
24949IFS=$as_save_IFS
24950
24951  ;;
24952esac
24953fi
24954STRIP=$ac_cv_path_STRIP
24955if test -n "$STRIP"; then
24956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24957$as_echo "$STRIP" >&6; }
24958else
24959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24960$as_echo "no" >&6; }
24961fi
24962
24963
24964
24965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24966
24967  # First separate the path from the arguments. This will split at the first
24968  # space.
24969  complete="$STRIP"
24970  path="${complete%% *}"
24971  tmp="$complete EOL"
24972  arguments="${tmp#* }"
24973
24974  # Input might be given as Windows format, start by converting to
24975  # unix format.
24976  new_path=`$CYGPATH -u "$path"`
24977
24978  # Now try to locate executable using which
24979  new_path=`$WHICH "$new_path" 2> /dev/null`
24980  # bat and cmd files are not always considered executable in cygwin causing which
24981  # to not find them
24982  if test "x$new_path" = x \
24983           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24984           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24985    new_path=`$CYGPATH -u "$path"`
24986  fi
24987  if test "x$new_path" = x; then
24988    # Oops. Which didn't find the executable.
24989    # The splitting of arguments from the executable at a space might have been incorrect,
24990    # since paths with space are more likely in Windows. Give it another try with the whole
24991    # argument.
24992    path="$complete"
24993    arguments="EOL"
24994    new_path=`$CYGPATH -u "$path"`
24995    new_path=`$WHICH "$new_path" 2> /dev/null`
24996    # bat and cmd files are not always considered executable in cygwin causing which
24997    # to not find them
24998    if test "x$new_path" = x \
24999             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25000             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25001      new_path=`$CYGPATH -u "$path"`
25002    fi
25003    if test "x$new_path" = x; then
25004      # It's still not found. Now this is an unrecoverable error.
25005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25006$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25007      has_space=`$ECHO "$complete" | $GREP " "`
25008      if test "x$has_space" != x; then
25009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25011      fi
25012      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25013    fi
25014  fi
25015
25016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25019  # "foo.exe" is OK but "foo" is an error.
25020  #
25021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25022  # It is also a way to make sure we got the proper file name for the real test later on.
25023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25024  if test "x$test_shortpath" = x; then
25025    # Short path failed, file does not exist as specified.
25026    # Try adding .exe or .cmd
25027    if test -f "${new_path}.exe"; then
25028       input_to_shortpath="${new_path}.exe"
25029    elif test -f "${new_path}.cmd"; then
25030       input_to_shortpath="${new_path}.cmd"
25031    else
25032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25033$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25036      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25037    fi
25038  else
25039    input_to_shortpath="$new_path"
25040  fi
25041
25042  # Call helper function which possibly converts this using DOS-style short mode.
25043  # If so, the updated path is stored in $new_path.
25044  new_path="$input_to_shortpath"
25045
25046  input_path="$input_to_shortpath"
25047  # Check if we need to convert this using DOS-style short mode. If the path
25048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25049  # take no chances and rewrite it.
25050  # Note: m4 eats our [], so we need to use [ and ] instead.
25051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25052  if test "x$has_forbidden_chars" != x; then
25053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25057      # Going to short mode and back again did indeed matter. Since short mode is
25058      # case insensitive, let's make it lowercase to improve readability.
25059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25060      # Now convert it back to Unix-stile (cygpath)
25061      input_path=`$CYGPATH -u "$shortmode_path"`
25062      new_path="$input_path"
25063    fi
25064  fi
25065
25066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25067  if test "x$test_cygdrive_prefix" = x; then
25068    # As a simple fix, exclude /usr/bin since it's not a real path.
25069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25071      # a path prefixed by /cygdrive for fixpath to work.
25072      new_path="$CYGWIN_ROOT_PATH$input_path"
25073    fi
25074  fi
25075
25076  # remove trailing .exe if any
25077  new_path="${new_path/%.exe/}"
25078
25079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25080
25081  # First separate the path from the arguments. This will split at the first
25082  # space.
25083  complete="$STRIP"
25084  path="${complete%% *}"
25085  tmp="$complete EOL"
25086  arguments="${tmp#* }"
25087
25088  # Input might be given as Windows format, start by converting to
25089  # unix format.
25090  new_path="$path"
25091
25092  windows_path="$new_path"
25093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25094    unix_path=`$CYGPATH -u "$windows_path"`
25095    new_path="$unix_path"
25096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25098    new_path="$unix_path"
25099  fi
25100
25101
25102  # Now try to locate executable using which
25103  new_path=`$WHICH "$new_path" 2> /dev/null`
25104
25105  if test "x$new_path" = x; then
25106    # Oops. Which didn't find the executable.
25107    # The splitting of arguments from the executable at a space might have been incorrect,
25108    # since paths with space are more likely in Windows. Give it another try with the whole
25109    # argument.
25110    path="$complete"
25111    arguments="EOL"
25112    new_path="$path"
25113
25114  windows_path="$new_path"
25115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25116    unix_path=`$CYGPATH -u "$windows_path"`
25117    new_path="$unix_path"
25118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25120    new_path="$unix_path"
25121  fi
25122
25123
25124    new_path=`$WHICH "$new_path" 2> /dev/null`
25125
25126    if test "x$new_path" = x; then
25127      # It's still not found. Now this is an unrecoverable error.
25128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25129$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25130      has_space=`$ECHO "$complete" | $GREP " "`
25131      if test "x$has_space" != x; then
25132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25134      fi
25135      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25136    fi
25137  fi
25138
25139  # Now new_path has a complete unix path to the binary
25140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25141    # Keep paths in /bin as-is, but remove trailing .exe if any
25142    new_path="${new_path/%.exe/}"
25143    # Do not save /bin paths to all_fixpath_prefixes!
25144  else
25145    # Not in mixed or Windows style, start by that.
25146    new_path=`cmd //c echo $new_path`
25147
25148  input_path="$new_path"
25149  # Check if we need to convert this using DOS-style short mode. If the path
25150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25151  # take no chances and rewrite it.
25152  # Note: m4 eats our [], so we need to use [ and ] instead.
25153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25154  if test "x$has_forbidden_chars" != x; then
25155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25157  fi
25158
25159    # Output is in $new_path
25160
25161  windows_path="$new_path"
25162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25163    unix_path=`$CYGPATH -u "$windows_path"`
25164    new_path="$unix_path"
25165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25167    new_path="$unix_path"
25168  fi
25169
25170    # remove trailing .exe if any
25171    new_path="${new_path/%.exe/}"
25172
25173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25175  fi
25176
25177  else
25178    # We're on a posix platform. Hooray! :)
25179    # First separate the path from the arguments. This will split at the first
25180    # space.
25181    complete="$STRIP"
25182    path="${complete%% *}"
25183    tmp="$complete EOL"
25184    arguments="${tmp#* }"
25185
25186    # Cannot rely on the command "which" here since it doesn't always work.
25187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25188    if test -z "$is_absolute_path"; then
25189      # Path to executable is not absolute. Find it.
25190      IFS_save="$IFS"
25191      IFS=:
25192      for p in $PATH; do
25193        if test -f "$p/$path" && test -x "$p/$path"; then
25194          new_path="$p/$path"
25195          break
25196        fi
25197      done
25198      IFS="$IFS_save"
25199    else
25200      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25201$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25202      new_path="$path"
25203    fi
25204
25205    if test "x$new_path" = x; then
25206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25207$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25208        has_space=`$ECHO "$complete" | $GREP " "`
25209        if test "x$has_space" != x; then
25210          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25212        fi
25213        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25214      fi
25215  fi
25216
25217      # Now join together the path and the arguments once again
25218      if test "x$arguments" != xEOL; then
25219        new_complete="$new_path ${arguments% *}"
25220      else
25221        new_complete="$new_path"
25222      fi
25223
25224  if test "x$complete" != "x$new_complete"; then
25225      STRIP="$new_complete"
25226      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25227$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25228    fi
25229
25230    # Extract the first word of "mcs", so it can be a program name with args.
25231set dummy mcs; ac_word=$2
25232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25233$as_echo_n "checking for $ac_word... " >&6; }
25234if test "${ac_cv_path_MCS+set}" = set; then :
25235  $as_echo_n "(cached) " >&6
25236else
25237  case $MCS in
25238  [\\/]* | ?:[\\/]*)
25239  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25240  ;;
25241  *)
25242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25243for as_dir in $PATH
25244do
25245  IFS=$as_save_IFS
25246  test -z "$as_dir" && as_dir=.
25247    for ac_exec_ext in '' $ac_executable_extensions; do
25248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25249    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25251    break 2
25252  fi
25253done
25254  done
25255IFS=$as_save_IFS
25256
25257  ;;
25258esac
25259fi
25260MCS=$ac_cv_path_MCS
25261if test -n "$MCS"; then
25262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25263$as_echo "$MCS" >&6; }
25264else
25265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25266$as_echo "no" >&6; }
25267fi
25268
25269
25270
25271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25272
25273  # First separate the path from the arguments. This will split at the first
25274  # space.
25275  complete="$MCS"
25276  path="${complete%% *}"
25277  tmp="$complete EOL"
25278  arguments="${tmp#* }"
25279
25280  # Input might be given as Windows format, start by converting to
25281  # unix format.
25282  new_path=`$CYGPATH -u "$path"`
25283
25284  # Now try to locate executable using which
25285  new_path=`$WHICH "$new_path" 2> /dev/null`
25286  # bat and cmd files are not always considered executable in cygwin causing which
25287  # to not find them
25288  if test "x$new_path" = x \
25289           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25290           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25291    new_path=`$CYGPATH -u "$path"`
25292  fi
25293  if test "x$new_path" = x; then
25294    # Oops. Which didn't find the executable.
25295    # The splitting of arguments from the executable at a space might have been incorrect,
25296    # since paths with space are more likely in Windows. Give it another try with the whole
25297    # argument.
25298    path="$complete"
25299    arguments="EOL"
25300    new_path=`$CYGPATH -u "$path"`
25301    new_path=`$WHICH "$new_path" 2> /dev/null`
25302    # bat and cmd files are not always considered executable in cygwin causing which
25303    # to not find them
25304    if test "x$new_path" = x \
25305             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25306             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25307      new_path=`$CYGPATH -u "$path"`
25308    fi
25309    if test "x$new_path" = x; then
25310      # It's still not found. Now this is an unrecoverable error.
25311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25312$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25313      has_space=`$ECHO "$complete" | $GREP " "`
25314      if test "x$has_space" != x; then
25315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25317      fi
25318      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25319    fi
25320  fi
25321
25322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25325  # "foo.exe" is OK but "foo" is an error.
25326  #
25327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25328  # It is also a way to make sure we got the proper file name for the real test later on.
25329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25330  if test "x$test_shortpath" = x; then
25331    # Short path failed, file does not exist as specified.
25332    # Try adding .exe or .cmd
25333    if test -f "${new_path}.exe"; then
25334       input_to_shortpath="${new_path}.exe"
25335    elif test -f "${new_path}.cmd"; then
25336       input_to_shortpath="${new_path}.cmd"
25337    else
25338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25339$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25342      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25343    fi
25344  else
25345    input_to_shortpath="$new_path"
25346  fi
25347
25348  # Call helper function which possibly converts this using DOS-style short mode.
25349  # If so, the updated path is stored in $new_path.
25350  new_path="$input_to_shortpath"
25351
25352  input_path="$input_to_shortpath"
25353  # Check if we need to convert this using DOS-style short mode. If the path
25354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25355  # take no chances and rewrite it.
25356  # Note: m4 eats our [], so we need to use [ and ] instead.
25357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25358  if test "x$has_forbidden_chars" != x; then
25359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25363      # Going to short mode and back again did indeed matter. Since short mode is
25364      # case insensitive, let's make it lowercase to improve readability.
25365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25366      # Now convert it back to Unix-stile (cygpath)
25367      input_path=`$CYGPATH -u "$shortmode_path"`
25368      new_path="$input_path"
25369    fi
25370  fi
25371
25372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25373  if test "x$test_cygdrive_prefix" = x; then
25374    # As a simple fix, exclude /usr/bin since it's not a real path.
25375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25377      # a path prefixed by /cygdrive for fixpath to work.
25378      new_path="$CYGWIN_ROOT_PATH$input_path"
25379    fi
25380  fi
25381
25382  # remove trailing .exe if any
25383  new_path="${new_path/%.exe/}"
25384
25385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25386
25387  # First separate the path from the arguments. This will split at the first
25388  # space.
25389  complete="$MCS"
25390  path="${complete%% *}"
25391  tmp="$complete EOL"
25392  arguments="${tmp#* }"
25393
25394  # Input might be given as Windows format, start by converting to
25395  # unix format.
25396  new_path="$path"
25397
25398  windows_path="$new_path"
25399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25400    unix_path=`$CYGPATH -u "$windows_path"`
25401    new_path="$unix_path"
25402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25404    new_path="$unix_path"
25405  fi
25406
25407
25408  # Now try to locate executable using which
25409  new_path=`$WHICH "$new_path" 2> /dev/null`
25410
25411  if test "x$new_path" = x; then
25412    # Oops. Which didn't find the executable.
25413    # The splitting of arguments from the executable at a space might have been incorrect,
25414    # since paths with space are more likely in Windows. Give it another try with the whole
25415    # argument.
25416    path="$complete"
25417    arguments="EOL"
25418    new_path="$path"
25419
25420  windows_path="$new_path"
25421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25422    unix_path=`$CYGPATH -u "$windows_path"`
25423    new_path="$unix_path"
25424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25426    new_path="$unix_path"
25427  fi
25428
25429
25430    new_path=`$WHICH "$new_path" 2> /dev/null`
25431
25432    if test "x$new_path" = x; then
25433      # It's still not found. Now this is an unrecoverable error.
25434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25435$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25436      has_space=`$ECHO "$complete" | $GREP " "`
25437      if test "x$has_space" != x; then
25438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25440      fi
25441      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25442    fi
25443  fi
25444
25445  # Now new_path has a complete unix path to the binary
25446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25447    # Keep paths in /bin as-is, but remove trailing .exe if any
25448    new_path="${new_path/%.exe/}"
25449    # Do not save /bin paths to all_fixpath_prefixes!
25450  else
25451    # Not in mixed or Windows style, start by that.
25452    new_path=`cmd //c echo $new_path`
25453
25454  input_path="$new_path"
25455  # Check if we need to convert this using DOS-style short mode. If the path
25456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25457  # take no chances and rewrite it.
25458  # Note: m4 eats our [], so we need to use [ and ] instead.
25459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25460  if test "x$has_forbidden_chars" != x; then
25461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25463  fi
25464
25465    # Output is in $new_path
25466
25467  windows_path="$new_path"
25468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25469    unix_path=`$CYGPATH -u "$windows_path"`
25470    new_path="$unix_path"
25471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25473    new_path="$unix_path"
25474  fi
25475
25476    # remove trailing .exe if any
25477    new_path="${new_path/%.exe/}"
25478
25479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25481  fi
25482
25483  else
25484    # We're on a posix platform. Hooray! :)
25485    # First separate the path from the arguments. This will split at the first
25486    # space.
25487    complete="$MCS"
25488    path="${complete%% *}"
25489    tmp="$complete EOL"
25490    arguments="${tmp#* }"
25491
25492    # Cannot rely on the command "which" here since it doesn't always work.
25493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25494    if test -z "$is_absolute_path"; then
25495      # Path to executable is not absolute. Find it.
25496      IFS_save="$IFS"
25497      IFS=:
25498      for p in $PATH; do
25499        if test -f "$p/$path" && test -x "$p/$path"; then
25500          new_path="$p/$path"
25501          break
25502        fi
25503      done
25504      IFS="$IFS_save"
25505    else
25506      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25507$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25508      new_path="$path"
25509    fi
25510
25511    if test "x$new_path" = x; then
25512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25513$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25514        has_space=`$ECHO "$complete" | $GREP " "`
25515        if test "x$has_space" != x; then
25516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25518        fi
25519        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25520      fi
25521  fi
25522
25523      # Now join together the path and the arguments once again
25524      if test "x$arguments" != xEOL; then
25525        new_complete="$new_path ${arguments% *}"
25526      else
25527        new_complete="$new_path"
25528      fi
25529
25530  if test "x$complete" != "x$new_complete"; then
25531      MCS="$new_complete"
25532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25533$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25534    fi
25535
25536elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25537    if test -n "$ac_tool_prefix"; then
25538  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25539set dummy ${ac_tool_prefix}nm; ac_word=$2
25540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25541$as_echo_n "checking for $ac_word... " >&6; }
25542if test "${ac_cv_prog_NM+set}" = set; then :
25543  $as_echo_n "(cached) " >&6
25544else
25545  if test -n "$NM"; then
25546  ac_cv_prog_NM="$NM" # Let the user override the test.
25547else
25548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25549for as_dir in $PATH
25550do
25551  IFS=$as_save_IFS
25552  test -z "$as_dir" && as_dir=.
25553    for ac_exec_ext in '' $ac_executable_extensions; do
25554  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25555    ac_cv_prog_NM="${ac_tool_prefix}nm"
25556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25557    break 2
25558  fi
25559done
25560  done
25561IFS=$as_save_IFS
25562
25563fi
25564fi
25565NM=$ac_cv_prog_NM
25566if test -n "$NM"; then
25567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25568$as_echo "$NM" >&6; }
25569else
25570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25571$as_echo "no" >&6; }
25572fi
25573
25574
25575fi
25576if test -z "$ac_cv_prog_NM"; then
25577  ac_ct_NM=$NM
25578  # Extract the first word of "nm", so it can be a program name with args.
25579set dummy nm; ac_word=$2
25580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25581$as_echo_n "checking for $ac_word... " >&6; }
25582if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25583  $as_echo_n "(cached) " >&6
25584else
25585  if test -n "$ac_ct_NM"; then
25586  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25587else
25588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25589for as_dir in $PATH
25590do
25591  IFS=$as_save_IFS
25592  test -z "$as_dir" && as_dir=.
25593    for ac_exec_ext in '' $ac_executable_extensions; do
25594  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25595    ac_cv_prog_ac_ct_NM="nm"
25596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25597    break 2
25598  fi
25599done
25600  done
25601IFS=$as_save_IFS
25602
25603fi
25604fi
25605ac_ct_NM=$ac_cv_prog_ac_ct_NM
25606if test -n "$ac_ct_NM"; then
25607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25608$as_echo "$ac_ct_NM" >&6; }
25609else
25610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25611$as_echo "no" >&6; }
25612fi
25613
25614  if test "x$ac_ct_NM" = x; then
25615    NM=""
25616  else
25617    case $cross_compiling:$ac_tool_warned in
25618yes:)
25619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25621ac_tool_warned=yes ;;
25622esac
25623    NM=$ac_ct_NM
25624  fi
25625else
25626  NM="$ac_cv_prog_NM"
25627fi
25628
25629
25630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25631
25632  # First separate the path from the arguments. This will split at the first
25633  # space.
25634  complete="$NM"
25635  path="${complete%% *}"
25636  tmp="$complete EOL"
25637  arguments="${tmp#* }"
25638
25639  # Input might be given as Windows format, start by converting to
25640  # unix format.
25641  new_path=`$CYGPATH -u "$path"`
25642
25643  # Now try to locate executable using which
25644  new_path=`$WHICH "$new_path" 2> /dev/null`
25645  # bat and cmd files are not always considered executable in cygwin causing which
25646  # to not find them
25647  if test "x$new_path" = x \
25648           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25649           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25650    new_path=`$CYGPATH -u "$path"`
25651  fi
25652  if test "x$new_path" = x; then
25653    # Oops. Which didn't find the executable.
25654    # The splitting of arguments from the executable at a space might have been incorrect,
25655    # since paths with space are more likely in Windows. Give it another try with the whole
25656    # argument.
25657    path="$complete"
25658    arguments="EOL"
25659    new_path=`$CYGPATH -u "$path"`
25660    new_path=`$WHICH "$new_path" 2> /dev/null`
25661    # bat and cmd files are not always considered executable in cygwin causing which
25662    # to not find them
25663    if test "x$new_path" = x \
25664             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25665             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25666      new_path=`$CYGPATH -u "$path"`
25667    fi
25668    if test "x$new_path" = x; then
25669      # It's still not found. Now this is an unrecoverable error.
25670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25671$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25672      has_space=`$ECHO "$complete" | $GREP " "`
25673      if test "x$has_space" != x; then
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25676      fi
25677      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25678    fi
25679  fi
25680
25681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25684  # "foo.exe" is OK but "foo" is an error.
25685  #
25686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25687  # It is also a way to make sure we got the proper file name for the real test later on.
25688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25689  if test "x$test_shortpath" = x; then
25690    # Short path failed, file does not exist as specified.
25691    # Try adding .exe or .cmd
25692    if test -f "${new_path}.exe"; then
25693       input_to_shortpath="${new_path}.exe"
25694    elif test -f "${new_path}.cmd"; then
25695       input_to_shortpath="${new_path}.cmd"
25696    else
25697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25698$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25701      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25702    fi
25703  else
25704    input_to_shortpath="$new_path"
25705  fi
25706
25707  # Call helper function which possibly converts this using DOS-style short mode.
25708  # If so, the updated path is stored in $new_path.
25709  new_path="$input_to_shortpath"
25710
25711  input_path="$input_to_shortpath"
25712  # Check if we need to convert this using DOS-style short mode. If the path
25713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25714  # take no chances and rewrite it.
25715  # Note: m4 eats our [], so we need to use [ and ] instead.
25716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25717  if test "x$has_forbidden_chars" != x; then
25718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25722      # Going to short mode and back again did indeed matter. Since short mode is
25723      # case insensitive, let's make it lowercase to improve readability.
25724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25725      # Now convert it back to Unix-stile (cygpath)
25726      input_path=`$CYGPATH -u "$shortmode_path"`
25727      new_path="$input_path"
25728    fi
25729  fi
25730
25731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25732  if test "x$test_cygdrive_prefix" = x; then
25733    # As a simple fix, exclude /usr/bin since it's not a real path.
25734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25736      # a path prefixed by /cygdrive for fixpath to work.
25737      new_path="$CYGWIN_ROOT_PATH$input_path"
25738    fi
25739  fi
25740
25741  # remove trailing .exe if any
25742  new_path="${new_path/%.exe/}"
25743
25744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25745
25746  # First separate the path from the arguments. This will split at the first
25747  # space.
25748  complete="$NM"
25749  path="${complete%% *}"
25750  tmp="$complete EOL"
25751  arguments="${tmp#* }"
25752
25753  # Input might be given as Windows format, start by converting to
25754  # unix format.
25755  new_path="$path"
25756
25757  windows_path="$new_path"
25758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25759    unix_path=`$CYGPATH -u "$windows_path"`
25760    new_path="$unix_path"
25761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25763    new_path="$unix_path"
25764  fi
25765
25766
25767  # Now try to locate executable using which
25768  new_path=`$WHICH "$new_path" 2> /dev/null`
25769
25770  if test "x$new_path" = x; then
25771    # Oops. Which didn't find the executable.
25772    # The splitting of arguments from the executable at a space might have been incorrect,
25773    # since paths with space are more likely in Windows. Give it another try with the whole
25774    # argument.
25775    path="$complete"
25776    arguments="EOL"
25777    new_path="$path"
25778
25779  windows_path="$new_path"
25780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25781    unix_path=`$CYGPATH -u "$windows_path"`
25782    new_path="$unix_path"
25783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25785    new_path="$unix_path"
25786  fi
25787
25788
25789    new_path=`$WHICH "$new_path" 2> /dev/null`
25790
25791    if test "x$new_path" = x; then
25792      # It's still not found. Now this is an unrecoverable error.
25793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25794$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25795      has_space=`$ECHO "$complete" | $GREP " "`
25796      if test "x$has_space" != x; then
25797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25799      fi
25800      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25801    fi
25802  fi
25803
25804  # Now new_path has a complete unix path to the binary
25805  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25806    # Keep paths in /bin as-is, but remove trailing .exe if any
25807    new_path="${new_path/%.exe/}"
25808    # Do not save /bin paths to all_fixpath_prefixes!
25809  else
25810    # Not in mixed or Windows style, start by that.
25811    new_path=`cmd //c echo $new_path`
25812
25813  input_path="$new_path"
25814  # Check if we need to convert this using DOS-style short mode. If the path
25815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25816  # take no chances and rewrite it.
25817  # Note: m4 eats our [], so we need to use [ and ] instead.
25818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25819  if test "x$has_forbidden_chars" != x; then
25820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25822  fi
25823
25824    # Output is in $new_path
25825
25826  windows_path="$new_path"
25827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25828    unix_path=`$CYGPATH -u "$windows_path"`
25829    new_path="$unix_path"
25830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25832    new_path="$unix_path"
25833  fi
25834
25835    # remove trailing .exe if any
25836    new_path="${new_path/%.exe/}"
25837
25838    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25839    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25840  fi
25841
25842  else
25843    # We're on a posix platform. Hooray! :)
25844    # First separate the path from the arguments. This will split at the first
25845    # space.
25846    complete="$NM"
25847    path="${complete%% *}"
25848    tmp="$complete EOL"
25849    arguments="${tmp#* }"
25850
25851    # Cannot rely on the command "which" here since it doesn't always work.
25852    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25853    if test -z "$is_absolute_path"; then
25854      # Path to executable is not absolute. Find it.
25855      IFS_save="$IFS"
25856      IFS=:
25857      for p in $PATH; do
25858        if test -f "$p/$path" && test -x "$p/$path"; then
25859          new_path="$p/$path"
25860          break
25861        fi
25862      done
25863      IFS="$IFS_save"
25864    else
25865      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25866$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25867      new_path="$path"
25868    fi
25869
25870    if test "x$new_path" = x; then
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25872$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25873        has_space=`$ECHO "$complete" | $GREP " "`
25874        if test "x$has_space" != x; then
25875          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25877        fi
25878        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25879      fi
25880  fi
25881
25882      # Now join together the path and the arguments once again
25883      if test "x$arguments" != xEOL; then
25884        new_complete="$new_path ${arguments% *}"
25885      else
25886        new_complete="$new_path"
25887      fi
25888
25889  if test "x$complete" != "x$new_complete"; then
25890      NM="$new_complete"
25891      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25892$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25893    fi
25894
25895    if test -n "$ac_tool_prefix"; then
25896  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25897set dummy ${ac_tool_prefix}strip; ac_word=$2
25898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25899$as_echo_n "checking for $ac_word... " >&6; }
25900if test "${ac_cv_prog_STRIP+set}" = set; then :
25901  $as_echo_n "(cached) " >&6
25902else
25903  if test -n "$STRIP"; then
25904  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25905else
25906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25907for as_dir in $PATH
25908do
25909  IFS=$as_save_IFS
25910  test -z "$as_dir" && as_dir=.
25911    for ac_exec_ext in '' $ac_executable_extensions; do
25912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25913    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25915    break 2
25916  fi
25917done
25918  done
25919IFS=$as_save_IFS
25920
25921fi
25922fi
25923STRIP=$ac_cv_prog_STRIP
25924if test -n "$STRIP"; then
25925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25926$as_echo "$STRIP" >&6; }
25927else
25928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25929$as_echo "no" >&6; }
25930fi
25931
25932
25933fi
25934if test -z "$ac_cv_prog_STRIP"; then
25935  ac_ct_STRIP=$STRIP
25936  # Extract the first word of "strip", so it can be a program name with args.
25937set dummy strip; ac_word=$2
25938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25939$as_echo_n "checking for $ac_word... " >&6; }
25940if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25941  $as_echo_n "(cached) " >&6
25942else
25943  if test -n "$ac_ct_STRIP"; then
25944  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25945else
25946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25947for as_dir in $PATH
25948do
25949  IFS=$as_save_IFS
25950  test -z "$as_dir" && as_dir=.
25951    for ac_exec_ext in '' $ac_executable_extensions; do
25952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25953    ac_cv_prog_ac_ct_STRIP="strip"
25954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25955    break 2
25956  fi
25957done
25958  done
25959IFS=$as_save_IFS
25960
25961fi
25962fi
25963ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25964if test -n "$ac_ct_STRIP"; then
25965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25966$as_echo "$ac_ct_STRIP" >&6; }
25967else
25968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25969$as_echo "no" >&6; }
25970fi
25971
25972  if test "x$ac_ct_STRIP" = x; then
25973    STRIP=""
25974  else
25975    case $cross_compiling:$ac_tool_warned in
25976yes:)
25977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25979ac_tool_warned=yes ;;
25980esac
25981    STRIP=$ac_ct_STRIP
25982  fi
25983else
25984  STRIP="$ac_cv_prog_STRIP"
25985fi
25986
25987
25988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25989
25990  # First separate the path from the arguments. This will split at the first
25991  # space.
25992  complete="$STRIP"
25993  path="${complete%% *}"
25994  tmp="$complete EOL"
25995  arguments="${tmp#* }"
25996
25997  # Input might be given as Windows format, start by converting to
25998  # unix format.
25999  new_path=`$CYGPATH -u "$path"`
26000
26001  # Now try to locate executable using which
26002  new_path=`$WHICH "$new_path" 2> /dev/null`
26003  # bat and cmd files are not always considered executable in cygwin causing which
26004  # to not find them
26005  if test "x$new_path" = x \
26006           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26007           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26008    new_path=`$CYGPATH -u "$path"`
26009  fi
26010  if test "x$new_path" = x; then
26011    # Oops. Which didn't find the executable.
26012    # The splitting of arguments from the executable at a space might have been incorrect,
26013    # since paths with space are more likely in Windows. Give it another try with the whole
26014    # argument.
26015    path="$complete"
26016    arguments="EOL"
26017    new_path=`$CYGPATH -u "$path"`
26018    new_path=`$WHICH "$new_path" 2> /dev/null`
26019    # bat and cmd files are not always considered executable in cygwin causing which
26020    # to not find them
26021    if test "x$new_path" = x \
26022             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26023             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26024      new_path=`$CYGPATH -u "$path"`
26025    fi
26026    if test "x$new_path" = x; then
26027      # It's still not found. Now this is an unrecoverable error.
26028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26029$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26030      has_space=`$ECHO "$complete" | $GREP " "`
26031      if test "x$has_space" != x; then
26032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26034      fi
26035      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26036    fi
26037  fi
26038
26039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26042  # "foo.exe" is OK but "foo" is an error.
26043  #
26044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26045  # It is also a way to make sure we got the proper file name for the real test later on.
26046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26047  if test "x$test_shortpath" = x; then
26048    # Short path failed, file does not exist as specified.
26049    # Try adding .exe or .cmd
26050    if test -f "${new_path}.exe"; then
26051       input_to_shortpath="${new_path}.exe"
26052    elif test -f "${new_path}.cmd"; then
26053       input_to_shortpath="${new_path}.cmd"
26054    else
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26056$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26059      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26060    fi
26061  else
26062    input_to_shortpath="$new_path"
26063  fi
26064
26065  # Call helper function which possibly converts this using DOS-style short mode.
26066  # If so, the updated path is stored in $new_path.
26067  new_path="$input_to_shortpath"
26068
26069  input_path="$input_to_shortpath"
26070  # Check if we need to convert this using DOS-style short mode. If the path
26071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26072  # take no chances and rewrite it.
26073  # Note: m4 eats our [], so we need to use [ and ] instead.
26074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26075  if test "x$has_forbidden_chars" != x; then
26076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26080      # Going to short mode and back again did indeed matter. Since short mode is
26081      # case insensitive, let's make it lowercase to improve readability.
26082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26083      # Now convert it back to Unix-stile (cygpath)
26084      input_path=`$CYGPATH -u "$shortmode_path"`
26085      new_path="$input_path"
26086    fi
26087  fi
26088
26089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26090  if test "x$test_cygdrive_prefix" = x; then
26091    # As a simple fix, exclude /usr/bin since it's not a real path.
26092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26094      # a path prefixed by /cygdrive for fixpath to work.
26095      new_path="$CYGWIN_ROOT_PATH$input_path"
26096    fi
26097  fi
26098
26099  # remove trailing .exe if any
26100  new_path="${new_path/%.exe/}"
26101
26102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26103
26104  # First separate the path from the arguments. This will split at the first
26105  # space.
26106  complete="$STRIP"
26107  path="${complete%% *}"
26108  tmp="$complete EOL"
26109  arguments="${tmp#* }"
26110
26111  # Input might be given as Windows format, start by converting to
26112  # unix format.
26113  new_path="$path"
26114
26115  windows_path="$new_path"
26116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26117    unix_path=`$CYGPATH -u "$windows_path"`
26118    new_path="$unix_path"
26119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26121    new_path="$unix_path"
26122  fi
26123
26124
26125  # Now try to locate executable using which
26126  new_path=`$WHICH "$new_path" 2> /dev/null`
26127
26128  if test "x$new_path" = x; then
26129    # Oops. Which didn't find the executable.
26130    # The splitting of arguments from the executable at a space might have been incorrect,
26131    # since paths with space are more likely in Windows. Give it another try with the whole
26132    # argument.
26133    path="$complete"
26134    arguments="EOL"
26135    new_path="$path"
26136
26137  windows_path="$new_path"
26138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26139    unix_path=`$CYGPATH -u "$windows_path"`
26140    new_path="$unix_path"
26141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26143    new_path="$unix_path"
26144  fi
26145
26146
26147    new_path=`$WHICH "$new_path" 2> /dev/null`
26148
26149    if test "x$new_path" = x; then
26150      # It's still not found. Now this is an unrecoverable error.
26151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26152$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26153      has_space=`$ECHO "$complete" | $GREP " "`
26154      if test "x$has_space" != x; then
26155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26157      fi
26158      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26159    fi
26160  fi
26161
26162  # Now new_path has a complete unix path to the binary
26163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26164    # Keep paths in /bin as-is, but remove trailing .exe if any
26165    new_path="${new_path/%.exe/}"
26166    # Do not save /bin paths to all_fixpath_prefixes!
26167  else
26168    # Not in mixed or Windows style, start by that.
26169    new_path=`cmd //c echo $new_path`
26170
26171  input_path="$new_path"
26172  # Check if we need to convert this using DOS-style short mode. If the path
26173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26174  # take no chances and rewrite it.
26175  # Note: m4 eats our [], so we need to use [ and ] instead.
26176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26177  if test "x$has_forbidden_chars" != x; then
26178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26180  fi
26181
26182    # Output is in $new_path
26183
26184  windows_path="$new_path"
26185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26186    unix_path=`$CYGPATH -u "$windows_path"`
26187    new_path="$unix_path"
26188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26190    new_path="$unix_path"
26191  fi
26192
26193    # remove trailing .exe if any
26194    new_path="${new_path/%.exe/}"
26195
26196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26198  fi
26199
26200  else
26201    # We're on a posix platform. Hooray! :)
26202    # First separate the path from the arguments. This will split at the first
26203    # space.
26204    complete="$STRIP"
26205    path="${complete%% *}"
26206    tmp="$complete EOL"
26207    arguments="${tmp#* }"
26208
26209    # Cannot rely on the command "which" here since it doesn't always work.
26210    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26211    if test -z "$is_absolute_path"; then
26212      # Path to executable is not absolute. Find it.
26213      IFS_save="$IFS"
26214      IFS=:
26215      for p in $PATH; do
26216        if test -f "$p/$path" && test -x "$p/$path"; then
26217          new_path="$p/$path"
26218          break
26219        fi
26220      done
26221      IFS="$IFS_save"
26222    else
26223      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26224$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26225      new_path="$path"
26226    fi
26227
26228    if test "x$new_path" = x; then
26229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26230$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26231        has_space=`$ECHO "$complete" | $GREP " "`
26232        if test "x$has_space" != x; then
26233          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26234$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26235        fi
26236        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26237      fi
26238  fi
26239
26240      # Now join together the path and the arguments once again
26241      if test "x$arguments" != xEOL; then
26242        new_complete="$new_path ${arguments% *}"
26243      else
26244        new_complete="$new_path"
26245      fi
26246
26247  if test "x$complete" != "x$new_complete"; then
26248      STRIP="$new_complete"
26249      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26250$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26251    fi
26252
26253fi
26254
26255# objcopy is used for moving debug symbols to separate files when
26256# full debug symbols are enabled.
26257if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26258    if test -n "$ac_tool_prefix"; then
26259  for ac_prog in gobjcopy objcopy
26260  do
26261    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26262set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26264$as_echo_n "checking for $ac_word... " >&6; }
26265if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26266  $as_echo_n "(cached) " >&6
26267else
26268  if test -n "$OBJCOPY"; then
26269  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26270else
26271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26272for as_dir in $PATH
26273do
26274  IFS=$as_save_IFS
26275  test -z "$as_dir" && as_dir=.
26276    for ac_exec_ext in '' $ac_executable_extensions; do
26277  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26278    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26280    break 2
26281  fi
26282done
26283  done
26284IFS=$as_save_IFS
26285
26286fi
26287fi
26288OBJCOPY=$ac_cv_prog_OBJCOPY
26289if test -n "$OBJCOPY"; then
26290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26291$as_echo "$OBJCOPY" >&6; }
26292else
26293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26294$as_echo "no" >&6; }
26295fi
26296
26297
26298    test -n "$OBJCOPY" && break
26299  done
26300fi
26301if test -z "$OBJCOPY"; then
26302  ac_ct_OBJCOPY=$OBJCOPY
26303  for ac_prog in gobjcopy objcopy
26304do
26305  # Extract the first word of "$ac_prog", so it can be a program name with args.
26306set dummy $ac_prog; ac_word=$2
26307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26308$as_echo_n "checking for $ac_word... " >&6; }
26309if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26310  $as_echo_n "(cached) " >&6
26311else
26312  if test -n "$ac_ct_OBJCOPY"; then
26313  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26314else
26315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26316for as_dir in $PATH
26317do
26318  IFS=$as_save_IFS
26319  test -z "$as_dir" && as_dir=.
26320    for ac_exec_ext in '' $ac_executable_extensions; do
26321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26322    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26324    break 2
26325  fi
26326done
26327  done
26328IFS=$as_save_IFS
26329
26330fi
26331fi
26332ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26333if test -n "$ac_ct_OBJCOPY"; then
26334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26335$as_echo "$ac_ct_OBJCOPY" >&6; }
26336else
26337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26338$as_echo "no" >&6; }
26339fi
26340
26341
26342  test -n "$ac_ct_OBJCOPY" && break
26343done
26344
26345  if test "x$ac_ct_OBJCOPY" = x; then
26346    OBJCOPY=""
26347  else
26348    case $cross_compiling:$ac_tool_warned in
26349yes:)
26350{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26351$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26352ac_tool_warned=yes ;;
26353esac
26354    OBJCOPY=$ac_ct_OBJCOPY
26355  fi
26356fi
26357
26358    # Only call fixup if objcopy was found.
26359    if test -n "$OBJCOPY"; then
26360
26361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26362
26363  # First separate the path from the arguments. This will split at the first
26364  # space.
26365  complete="$OBJCOPY"
26366  path="${complete%% *}"
26367  tmp="$complete EOL"
26368  arguments="${tmp#* }"
26369
26370  # Input might be given as Windows format, start by converting to
26371  # unix format.
26372  new_path=`$CYGPATH -u "$path"`
26373
26374  # Now try to locate executable using which
26375  new_path=`$WHICH "$new_path" 2> /dev/null`
26376  # bat and cmd files are not always considered executable in cygwin causing which
26377  # to not find them
26378  if test "x$new_path" = x \
26379           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26380           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26381    new_path=`$CYGPATH -u "$path"`
26382  fi
26383  if test "x$new_path" = x; then
26384    # Oops. Which didn't find the executable.
26385    # The splitting of arguments from the executable at a space might have been incorrect,
26386    # since paths with space are more likely in Windows. Give it another try with the whole
26387    # argument.
26388    path="$complete"
26389    arguments="EOL"
26390    new_path=`$CYGPATH -u "$path"`
26391    new_path=`$WHICH "$new_path" 2> /dev/null`
26392    # bat and cmd files are not always considered executable in cygwin causing which
26393    # to not find them
26394    if test "x$new_path" = x \
26395             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26396             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26397      new_path=`$CYGPATH -u "$path"`
26398    fi
26399    if test "x$new_path" = x; then
26400      # It's still not found. Now this is an unrecoverable error.
26401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26402$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26403      has_space=`$ECHO "$complete" | $GREP " "`
26404      if test "x$has_space" != x; then
26405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26407      fi
26408      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26409    fi
26410  fi
26411
26412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26415  # "foo.exe" is OK but "foo" is an error.
26416  #
26417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26418  # It is also a way to make sure we got the proper file name for the real test later on.
26419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26420  if test "x$test_shortpath" = x; then
26421    # Short path failed, file does not exist as specified.
26422    # Try adding .exe or .cmd
26423    if test -f "${new_path}.exe"; then
26424       input_to_shortpath="${new_path}.exe"
26425    elif test -f "${new_path}.cmd"; then
26426       input_to_shortpath="${new_path}.cmd"
26427    else
26428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26429$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26430      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26431$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26432      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26433    fi
26434  else
26435    input_to_shortpath="$new_path"
26436  fi
26437
26438  # Call helper function which possibly converts this using DOS-style short mode.
26439  # If so, the updated path is stored in $new_path.
26440  new_path="$input_to_shortpath"
26441
26442  input_path="$input_to_shortpath"
26443  # Check if we need to convert this using DOS-style short mode. If the path
26444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26445  # take no chances and rewrite it.
26446  # Note: m4 eats our [], so we need to use [ and ] instead.
26447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26448  if test "x$has_forbidden_chars" != x; then
26449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26453      # Going to short mode and back again did indeed matter. Since short mode is
26454      # case insensitive, let's make it lowercase to improve readability.
26455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26456      # Now convert it back to Unix-stile (cygpath)
26457      input_path=`$CYGPATH -u "$shortmode_path"`
26458      new_path="$input_path"
26459    fi
26460  fi
26461
26462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26463  if test "x$test_cygdrive_prefix" = x; then
26464    # As a simple fix, exclude /usr/bin since it's not a real path.
26465    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26467      # a path prefixed by /cygdrive for fixpath to work.
26468      new_path="$CYGWIN_ROOT_PATH$input_path"
26469    fi
26470  fi
26471
26472  # remove trailing .exe if any
26473  new_path="${new_path/%.exe/}"
26474
26475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26476
26477  # First separate the path from the arguments. This will split at the first
26478  # space.
26479  complete="$OBJCOPY"
26480  path="${complete%% *}"
26481  tmp="$complete EOL"
26482  arguments="${tmp#* }"
26483
26484  # Input might be given as Windows format, start by converting to
26485  # unix format.
26486  new_path="$path"
26487
26488  windows_path="$new_path"
26489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26490    unix_path=`$CYGPATH -u "$windows_path"`
26491    new_path="$unix_path"
26492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26494    new_path="$unix_path"
26495  fi
26496
26497
26498  # Now try to locate executable using which
26499  new_path=`$WHICH "$new_path" 2> /dev/null`
26500
26501  if test "x$new_path" = x; then
26502    # Oops. Which didn't find the executable.
26503    # The splitting of arguments from the executable at a space might have been incorrect,
26504    # since paths with space are more likely in Windows. Give it another try with the whole
26505    # argument.
26506    path="$complete"
26507    arguments="EOL"
26508    new_path="$path"
26509
26510  windows_path="$new_path"
26511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26512    unix_path=`$CYGPATH -u "$windows_path"`
26513    new_path="$unix_path"
26514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26516    new_path="$unix_path"
26517  fi
26518
26519
26520    new_path=`$WHICH "$new_path" 2> /dev/null`
26521
26522    if test "x$new_path" = x; then
26523      # It's still not found. Now this is an unrecoverable error.
26524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26525$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26526      has_space=`$ECHO "$complete" | $GREP " "`
26527      if test "x$has_space" != x; then
26528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26530      fi
26531      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26532    fi
26533  fi
26534
26535  # Now new_path has a complete unix path to the binary
26536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26537    # Keep paths in /bin as-is, but remove trailing .exe if any
26538    new_path="${new_path/%.exe/}"
26539    # Do not save /bin paths to all_fixpath_prefixes!
26540  else
26541    # Not in mixed or Windows style, start by that.
26542    new_path=`cmd //c echo $new_path`
26543
26544  input_path="$new_path"
26545  # Check if we need to convert this using DOS-style short mode. If the path
26546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26547  # take no chances and rewrite it.
26548  # Note: m4 eats our [], so we need to use [ and ] instead.
26549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26550  if test "x$has_forbidden_chars" != x; then
26551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26553  fi
26554
26555    # Output is in $new_path
26556
26557  windows_path="$new_path"
26558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26559    unix_path=`$CYGPATH -u "$windows_path"`
26560    new_path="$unix_path"
26561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26563    new_path="$unix_path"
26564  fi
26565
26566    # remove trailing .exe if any
26567    new_path="${new_path/%.exe/}"
26568
26569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26571  fi
26572
26573  else
26574    # We're on a posix platform. Hooray! :)
26575    # First separate the path from the arguments. This will split at the first
26576    # space.
26577    complete="$OBJCOPY"
26578    path="${complete%% *}"
26579    tmp="$complete EOL"
26580    arguments="${tmp#* }"
26581
26582    # Cannot rely on the command "which" here since it doesn't always work.
26583    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26584    if test -z "$is_absolute_path"; then
26585      # Path to executable is not absolute. Find it.
26586      IFS_save="$IFS"
26587      IFS=:
26588      for p in $PATH; do
26589        if test -f "$p/$path" && test -x "$p/$path"; then
26590          new_path="$p/$path"
26591          break
26592        fi
26593      done
26594      IFS="$IFS_save"
26595    else
26596      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26597$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26598      new_path="$path"
26599    fi
26600
26601    if test "x$new_path" = x; then
26602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26603$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26604        has_space=`$ECHO "$complete" | $GREP " "`
26605        if test "x$has_space" != x; then
26606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26608        fi
26609        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26610      fi
26611  fi
26612
26613      # Now join together the path and the arguments once again
26614      if test "x$arguments" != xEOL; then
26615        new_complete="$new_path ${arguments% *}"
26616      else
26617        new_complete="$new_path"
26618      fi
26619
26620  if test "x$complete" != "x$new_complete"; then
26621      OBJCOPY="$new_complete"
26622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26623$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26624    fi
26625
26626    fi
26627fi
26628
26629if test -n "$ac_tool_prefix"; then
26630  for ac_prog in gobjdump objdump
26631  do
26632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26635$as_echo_n "checking for $ac_word... " >&6; }
26636if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26637  $as_echo_n "(cached) " >&6
26638else
26639  if test -n "$OBJDUMP"; then
26640  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26641else
26642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26643for as_dir in $PATH
26644do
26645  IFS=$as_save_IFS
26646  test -z "$as_dir" && as_dir=.
26647    for ac_exec_ext in '' $ac_executable_extensions; do
26648  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26649    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26651    break 2
26652  fi
26653done
26654  done
26655IFS=$as_save_IFS
26656
26657fi
26658fi
26659OBJDUMP=$ac_cv_prog_OBJDUMP
26660if test -n "$OBJDUMP"; then
26661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26662$as_echo "$OBJDUMP" >&6; }
26663else
26664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26665$as_echo "no" >&6; }
26666fi
26667
26668
26669    test -n "$OBJDUMP" && break
26670  done
26671fi
26672if test -z "$OBJDUMP"; then
26673  ac_ct_OBJDUMP=$OBJDUMP
26674  for ac_prog in gobjdump objdump
26675do
26676  # Extract the first word of "$ac_prog", so it can be a program name with args.
26677set dummy $ac_prog; ac_word=$2
26678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26679$as_echo_n "checking for $ac_word... " >&6; }
26680if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26681  $as_echo_n "(cached) " >&6
26682else
26683  if test -n "$ac_ct_OBJDUMP"; then
26684  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26685else
26686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26687for as_dir in $PATH
26688do
26689  IFS=$as_save_IFS
26690  test -z "$as_dir" && as_dir=.
26691    for ac_exec_ext in '' $ac_executable_extensions; do
26692  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26693    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26695    break 2
26696  fi
26697done
26698  done
26699IFS=$as_save_IFS
26700
26701fi
26702fi
26703ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26704if test -n "$ac_ct_OBJDUMP"; then
26705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26706$as_echo "$ac_ct_OBJDUMP" >&6; }
26707else
26708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26709$as_echo "no" >&6; }
26710fi
26711
26712
26713  test -n "$ac_ct_OBJDUMP" && break
26714done
26715
26716  if test "x$ac_ct_OBJDUMP" = x; then
26717    OBJDUMP=""
26718  else
26719    case $cross_compiling:$ac_tool_warned in
26720yes:)
26721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26723ac_tool_warned=yes ;;
26724esac
26725    OBJDUMP=$ac_ct_OBJDUMP
26726  fi
26727fi
26728
26729if test "x$OBJDUMP" != x; then
26730  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26731
26732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26733
26734  # First separate the path from the arguments. This will split at the first
26735  # space.
26736  complete="$OBJDUMP"
26737  path="${complete%% *}"
26738  tmp="$complete EOL"
26739  arguments="${tmp#* }"
26740
26741  # Input might be given as Windows format, start by converting to
26742  # unix format.
26743  new_path=`$CYGPATH -u "$path"`
26744
26745  # Now try to locate executable using which
26746  new_path=`$WHICH "$new_path" 2> /dev/null`
26747  # bat and cmd files are not always considered executable in cygwin causing which
26748  # to not find them
26749  if test "x$new_path" = x \
26750           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26751           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26752    new_path=`$CYGPATH -u "$path"`
26753  fi
26754  if test "x$new_path" = x; then
26755    # Oops. Which didn't find the executable.
26756    # The splitting of arguments from the executable at a space might have been incorrect,
26757    # since paths with space are more likely in Windows. Give it another try with the whole
26758    # argument.
26759    path="$complete"
26760    arguments="EOL"
26761    new_path=`$CYGPATH -u "$path"`
26762    new_path=`$WHICH "$new_path" 2> /dev/null`
26763    # bat and cmd files are not always considered executable in cygwin causing which
26764    # to not find them
26765    if test "x$new_path" = x \
26766             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26767             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26768      new_path=`$CYGPATH -u "$path"`
26769    fi
26770    if test "x$new_path" = x; then
26771      # It's still not found. Now this is an unrecoverable error.
26772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26773$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26774      has_space=`$ECHO "$complete" | $GREP " "`
26775      if test "x$has_space" != x; then
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26778      fi
26779      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26780    fi
26781  fi
26782
26783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26786  # "foo.exe" is OK but "foo" is an error.
26787  #
26788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26789  # It is also a way to make sure we got the proper file name for the real test later on.
26790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26791  if test "x$test_shortpath" = x; then
26792    # Short path failed, file does not exist as specified.
26793    # Try adding .exe or .cmd
26794    if test -f "${new_path}.exe"; then
26795       input_to_shortpath="${new_path}.exe"
26796    elif test -f "${new_path}.cmd"; then
26797       input_to_shortpath="${new_path}.cmd"
26798    else
26799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26800$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26803      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26804    fi
26805  else
26806    input_to_shortpath="$new_path"
26807  fi
26808
26809  # Call helper function which possibly converts this using DOS-style short mode.
26810  # If so, the updated path is stored in $new_path.
26811  new_path="$input_to_shortpath"
26812
26813  input_path="$input_to_shortpath"
26814  # Check if we need to convert this using DOS-style short mode. If the path
26815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26816  # take no chances and rewrite it.
26817  # Note: m4 eats our [], so we need to use [ and ] instead.
26818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26819  if test "x$has_forbidden_chars" != x; then
26820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26824      # Going to short mode and back again did indeed matter. Since short mode is
26825      # case insensitive, let's make it lowercase to improve readability.
26826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26827      # Now convert it back to Unix-stile (cygpath)
26828      input_path=`$CYGPATH -u "$shortmode_path"`
26829      new_path="$input_path"
26830    fi
26831  fi
26832
26833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26834  if test "x$test_cygdrive_prefix" = x; then
26835    # As a simple fix, exclude /usr/bin since it's not a real path.
26836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26838      # a path prefixed by /cygdrive for fixpath to work.
26839      new_path="$CYGWIN_ROOT_PATH$input_path"
26840    fi
26841  fi
26842
26843  # remove trailing .exe if any
26844  new_path="${new_path/%.exe/}"
26845
26846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26847
26848  # First separate the path from the arguments. This will split at the first
26849  # space.
26850  complete="$OBJDUMP"
26851  path="${complete%% *}"
26852  tmp="$complete EOL"
26853  arguments="${tmp#* }"
26854
26855  # Input might be given as Windows format, start by converting to
26856  # unix format.
26857  new_path="$path"
26858
26859  windows_path="$new_path"
26860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26861    unix_path=`$CYGPATH -u "$windows_path"`
26862    new_path="$unix_path"
26863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26865    new_path="$unix_path"
26866  fi
26867
26868
26869  # Now try to locate executable using which
26870  new_path=`$WHICH "$new_path" 2> /dev/null`
26871
26872  if test "x$new_path" = x; then
26873    # Oops. Which didn't find the executable.
26874    # The splitting of arguments from the executable at a space might have been incorrect,
26875    # since paths with space are more likely in Windows. Give it another try with the whole
26876    # argument.
26877    path="$complete"
26878    arguments="EOL"
26879    new_path="$path"
26880
26881  windows_path="$new_path"
26882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26883    unix_path=`$CYGPATH -u "$windows_path"`
26884    new_path="$unix_path"
26885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26887    new_path="$unix_path"
26888  fi
26889
26890
26891    new_path=`$WHICH "$new_path" 2> /dev/null`
26892
26893    if test "x$new_path" = x; then
26894      # It's still not found. Now this is an unrecoverable error.
26895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26896$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26897      has_space=`$ECHO "$complete" | $GREP " "`
26898      if test "x$has_space" != x; then
26899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26901      fi
26902      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26903    fi
26904  fi
26905
26906  # Now new_path has a complete unix path to the binary
26907  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26908    # Keep paths in /bin as-is, but remove trailing .exe if any
26909    new_path="${new_path/%.exe/}"
26910    # Do not save /bin paths to all_fixpath_prefixes!
26911  else
26912    # Not in mixed or Windows style, start by that.
26913    new_path=`cmd //c echo $new_path`
26914
26915  input_path="$new_path"
26916  # Check if we need to convert this using DOS-style short mode. If the path
26917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26918  # take no chances and rewrite it.
26919  # Note: m4 eats our [], so we need to use [ and ] instead.
26920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26921  if test "x$has_forbidden_chars" != x; then
26922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26924  fi
26925
26926    # Output is in $new_path
26927
26928  windows_path="$new_path"
26929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26930    unix_path=`$CYGPATH -u "$windows_path"`
26931    new_path="$unix_path"
26932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26934    new_path="$unix_path"
26935  fi
26936
26937    # remove trailing .exe if any
26938    new_path="${new_path/%.exe/}"
26939
26940    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26941    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26942  fi
26943
26944  else
26945    # We're on a posix platform. Hooray! :)
26946    # First separate the path from the arguments. This will split at the first
26947    # space.
26948    complete="$OBJDUMP"
26949    path="${complete%% *}"
26950    tmp="$complete EOL"
26951    arguments="${tmp#* }"
26952
26953    # Cannot rely on the command "which" here since it doesn't always work.
26954    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26955    if test -z "$is_absolute_path"; then
26956      # Path to executable is not absolute. Find it.
26957      IFS_save="$IFS"
26958      IFS=:
26959      for p in $PATH; do
26960        if test -f "$p/$path" && test -x "$p/$path"; then
26961          new_path="$p/$path"
26962          break
26963        fi
26964      done
26965      IFS="$IFS_save"
26966    else
26967      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26968$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26969      new_path="$path"
26970    fi
26971
26972    if test "x$new_path" = x; then
26973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26974$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26975        has_space=`$ECHO "$complete" | $GREP " "`
26976        if test "x$has_space" != x; then
26977          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26978$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26979        fi
26980        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26981      fi
26982  fi
26983
26984      # Now join together the path and the arguments once again
26985      if test "x$arguments" != xEOL; then
26986        new_complete="$new_path ${arguments% *}"
26987      else
26988        new_complete="$new_path"
26989      fi
26990
26991  if test "x$complete" != "x$new_complete"; then
26992      OBJDUMP="$new_complete"
26993      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26994$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26995    fi
26996
26997fi
26998
26999if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27000   # Extract the first word of "lipo", so it can be a program name with args.
27001set dummy lipo; ac_word=$2
27002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27003$as_echo_n "checking for $ac_word... " >&6; }
27004if test "${ac_cv_path_LIPO+set}" = set; then :
27005  $as_echo_n "(cached) " >&6
27006else
27007  case $LIPO in
27008  [\\/]* | ?:[\\/]*)
27009  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27010  ;;
27011  *)
27012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27013for as_dir in $PATH
27014do
27015  IFS=$as_save_IFS
27016  test -z "$as_dir" && as_dir=.
27017    for ac_exec_ext in '' $ac_executable_extensions; do
27018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27019    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27021    break 2
27022  fi
27023done
27024  done
27025IFS=$as_save_IFS
27026
27027  ;;
27028esac
27029fi
27030LIPO=$ac_cv_path_LIPO
27031if test -n "$LIPO"; then
27032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27033$as_echo "$LIPO" >&6; }
27034else
27035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27036$as_echo "no" >&6; }
27037fi
27038
27039
27040
27041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042
27043  # First separate the path from the arguments. This will split at the first
27044  # space.
27045  complete="$LIPO"
27046  path="${complete%% *}"
27047  tmp="$complete EOL"
27048  arguments="${tmp#* }"
27049
27050  # Input might be given as Windows format, start by converting to
27051  # unix format.
27052  new_path=`$CYGPATH -u "$path"`
27053
27054  # Now try to locate executable using which
27055  new_path=`$WHICH "$new_path" 2> /dev/null`
27056  # bat and cmd files are not always considered executable in cygwin causing which
27057  # to not find them
27058  if test "x$new_path" = x \
27059           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27060           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27061    new_path=`$CYGPATH -u "$path"`
27062  fi
27063  if test "x$new_path" = x; then
27064    # Oops. Which didn't find the executable.
27065    # The splitting of arguments from the executable at a space might have been incorrect,
27066    # since paths with space are more likely in Windows. Give it another try with the whole
27067    # argument.
27068    path="$complete"
27069    arguments="EOL"
27070    new_path=`$CYGPATH -u "$path"`
27071    new_path=`$WHICH "$new_path" 2> /dev/null`
27072    # bat and cmd files are not always considered executable in cygwin causing which
27073    # to not find them
27074    if test "x$new_path" = x \
27075             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27076             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27077      new_path=`$CYGPATH -u "$path"`
27078    fi
27079    if test "x$new_path" = x; then
27080      # It's still not found. Now this is an unrecoverable error.
27081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27082$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27083      has_space=`$ECHO "$complete" | $GREP " "`
27084      if test "x$has_space" != x; then
27085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27087      fi
27088      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27089    fi
27090  fi
27091
27092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27095  # "foo.exe" is OK but "foo" is an error.
27096  #
27097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27098  # It is also a way to make sure we got the proper file name for the real test later on.
27099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27100  if test "x$test_shortpath" = x; then
27101    # Short path failed, file does not exist as specified.
27102    # Try adding .exe or .cmd
27103    if test -f "${new_path}.exe"; then
27104       input_to_shortpath="${new_path}.exe"
27105    elif test -f "${new_path}.cmd"; then
27106       input_to_shortpath="${new_path}.cmd"
27107    else
27108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27109$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27110      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27111$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27112      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27113    fi
27114  else
27115    input_to_shortpath="$new_path"
27116  fi
27117
27118  # Call helper function which possibly converts this using DOS-style short mode.
27119  # If so, the updated path is stored in $new_path.
27120  new_path="$input_to_shortpath"
27121
27122  input_path="$input_to_shortpath"
27123  # Check if we need to convert this using DOS-style short mode. If the path
27124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27125  # take no chances and rewrite it.
27126  # Note: m4 eats our [], so we need to use [ and ] instead.
27127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27128  if test "x$has_forbidden_chars" != x; then
27129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27133      # Going to short mode and back again did indeed matter. Since short mode is
27134      # case insensitive, let's make it lowercase to improve readability.
27135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27136      # Now convert it back to Unix-stile (cygpath)
27137      input_path=`$CYGPATH -u "$shortmode_path"`
27138      new_path="$input_path"
27139    fi
27140  fi
27141
27142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27143  if test "x$test_cygdrive_prefix" = x; then
27144    # As a simple fix, exclude /usr/bin since it's not a real path.
27145    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27147      # a path prefixed by /cygdrive for fixpath to work.
27148      new_path="$CYGWIN_ROOT_PATH$input_path"
27149    fi
27150  fi
27151
27152  # remove trailing .exe if any
27153  new_path="${new_path/%.exe/}"
27154
27155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27156
27157  # First separate the path from the arguments. This will split at the first
27158  # space.
27159  complete="$LIPO"
27160  path="${complete%% *}"
27161  tmp="$complete EOL"
27162  arguments="${tmp#* }"
27163
27164  # Input might be given as Windows format, start by converting to
27165  # unix format.
27166  new_path="$path"
27167
27168  windows_path="$new_path"
27169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27170    unix_path=`$CYGPATH -u "$windows_path"`
27171    new_path="$unix_path"
27172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27174    new_path="$unix_path"
27175  fi
27176
27177
27178  # Now try to locate executable using which
27179  new_path=`$WHICH "$new_path" 2> /dev/null`
27180
27181  if test "x$new_path" = x; then
27182    # Oops. Which didn't find the executable.
27183    # The splitting of arguments from the executable at a space might have been incorrect,
27184    # since paths with space are more likely in Windows. Give it another try with the whole
27185    # argument.
27186    path="$complete"
27187    arguments="EOL"
27188    new_path="$path"
27189
27190  windows_path="$new_path"
27191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27192    unix_path=`$CYGPATH -u "$windows_path"`
27193    new_path="$unix_path"
27194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27196    new_path="$unix_path"
27197  fi
27198
27199
27200    new_path=`$WHICH "$new_path" 2> /dev/null`
27201
27202    if test "x$new_path" = x; then
27203      # It's still not found. Now this is an unrecoverable error.
27204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27205$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27206      has_space=`$ECHO "$complete" | $GREP " "`
27207      if test "x$has_space" != x; then
27208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27210      fi
27211      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27212    fi
27213  fi
27214
27215  # Now new_path has a complete unix path to the binary
27216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27217    # Keep paths in /bin as-is, but remove trailing .exe if any
27218    new_path="${new_path/%.exe/}"
27219    # Do not save /bin paths to all_fixpath_prefixes!
27220  else
27221    # Not in mixed or Windows style, start by that.
27222    new_path=`cmd //c echo $new_path`
27223
27224  input_path="$new_path"
27225  # Check if we need to convert this using DOS-style short mode. If the path
27226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27227  # take no chances and rewrite it.
27228  # Note: m4 eats our [], so we need to use [ and ] instead.
27229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27230  if test "x$has_forbidden_chars" != x; then
27231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27233  fi
27234
27235    # Output is in $new_path
27236
27237  windows_path="$new_path"
27238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27239    unix_path=`$CYGPATH -u "$windows_path"`
27240    new_path="$unix_path"
27241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27243    new_path="$unix_path"
27244  fi
27245
27246    # remove trailing .exe if any
27247    new_path="${new_path/%.exe/}"
27248
27249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27251  fi
27252
27253  else
27254    # We're on a posix platform. Hooray! :)
27255    # First separate the path from the arguments. This will split at the first
27256    # space.
27257    complete="$LIPO"
27258    path="${complete%% *}"
27259    tmp="$complete EOL"
27260    arguments="${tmp#* }"
27261
27262    # Cannot rely on the command "which" here since it doesn't always work.
27263    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27264    if test -z "$is_absolute_path"; then
27265      # Path to executable is not absolute. Find it.
27266      IFS_save="$IFS"
27267      IFS=:
27268      for p in $PATH; do
27269        if test -f "$p/$path" && test -x "$p/$path"; then
27270          new_path="$p/$path"
27271          break
27272        fi
27273      done
27274      IFS="$IFS_save"
27275    else
27276      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27277$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27278      new_path="$path"
27279    fi
27280
27281    if test "x$new_path" = x; then
27282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27283$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27284        has_space=`$ECHO "$complete" | $GREP " "`
27285        if test "x$has_space" != x; then
27286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27288        fi
27289        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27290      fi
27291  fi
27292
27293      # Now join together the path and the arguments once again
27294      if test "x$arguments" != xEOL; then
27295        new_complete="$new_path ${arguments% *}"
27296      else
27297        new_complete="$new_path"
27298      fi
27299
27300  if test "x$complete" != "x$new_complete"; then
27301      LIPO="$new_complete"
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27303$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27304    fi
27305
27306fi
27307
27308# Restore old path without tools dir
27309PATH="$OLD_PATH"
27310
27311
27312# FIXME: Currently we must test this after paths but before flags. Fix!
27313
27314# And we can test some aspects on the target using configure macros.
27315
27316
27317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27318$as_echo_n "checking for ANSI C header files... " >&6; }
27319if test "${ac_cv_header_stdc+set}" = set; then :
27320  $as_echo_n "(cached) " >&6
27321else
27322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27323/* end confdefs.h.  */
27324#include <stdlib.h>
27325#include <stdarg.h>
27326#include <string.h>
27327#include <float.h>
27328
27329int
27330main ()
27331{
27332
27333  ;
27334  return 0;
27335}
27336_ACEOF
27337if ac_fn_cxx_try_compile "$LINENO"; then :
27338  ac_cv_header_stdc=yes
27339else
27340  ac_cv_header_stdc=no
27341fi
27342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27343
27344if test $ac_cv_header_stdc = yes; then
27345  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27347/* end confdefs.h.  */
27348#include <string.h>
27349
27350_ACEOF
27351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27352  $EGREP "memchr" >/dev/null 2>&1; then :
27353
27354else
27355  ac_cv_header_stdc=no
27356fi
27357rm -f conftest*
27358
27359fi
27360
27361if test $ac_cv_header_stdc = yes; then
27362  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27364/* end confdefs.h.  */
27365#include <stdlib.h>
27366
27367_ACEOF
27368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27369  $EGREP "free" >/dev/null 2>&1; then :
27370
27371else
27372  ac_cv_header_stdc=no
27373fi
27374rm -f conftest*
27375
27376fi
27377
27378if test $ac_cv_header_stdc = yes; then
27379  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27380  if test "$cross_compiling" = yes; then :
27381  :
27382else
27383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27384/* end confdefs.h.  */
27385#include <ctype.h>
27386#include <stdlib.h>
27387#if ((' ' & 0x0FF) == 0x020)
27388# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27389# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27390#else
27391# define ISLOWER(c) \
27392		   (('a' <= (c) && (c) <= 'i') \
27393		     || ('j' <= (c) && (c) <= 'r') \
27394		     || ('s' <= (c) && (c) <= 'z'))
27395# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27396#endif
27397
27398#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27399int
27400main ()
27401{
27402  int i;
27403  for (i = 0; i < 256; i++)
27404    if (XOR (islower (i), ISLOWER (i))
27405	|| toupper (i) != TOUPPER (i))
27406      return 2;
27407  return 0;
27408}
27409_ACEOF
27410if ac_fn_cxx_try_run "$LINENO"; then :
27411
27412else
27413  ac_cv_header_stdc=no
27414fi
27415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27416  conftest.$ac_objext conftest.beam conftest.$ac_ext
27417fi
27418
27419fi
27420fi
27421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27422$as_echo "$ac_cv_header_stdc" >&6; }
27423if test $ac_cv_header_stdc = yes; then
27424
27425$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27426
27427fi
27428
27429# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27430for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27431		  inttypes.h stdint.h unistd.h
27432do :
27433  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27434ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27435"
27436if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27437  cat >>confdefs.h <<_ACEOF
27438#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27439_ACEOF
27440
27441fi
27442
27443done
27444
27445
27446
27447###############################################################################
27448#
27449# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27450# (The JVM can use 32 or 64 bit Java pointers but that decision
27451# is made at runtime.)
27452#
27453if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27454  # Always specify -m flags on Solaris
27455
27456  # keep track of c/cxx flags that we added outselves...
27457  #   to prevent emitting warning...
27458  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27459  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27460  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27461
27462  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27463  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27464  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27465
27466  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27467  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27468  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27469
27470elif test "x$COMPILE_TYPE" = xreduced; then
27471  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27472    # Specify -m if running reduced on other Posix platforms
27473
27474  # keep track of c/cxx flags that we added outselves...
27475  #   to prevent emitting warning...
27476  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27477  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27478  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27479
27480  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27481  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27482  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27483
27484  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27485  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27486  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27487
27488  fi
27489fi
27490
27491# Make compilation sanity check
27492for ac_header in stdio.h
27493do :
27494  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27495if test "x$ac_cv_header_stdio_h" = x""yes; then :
27496  cat >>confdefs.h <<_ACEOF
27497#define HAVE_STDIO_H 1
27498_ACEOF
27499
27500else
27501
27502  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27503$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27504  if test "x$COMPILE_TYPE" = xreduced; then
27505    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27506$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27507  elif test "x$COMPILE_TYPE" = xcross; then
27508    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27509$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27510  fi
27511  as_fn_error $? "Cannot continue." "$LINENO" 5
27512
27513fi
27514
27515done
27516
27517
27518# The cast to long int works around a bug in the HP C Compiler
27519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27521# This bug is HP SR number 8606223364.
27522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27523$as_echo_n "checking size of int *... " >&6; }
27524if test "${ac_cv_sizeof_int_p+set}" = set; then :
27525  $as_echo_n "(cached) " >&6
27526else
27527  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27528
27529else
27530  if test "$ac_cv_type_int_p" = yes; then
27531     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27532$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27533as_fn_error 77 "cannot compute sizeof (int *)
27534See \`config.log' for more details" "$LINENO" 5 ; }
27535   else
27536     ac_cv_sizeof_int_p=0
27537   fi
27538fi
27539
27540fi
27541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27542$as_echo "$ac_cv_sizeof_int_p" >&6; }
27543
27544
27545
27546cat >>confdefs.h <<_ACEOF
27547#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27548_ACEOF
27549
27550
27551
27552if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27553  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27554  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27555fi
27556
27557if test "x$SIZEOF_INT_P" = x; then
27558    # The test failed, lets stick to the assumed value.
27559    { $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
27560$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27561else
27562    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27563
27564    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27565        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
27566    fi
27567fi
27568
27569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27570$as_echo_n "checking for target address size... " >&6; }
27571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27572$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27573
27574
27575###############################################################################
27576#
27577# Is the target little of big endian?
27578#
27579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27580$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27581if test "${ac_cv_c_bigendian+set}" = set; then :
27582  $as_echo_n "(cached) " >&6
27583else
27584  ac_cv_c_bigendian=unknown
27585    # See if we're dealing with a universal compiler.
27586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27587/* end confdefs.h.  */
27588#ifndef __APPLE_CC__
27589	       not a universal capable compiler
27590	     #endif
27591	     typedef int dummy;
27592
27593_ACEOF
27594if ac_fn_cxx_try_compile "$LINENO"; then :
27595
27596	# Check for potential -arch flags.  It is not universal unless
27597	# there are at least two -arch flags with different values.
27598	ac_arch=
27599	ac_prev=
27600	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27601	 if test -n "$ac_prev"; then
27602	   case $ac_word in
27603	     i?86 | x86_64 | ppc | ppc64)
27604	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27605		 ac_arch=$ac_word
27606	       else
27607		 ac_cv_c_bigendian=universal
27608		 break
27609	       fi
27610	       ;;
27611	   esac
27612	   ac_prev=
27613	 elif test "x$ac_word" = "x-arch"; then
27614	   ac_prev=arch
27615	 fi
27616       done
27617fi
27618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27619    if test $ac_cv_c_bigendian = unknown; then
27620      # See if sys/param.h defines the BYTE_ORDER macro.
27621      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27622/* end confdefs.h.  */
27623#include <sys/types.h>
27624	     #include <sys/param.h>
27625
27626int
27627main ()
27628{
27629#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27630		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27631		     && LITTLE_ENDIAN)
27632	      bogus endian macros
27633	     #endif
27634
27635  ;
27636  return 0;
27637}
27638_ACEOF
27639if ac_fn_cxx_try_compile "$LINENO"; then :
27640  # It does; now see whether it defined to BIG_ENDIAN or not.
27641	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27642/* end confdefs.h.  */
27643#include <sys/types.h>
27644		#include <sys/param.h>
27645
27646int
27647main ()
27648{
27649#if BYTE_ORDER != BIG_ENDIAN
27650		 not big endian
27651		#endif
27652
27653  ;
27654  return 0;
27655}
27656_ACEOF
27657if ac_fn_cxx_try_compile "$LINENO"; then :
27658  ac_cv_c_bigendian=yes
27659else
27660  ac_cv_c_bigendian=no
27661fi
27662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27663fi
27664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27665    fi
27666    if test $ac_cv_c_bigendian = unknown; then
27667      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27668      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27669/* end confdefs.h.  */
27670#include <limits.h>
27671
27672int
27673main ()
27674{
27675#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27676	      bogus endian macros
27677	     #endif
27678
27679  ;
27680  return 0;
27681}
27682_ACEOF
27683if ac_fn_cxx_try_compile "$LINENO"; then :
27684  # It does; now see whether it defined to _BIG_ENDIAN or not.
27685	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27686/* end confdefs.h.  */
27687#include <limits.h>
27688
27689int
27690main ()
27691{
27692#ifndef _BIG_ENDIAN
27693		 not big endian
27694		#endif
27695
27696  ;
27697  return 0;
27698}
27699_ACEOF
27700if ac_fn_cxx_try_compile "$LINENO"; then :
27701  ac_cv_c_bigendian=yes
27702else
27703  ac_cv_c_bigendian=no
27704fi
27705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27706fi
27707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27708    fi
27709    if test $ac_cv_c_bigendian = unknown; then
27710      # Compile a test program.
27711      if test "$cross_compiling" = yes; then :
27712  # Try to guess by grepping values from an object file.
27713	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27714/* end confdefs.h.  */
27715short int ascii_mm[] =
27716		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27717		short int ascii_ii[] =
27718		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27719		int use_ascii (int i) {
27720		  return ascii_mm[i] + ascii_ii[i];
27721		}
27722		short int ebcdic_ii[] =
27723		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27724		short int ebcdic_mm[] =
27725		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27726		int use_ebcdic (int i) {
27727		  return ebcdic_mm[i] + ebcdic_ii[i];
27728		}
27729		extern int foo;
27730
27731int
27732main ()
27733{
27734return use_ascii (foo) == use_ebcdic (foo);
27735  ;
27736  return 0;
27737}
27738_ACEOF
27739if ac_fn_cxx_try_compile "$LINENO"; then :
27740  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27741	      ac_cv_c_bigendian=yes
27742	    fi
27743	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27744	      if test "$ac_cv_c_bigendian" = unknown; then
27745		ac_cv_c_bigendian=no
27746	      else
27747		# finding both strings is unlikely to happen, but who knows?
27748		ac_cv_c_bigendian=unknown
27749	      fi
27750	    fi
27751fi
27752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27753else
27754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27755/* end confdefs.h.  */
27756$ac_includes_default
27757int
27758main ()
27759{
27760
27761	     /* Are we little or big endian?  From Harbison&Steele.  */
27762	     union
27763	     {
27764	       long int l;
27765	       char c[sizeof (long int)];
27766	     } u;
27767	     u.l = 1;
27768	     return u.c[sizeof (long int) - 1] == 1;
27769
27770  ;
27771  return 0;
27772}
27773_ACEOF
27774if ac_fn_cxx_try_run "$LINENO"; then :
27775  ac_cv_c_bigendian=no
27776else
27777  ac_cv_c_bigendian=yes
27778fi
27779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27780  conftest.$ac_objext conftest.beam conftest.$ac_ext
27781fi
27782
27783    fi
27784fi
27785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27786$as_echo "$ac_cv_c_bigendian" >&6; }
27787 case $ac_cv_c_bigendian in #(
27788   yes)
27789     ENDIAN="big";; #(
27790   no)
27791     ENDIAN="little" ;; #(
27792   universal)
27793     ENDIAN="universal_endianness"
27794     ;; #(
27795   *)
27796     ENDIAN="unknown" ;;
27797 esac
27798
27799
27800if test "x$ENDIAN" = xuniversal_endianness; then
27801    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27802fi
27803if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27804    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
27805fi
27806
27807
27808# Configure flags for the tools
27809
27810
27811###############################################################################
27812#
27813# How to compile shared libraries.
27814#
27815
27816if test "x$GCC" = xyes; then
27817    COMPILER_NAME=gcc
27818    PICFLAG="-fPIC"
27819    LIBRARY_PREFIX=lib
27820    SHARED_LIBRARY='lib$1.so'
27821    STATIC_LIBRARY='lib$1.a'
27822    SHARED_LIBRARY_FLAGS="-shared"
27823    SHARED_LIBRARY_SUFFIX='.so'
27824    STATIC_LIBRARY_SUFFIX='.a'
27825    OBJ_SUFFIX='.o'
27826    EXE_SUFFIX=''
27827    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27828    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27829    C_FLAG_REORDER=''
27830    CXX_FLAG_REORDER=''
27831    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27832    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27833    LD="$CC"
27834    LDEXE="$CC"
27835    LDCXX="$CXX"
27836    LDEXECXX="$CXX"
27837    POST_STRIP_CMD="$STRIP -g"
27838
27839    # Linking is different on MacOSX
27840    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27841        # Might change in the future to clang.
27842        COMPILER_NAME=gcc
27843        SHARED_LIBRARY='lib$1.dylib'
27844        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27845        SHARED_LIBRARY_SUFFIX='.dylib'
27846        EXE_SUFFIX=''
27847        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27848        SET_SHARED_LIBRARY_MAPFILE=''
27849        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27850        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27851        POST_STRIP_CMD="$STRIP -S"
27852    fi
27853else
27854    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27855        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27856        COMPILER_NAME=ossc
27857        PICFLAG="-KPIC"
27858        LIBRARY_PREFIX=lib
27859        SHARED_LIBRARY='lib$1.so'
27860        STATIC_LIBRARY='lib$1.a'
27861        SHARED_LIBRARY_FLAGS="-G"
27862        SHARED_LIBRARY_SUFFIX='.so'
27863        STATIC_LIBRARY_SUFFIX='.a'
27864        OBJ_SUFFIX='.o'
27865        EXE_SUFFIX=''
27866        SET_SHARED_LIBRARY_NAME=''
27867        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27868	C_FLAG_REORDER='-xF'
27869	CXX_FLAG_REORDER='-xF'
27870        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27871        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27872        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27873        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27874        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27875        POST_STRIP_CMD="$STRIP -x"
27876        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27877    fi
27878    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27879        # If it is not gcc, then assume it is the MS Visual Studio compiler
27880        COMPILER_NAME=cl
27881        PICFLAG=""
27882        LIBRARY_PREFIX=
27883        SHARED_LIBRARY='$1.dll'
27884        STATIC_LIBRARY='$1.lib'
27885        SHARED_LIBRARY_FLAGS="-LD"
27886        SHARED_LIBRARY_SUFFIX='.dll'
27887        STATIC_LIBRARY_SUFFIX='.lib'
27888        OBJ_SUFFIX='.obj'
27889        EXE_SUFFIX='.exe'
27890        SET_SHARED_LIBRARY_NAME=''
27891        SET_SHARED_LIBRARY_MAPFILE=''
27892        SET_SHARED_LIBRARY_ORIGIN=''
27893        SET_EXECUTABLE_ORIGIN=''
27894    fi
27895fi
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914# The (cross) compiler is now configured, we can now test capabilities
27915# of the target platform.
27916
27917
27918
27919###############################################################################
27920#
27921# Setup the opt flags for different compilers
27922# and different operating systems.
27923#
27924
27925#
27926# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27927#
27928if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27929    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27930    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27931    CFLAGS="$CFLAGS -mstackrealign"
27932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27933$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27934    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27935/* end confdefs.h.  */
27936int main() { return 0; }
27937_ACEOF
27938if ac_fn_cxx_try_link "$LINENO"; then :
27939
27940		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27941$as_echo "yes" >&6; }
27942
27943else
27944
27945		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27946$as_echo "no" >&6; }
27947	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27948
27949fi
27950rm -f core conftest.err conftest.$ac_objext \
27951    conftest$ac_exeext conftest.$ac_ext
27952fi
27953
27954C_FLAG_DEPS="-MMD -MF"
27955CXX_FLAG_DEPS="-MMD -MF"
27956
27957case $COMPILER_TYPE in
27958  CC )
27959    D_FLAG="-g"
27960    case $COMPILER_NAME in
27961      gcc )
27962      	case $OPENJDK_TARGET_OS in
27963	  macosx )
27964	    # On MacOSX we optimize for size, something
27965	    # we should do for all platforms?
27966	    C_O_FLAG_HI="-Os"
27967	    C_O_FLAG_NORM="-Os"
27968	    C_O_FLAG_NONE=""
27969	    ;;
27970	  *)
27971	    C_O_FLAG_HI="-O3"
27972	    C_O_FLAG_NORM="-O2"
27973	    C_O_FLAG_NONE="-O0"
27974	    CFLAGS_DEBUG_SYMBOLS="-g"
27975	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27976	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27977	       CFLAGS_DEBUG_SYMBOLS="-g1"
27978	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27979	    fi
27980	    ;;
27981	esac
27982        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27983        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27984        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27985        ;;
27986      ossc )
27987        #
27988        # Forte has different names for this with their C++ compiler...
27989        #
27990        C_FLAG_DEPS="-xMMD -xMF"
27991        CXX_FLAG_DEPS="-xMMD -xMF"
27992
27993        # Extra options used with HIGHEST
27994        #
27995        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27996        #          done with care, there are some assumptions below that need to
27997        #          be understood about the use of pointers, and IEEE behavior.
27998        #
27999        # Use non-standard floating point mode (not IEEE 754)
28000        CC_HIGHEST="$CC_HIGHEST -fns"
28001        # Do some simplification of floating point arithmetic (not IEEE 754)
28002        CC_HIGHEST="$CC_HIGHEST -fsimple"
28003        # Use single precision floating point with 'float'
28004        CC_HIGHEST="$CC_HIGHEST -fsingle"
28005        # Assume memory references via basic pointer types do not alias
28006        #   (Source with excessing pointer casting and data access with mixed
28007        #    pointer types are not recommended)
28008        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28009        # Use intrinsic or inline versions for math/std functions
28010        #   (If you expect perfect errno behavior, do not use this)
28011        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28012        # Loop data dependency optimizations (need -xO3 or higher)
28013        CC_HIGHEST="$CC_HIGHEST -xdepend"
28014        # Pointer parameters to functions do not overlap
28015        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28016        #    If you pass in multiple pointers to the same data, do not use this)
28017        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28018        # Inline some library routines
28019        #   (If you expect perfect errno behavior, do not use this)
28020        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28021        # Use optimized math routines
28022        #   (If you expect perfect errno behavior, do not use this)
28023        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28024        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28025
28026        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28027          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28028          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28029        fi
28030
28031        case $OPENJDK_TARGET_CPU_ARCH in
28032          x86)
28033            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28034            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28035            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28036            C_O_FLAG_NONE="-xregs=no%frameptr"
28037            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28038            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28039            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28040            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28041            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28042               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28043               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28044            fi
28045            ;;
28046          sparc)
28047            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28048            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28049            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28050            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28051            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28052            C_O_FLAG_NONE=""
28053            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28054            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28055            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28056            CXX_O_FLAG_NONE=""
28057            ;;
28058        esac
28059
28060    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28061    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28062    esac
28063    ;;
28064  CL )
28065    D_FLAG=
28066    C_O_FLAG_HIGHEST="-O2"
28067    C_O_FLAG_HI="-O1"
28068    C_O_FLAG_NORM="-O1"
28069    C_O_FLAG_NONE="-Od"
28070    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28071    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28072    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28073    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28074    ;;
28075esac
28076
28077if test -z "$C_O_FLAG_HIGHEST"; then
28078   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28079fi
28080
28081if test -z "$CXX_O_FLAG_HIGHEST"; then
28082   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28083fi
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28099   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28100$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28101fi
28102
28103if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28104   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28105$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28106fi
28107
28108if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28109   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28110$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28111fi
28112
28113
28114# Check whether --with-extra-cflags was given.
28115if test "${with_extra_cflags+set}" = set; then :
28116  withval=$with_extra_cflags;
28117fi
28118
28119
28120
28121# Check whether --with-extra-cxxflags was given.
28122if test "${with_extra_cxxflags+set}" = set; then :
28123  withval=$with_extra_cxxflags;
28124fi
28125
28126
28127
28128# Check whether --with-extra-ldflags was given.
28129if test "${with_extra_ldflags+set}" = set; then :
28130  withval=$with_extra_ldflags;
28131fi
28132
28133
28134CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28135CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28136LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28137
28138# Hotspot needs these set in their legacy form
28139LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28140LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28141LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28142
28143
28144
28145
28146
28147###############################################################################
28148#
28149# Now setup the CFLAGS and LDFLAGS for the JDK build.
28150# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28151#
28152case $COMPILER_NAME in
28153      gcc )
28154      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28155                          -pipe \
28156                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28157	  case $OPENJDK_TARGET_CPU_ARCH in
28158	  arm )
28159            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28160	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28161	  ;;
28162	  ppc )
28163            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28164	  ;;
28165	  * )
28166	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28167	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28168          ;;
28169	  esac
28170          ;;
28171      ossc )
28172          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28173          case $OPENJDK_TARGET_CPU_ARCH in
28174          x86 )
28175            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28176       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28177          ;;
28178          esac
28179
28180      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28181      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28182
28183          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28184          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28185          ;;
28186      cl )
28187          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28188               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28189	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28190	       -DWIN32 -DIAL"
28191          case $OPENJDK_TARGET_CPU in
28192              x86 )
28193                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28194                  ;;
28195              x86_64 )
28196                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28197                  ;;
28198          esac
28199          ;;
28200esac
28201
28202###############################################################################
28203
28204CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28205
28206# The package path is used only on macosx?
28207PACKAGE_PATH=/opt/local
28208
28209
28210if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28211    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28212    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28213    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28214    #   Note: -Dmacro         is the same as    #define macro 1
28215    #         -Dmacro=	    is the same as    #define macro
28216    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28217        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28218    else
28219        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28220    fi
28221else
28222    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28223fi
28224if test "x$OPENJDK_TARGET_OS" = xlinux; then
28225    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28226fi
28227if test "x$OPENJDK_TARGET_OS" = xwindows; then
28228    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28229fi
28230if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28231    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28232fi
28233if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28234    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28235fi
28236if test "x$OPENJDK_TARGET_OS" = xbsd; then
28237    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28238fi
28239if test "x$DEBUG_LEVEL" = xrelease; then
28240    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28241    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28242        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28243    fi
28244else
28245    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28246fi
28247
28248CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28249CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28250
28251CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28252        -I${JDK_OUTPUTDIR}/include \
28253        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28254        -I${JDK_TOPDIR}/src/share/javavm/export \
28255        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28256        -I${JDK_TOPDIR}/src/share/native/common \
28257        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28258
28259# The shared libraries are compiled using the picflag.
28260CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28261CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28262
28263# Executable flags
28264CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28265CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28266
28267# Now this is odd. The JDK native libraries have to link against libjvm.so
28268# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28269# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28270# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28271# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28272# libraries will link to whatever is in memory. Yuck.
28273#
28274# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28275if test "x$COMPILER_NAME" = xcl; then
28276    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28277    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28278        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28279    fi
28280    # TODO: make -debug optional "--disable-full-debug-symbols"
28281    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28282    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28283    LDFLAGS_JDKLIB_SUFFIX=""
28284    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28285        LDFLAGS_STACK_SIZE=1048576
28286    else
28287        LDFLAGS_STACK_SIZE=327680
28288    fi
28289    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28290else
28291    if test "x$COMPILER_NAME" = xgcc; then
28292        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28293        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28294        if test -n "$HAS_GNU_HASH"; then
28295            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28296        fi
28297        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28298          # And since we now know that the linker is gnu, then add -z defs, to forbid
28299          # undefined symbols in object files.
28300          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28301          if test "x$DEBUG_LEVEL" = "xrelease"; then
28302              # When building release libraries, tell the linker optimize them.
28303              # Should this be supplied to the OSS linker as well?
28304              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28305          fi
28306        fi
28307    fi
28308    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28309                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28310
28311    # On some platforms (mac) the linker warns about non existing -L dirs.
28312    # Add server first if available. Linking aginst client does not always produce the same results.
28313    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28314    # Default to server for other variants.
28315    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28316        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28317    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28318        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28319    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28320        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28321    else
28322        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28323    fi
28324
28325    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28326    if test "x$COMPILER_NAME" = xossc; then
28327        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28328    fi
28329
28330    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28331    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28332        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28333    fi
28334fi
28335
28336# Adjust flags according to debug level.
28337case $DEBUG_LEVEL in
28338      fastdebug )
28339              CFLAGS="$CFLAGS $D_FLAG"
28340              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28341              ;;
28342      slowdebug )
28343              CFLAGS="$CFLAGS $D_FLAG"
28344	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28345	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28346	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28347	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28348              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28349              ;;
28350esac
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366# Setup debug symbols (need objcopy from the toolchain for that)
28367
28368#
28369# ENABLE_DEBUG_SYMBOLS
28370# This must be done after the toolchain is setup, since we're looking at objcopy.
28371#
28372# Check whether --enable-debug-symbols was given.
28373if test "${enable_debug_symbols+set}" = set; then :
28374  enableval=$enable_debug_symbols;
28375fi
28376
28377
28378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28379$as_echo_n "checking if we should generate debug symbols... " >&6; }
28380
28381if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28382   # explicit enabling of enable-debug-symbols and can't find objcopy
28383   #   this is an error
28384   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28385fi
28386
28387if test "x$enable_debug_symbols" = "xyes"; then
28388  ENABLE_DEBUG_SYMBOLS=true
28389elif test "x$enable_debug_symbols" = "xno"; then
28390  ENABLE_DEBUG_SYMBOLS=false
28391else
28392  # default on macosx is false
28393  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28394    ENABLE_DEBUG_SYMBOLS=false
28395  # Default is on if objcopy is found, otherwise off
28396  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28397    ENABLE_DEBUG_SYMBOLS=true
28398  else
28399    ENABLE_DEBUG_SYMBOLS=false
28400  fi
28401fi
28402
28403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28404$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28405
28406#
28407# ZIP_DEBUGINFO_FILES
28408#
28409# Check whether --enable-zip-debug-info was given.
28410if test "${enable_zip_debug_info+set}" = set; then :
28411  enableval=$enable_zip_debug_info;
28412fi
28413
28414
28415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28416$as_echo_n "checking if we should zip debug-info files... " >&6; }
28417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28418$as_echo "${enable_zip_debug_info}" >&6; }
28419
28420if test "x${enable_zip_debug_info}" = "xno"; then
28421   ZIP_DEBUGINFO_FILES=false
28422else
28423   ZIP_DEBUGINFO_FILES=true
28424fi
28425
28426
28427
28428
28429
28430
28431
28432###############################################################################
28433#
28434# Check dependencies for external and internal libraries.
28435#
28436###############################################################################
28437
28438
28439
28440###############################################################################
28441#
28442# OS specific settings that we never will need to probe.
28443#
28444if test "x$OPENJDK_TARGET_OS" = xlinux; then
28445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28446$as_echo_n "checking what is not needed on Linux?... " >&6; }
28447    PULSE_NOT_NEEDED=yes
28448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28449$as_echo "pulse" >&6; }
28450fi
28451
28452if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28454$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28455    ALSA_NOT_NEEDED=yes
28456    PULSE_NOT_NEEDED=yes
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28458$as_echo "alsa pulse" >&6; }
28459fi
28460
28461if test "x$OPENJDK_TARGET_OS" = xwindows; then
28462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28463$as_echo_n "checking what is not needed on Windows?... " >&6; }
28464    CUPS_NOT_NEEDED=yes
28465    ALSA_NOT_NEEDED=yes
28466    PULSE_NOT_NEEDED=yes
28467    X11_NOT_NEEDED=yes
28468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28469$as_echo "alsa cups pulse x11" >&6; }
28470fi
28471
28472if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28474$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28475    ALSA_NOT_NEEDED=yes
28476    PULSE_NOT_NEEDED=yes
28477    X11_NOT_NEEDED=yes
28478    FREETYPE2_NOT_NEEDED=yes
28479    # If the java runtime framework is disabled, then we need X11.
28480    # This will be adjusted below.
28481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28482$as_echo "alsa pulse x11" >&6; }
28483fi
28484
28485if test "x$OPENJDK_TARGET_OS" = xbsd; then
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28487$as_echo_n "checking what is not needed on bsd?... " >&6; }
28488    ALSA_NOT_NEEDED=yes
28489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28490$as_echo "alsa" >&6; }
28491fi
28492
28493if test "x$OPENJDK" = "xfalse"; then
28494    FREETYPE2_NOT_NEEDED=yes
28495fi
28496
28497if test "x$SUPPORT_HEADFUL" = xno; then
28498    X11_NOT_NEEDED=yes
28499fi
28500
28501###############################################################################
28502#
28503# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28504# that uses this API.
28505#
28506# Check whether --enable-macosx-runtime-support was given.
28507if test "${enable_macosx_runtime_support+set}" = set; then :
28508  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28509else
28510  MACOSX_RUNTIME_SUPPORT="no"
28511fi
28512
28513
28514USE_MACOSX_RUNTIME_SUPPORT=no
28515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28516$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28517if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28518    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28519        MACOSX_RUNTIME_SUPPORT=yes
28520        USE_MACOSX_RUNTIME_SUPPORT=yes
28521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28522$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28523    else
28524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28525$as_echo "yes, but explicitly disabled." >&6; }
28526    fi
28527else
28528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28529$as_echo "no" >&6; }
28530fi
28531
28532if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28534$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28535    X11_NOT_NEEDED=
28536    FREETYPE2_NOT_NEEDED=
28537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28538$as_echo "alsa pulse" >&6; }
28539fi
28540
28541
28542
28543
28544###############################################################################
28545#
28546# Check for X Windows
28547#
28548
28549# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28550# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28551# --x-libraries for the sysroot, if that seems to be correct.
28552if test "x$SYS_ROOT" != "x/"; then
28553  if test "x$x_includes" = xNONE; then
28554    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28555      x_includes="$SYS_ROOT/usr/X11R6/include"
28556    fi
28557  fi
28558  if test "x$x_libraries" = xNONE; then
28559    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28560      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28561    fi
28562  fi
28563fi
28564
28565# Now let autoconf do it's magic
28566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28567$as_echo_n "checking for X... " >&6; }
28568
28569
28570# Check whether --with-x was given.
28571if test "${with_x+set}" = set; then :
28572  withval=$with_x;
28573fi
28574
28575# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28576if test "x$with_x" = xno; then
28577  # The user explicitly disabled X.
28578  have_x=disabled
28579else
28580  case $x_includes,$x_libraries in #(
28581    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28582    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28583  $as_echo_n "(cached) " >&6
28584else
28585  # One or both of the vars are not set, and there is no cached value.
28586ac_x_includes=no ac_x_libraries=no
28587rm -f -r conftest.dir
28588if mkdir conftest.dir; then
28589  cd conftest.dir
28590  cat >Imakefile <<'_ACEOF'
28591incroot:
28592	@echo incroot='${INCROOT}'
28593usrlibdir:
28594	@echo usrlibdir='${USRLIBDIR}'
28595libdir:
28596	@echo libdir='${LIBDIR}'
28597_ACEOF
28598  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28599    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28600    for ac_var in incroot usrlibdir libdir; do
28601      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28602    done
28603    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28604    for ac_extension in a so sl dylib la dll; do
28605      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28606	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28607	ac_im_usrlibdir=$ac_im_libdir; break
28608      fi
28609    done
28610    # Screen out bogus values from the imake configuration.  They are
28611    # bogus both because they are the default anyway, and because
28612    # using them would break gcc on systems where it needs fixed includes.
28613    case $ac_im_incroot in
28614	/usr/include) ac_x_includes= ;;
28615	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28616    esac
28617    case $ac_im_usrlibdir in
28618	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28619	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28620    esac
28621  fi
28622  cd ..
28623  rm -f -r conftest.dir
28624fi
28625
28626# Standard set of common directories for X headers.
28627# Check X11 before X11Rn because it is often a symlink to the current release.
28628ac_x_header_dirs='
28629/usr/X11/include
28630/usr/X11R7/include
28631/usr/X11R6/include
28632/usr/X11R5/include
28633/usr/X11R4/include
28634
28635/usr/include/X11
28636/usr/include/X11R7
28637/usr/include/X11R6
28638/usr/include/X11R5
28639/usr/include/X11R4
28640
28641/usr/local/X11/include
28642/usr/local/X11R7/include
28643/usr/local/X11R6/include
28644/usr/local/X11R5/include
28645/usr/local/X11R4/include
28646
28647/usr/local/include/X11
28648/usr/local/include/X11R7
28649/usr/local/include/X11R6
28650/usr/local/include/X11R5
28651/usr/local/include/X11R4
28652
28653/usr/X386/include
28654/usr/x386/include
28655/usr/XFree86/include/X11
28656
28657/usr/include
28658/usr/local/include
28659/usr/unsupported/include
28660/usr/athena/include
28661/usr/local/x11r5/include
28662/usr/lpp/Xamples/include
28663
28664/usr/openwin/include
28665/usr/openwin/share/include'
28666
28667if test "$ac_x_includes" = no; then
28668  # Guess where to find include files, by looking for Xlib.h.
28669  # First, try using that file with no special directory specified.
28670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28671/* end confdefs.h.  */
28672#include <X11/Xlib.h>
28673_ACEOF
28674if ac_fn_cxx_try_cpp "$LINENO"; then :
28675  # We can compile using X headers with no special include directory.
28676ac_x_includes=
28677else
28678  for ac_dir in $ac_x_header_dirs; do
28679  if test -r "$ac_dir/X11/Xlib.h"; then
28680    ac_x_includes=$ac_dir
28681    break
28682  fi
28683done
28684fi
28685rm -f conftest.err conftest.i conftest.$ac_ext
28686fi # $ac_x_includes = no
28687
28688if test "$ac_x_libraries" = no; then
28689  # Check for the libraries.
28690  # See if we find them without any special options.
28691  # Don't add to $LIBS permanently.
28692  ac_save_LIBS=$LIBS
28693  LIBS="-lX11 $LIBS"
28694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28695/* end confdefs.h.  */
28696#include <X11/Xlib.h>
28697int
28698main ()
28699{
28700XrmInitialize ()
28701  ;
28702  return 0;
28703}
28704_ACEOF
28705if ac_fn_cxx_try_link "$LINENO"; then :
28706  LIBS=$ac_save_LIBS
28707# We can link X programs with no special library path.
28708ac_x_libraries=
28709else
28710  LIBS=$ac_save_LIBS
28711for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28712do
28713  # Don't even attempt the hair of trying to link an X program!
28714  for ac_extension in a so sl dylib la dll; do
28715    if test -r "$ac_dir/libX11.$ac_extension"; then
28716      ac_x_libraries=$ac_dir
28717      break 2
28718    fi
28719  done
28720done
28721fi
28722rm -f core conftest.err conftest.$ac_objext \
28723    conftest$ac_exeext conftest.$ac_ext
28724fi # $ac_x_libraries = no
28725
28726case $ac_x_includes,$ac_x_libraries in #(
28727  no,* | *,no | *\'*)
28728    # Didn't find X, or a directory has "'" in its name.
28729    ac_cv_have_x="have_x=no";; #(
28730  *)
28731    # Record where we found X for the cache.
28732    ac_cv_have_x="have_x=yes\
28733	ac_x_includes='$ac_x_includes'\
28734	ac_x_libraries='$ac_x_libraries'"
28735esac
28736fi
28737;; #(
28738    *) have_x=yes;;
28739  esac
28740  eval "$ac_cv_have_x"
28741fi # $with_x != no
28742
28743if test "$have_x" != yes; then
28744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28745$as_echo "$have_x" >&6; }
28746  no_x=yes
28747else
28748  # If each of the values was on the command line, it overrides each guess.
28749  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28750  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28751  # Update the cache value to reflect the command line values.
28752  ac_cv_have_x="have_x=yes\
28753	ac_x_includes='$x_includes'\
28754	ac_x_libraries='$x_libraries'"
28755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28756$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28757fi
28758
28759if test "$no_x" = yes; then
28760  # Not all programs may use this symbol, but it does not hurt to define it.
28761
28762$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28763
28764  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28765else
28766  if test -n "$x_includes"; then
28767    X_CFLAGS="$X_CFLAGS -I$x_includes"
28768  fi
28769
28770  # It would also be nice to do this for all -L options, not just this one.
28771  if test -n "$x_libraries"; then
28772    X_LIBS="$X_LIBS -L$x_libraries"
28773    # For Solaris; some versions of Sun CC require a space after -R and
28774    # others require no space.  Words are not sufficient . . . .
28775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28776$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28777    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28778    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28779    ac_cxx_werror_flag=yes
28780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28781/* end confdefs.h.  */
28782
28783int
28784main ()
28785{
28786
28787  ;
28788  return 0;
28789}
28790_ACEOF
28791if ac_fn_cxx_try_link "$LINENO"; then :
28792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28793$as_echo "no" >&6; }
28794       X_LIBS="$X_LIBS -R$x_libraries"
28795else
28796  LIBS="$ac_xsave_LIBS -R $x_libraries"
28797       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28798/* end confdefs.h.  */
28799
28800int
28801main ()
28802{
28803
28804  ;
28805  return 0;
28806}
28807_ACEOF
28808if ac_fn_cxx_try_link "$LINENO"; then :
28809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28810$as_echo "yes" >&6; }
28811	  X_LIBS="$X_LIBS -R $x_libraries"
28812else
28813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28814$as_echo "neither works" >&6; }
28815fi
28816rm -f core conftest.err conftest.$ac_objext \
28817    conftest$ac_exeext conftest.$ac_ext
28818fi
28819rm -f core conftest.err conftest.$ac_objext \
28820    conftest$ac_exeext conftest.$ac_ext
28821    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28822    LIBS=$ac_xsave_LIBS
28823  fi
28824
28825  # Check for system-dependent libraries X programs must link with.
28826  # Do this before checking for the system-independent R6 libraries
28827  # (-lICE), since we may need -lsocket or whatever for X linking.
28828
28829  if test "$ISC" = yes; then
28830    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28831  else
28832    # Martyn Johnson says this is needed for Ultrix, if the X
28833    # libraries were built with DECnet support.  And Karl Berry says
28834    # the Alpha needs dnet_stub (dnet does not exist).
28835    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28836    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28837/* end confdefs.h.  */
28838
28839/* Override any GCC internal prototype to avoid an error.
28840   Use char because int might match the return type of a GCC
28841   builtin and then its argument prototype would still apply.  */
28842#ifdef __cplusplus
28843extern "C"
28844#endif
28845char XOpenDisplay ();
28846int
28847main ()
28848{
28849return XOpenDisplay ();
28850  ;
28851  return 0;
28852}
28853_ACEOF
28854if ac_fn_cxx_try_link "$LINENO"; then :
28855
28856else
28857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28858$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28859if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28860  $as_echo_n "(cached) " >&6
28861else
28862  ac_check_lib_save_LIBS=$LIBS
28863LIBS="-ldnet  $LIBS"
28864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28865/* end confdefs.h.  */
28866
28867/* Override any GCC internal prototype to avoid an error.
28868   Use char because int might match the return type of a GCC
28869   builtin and then its argument prototype would still apply.  */
28870#ifdef __cplusplus
28871extern "C"
28872#endif
28873char dnet_ntoa ();
28874int
28875main ()
28876{
28877return dnet_ntoa ();
28878  ;
28879  return 0;
28880}
28881_ACEOF
28882if ac_fn_cxx_try_link "$LINENO"; then :
28883  ac_cv_lib_dnet_dnet_ntoa=yes
28884else
28885  ac_cv_lib_dnet_dnet_ntoa=no
28886fi
28887rm -f core conftest.err conftest.$ac_objext \
28888    conftest$ac_exeext conftest.$ac_ext
28889LIBS=$ac_check_lib_save_LIBS
28890fi
28891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28892$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28893if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28894  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28895fi
28896
28897    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28899$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28900if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28901  $as_echo_n "(cached) " >&6
28902else
28903  ac_check_lib_save_LIBS=$LIBS
28904LIBS="-ldnet_stub  $LIBS"
28905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28906/* end confdefs.h.  */
28907
28908/* Override any GCC internal prototype to avoid an error.
28909   Use char because int might match the return type of a GCC
28910   builtin and then its argument prototype would still apply.  */
28911#ifdef __cplusplus
28912extern "C"
28913#endif
28914char dnet_ntoa ();
28915int
28916main ()
28917{
28918return dnet_ntoa ();
28919  ;
28920  return 0;
28921}
28922_ACEOF
28923if ac_fn_cxx_try_link "$LINENO"; then :
28924  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28925else
28926  ac_cv_lib_dnet_stub_dnet_ntoa=no
28927fi
28928rm -f core conftest.err conftest.$ac_objext \
28929    conftest$ac_exeext conftest.$ac_ext
28930LIBS=$ac_check_lib_save_LIBS
28931fi
28932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28933$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28934if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28935  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28936fi
28937
28938    fi
28939fi
28940rm -f core conftest.err conftest.$ac_objext \
28941    conftest$ac_exeext conftest.$ac_ext
28942    LIBS="$ac_xsave_LIBS"
28943
28944    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28945    # to get the SysV transport functions.
28946    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28947    # needs -lnsl.
28948    # The nsl library prevents programs from opening the X display
28949    # on Irix 5.2, according to T.E. Dickey.
28950    # The functions gethostbyname, getservbyname, and inet_addr are
28951    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28952    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28953if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28954
28955fi
28956
28957    if test $ac_cv_func_gethostbyname = no; then
28958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28959$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28960if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28961  $as_echo_n "(cached) " >&6
28962else
28963  ac_check_lib_save_LIBS=$LIBS
28964LIBS="-lnsl  $LIBS"
28965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28966/* end confdefs.h.  */
28967
28968/* Override any GCC internal prototype to avoid an error.
28969   Use char because int might match the return type of a GCC
28970   builtin and then its argument prototype would still apply.  */
28971#ifdef __cplusplus
28972extern "C"
28973#endif
28974char gethostbyname ();
28975int
28976main ()
28977{
28978return gethostbyname ();
28979  ;
28980  return 0;
28981}
28982_ACEOF
28983if ac_fn_cxx_try_link "$LINENO"; then :
28984  ac_cv_lib_nsl_gethostbyname=yes
28985else
28986  ac_cv_lib_nsl_gethostbyname=no
28987fi
28988rm -f core conftest.err conftest.$ac_objext \
28989    conftest$ac_exeext conftest.$ac_ext
28990LIBS=$ac_check_lib_save_LIBS
28991fi
28992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28993$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28994if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28995  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28996fi
28997
28998      if test $ac_cv_lib_nsl_gethostbyname = no; then
28999	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29000$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29001if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29002  $as_echo_n "(cached) " >&6
29003else
29004  ac_check_lib_save_LIBS=$LIBS
29005LIBS="-lbsd  $LIBS"
29006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29007/* end confdefs.h.  */
29008
29009/* Override any GCC internal prototype to avoid an error.
29010   Use char because int might match the return type of a GCC
29011   builtin and then its argument prototype would still apply.  */
29012#ifdef __cplusplus
29013extern "C"
29014#endif
29015char gethostbyname ();
29016int
29017main ()
29018{
29019return gethostbyname ();
29020  ;
29021  return 0;
29022}
29023_ACEOF
29024if ac_fn_cxx_try_link "$LINENO"; then :
29025  ac_cv_lib_bsd_gethostbyname=yes
29026else
29027  ac_cv_lib_bsd_gethostbyname=no
29028fi
29029rm -f core conftest.err conftest.$ac_objext \
29030    conftest$ac_exeext conftest.$ac_ext
29031LIBS=$ac_check_lib_save_LIBS
29032fi
29033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29034$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29035if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29036  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29037fi
29038
29039      fi
29040    fi
29041
29042    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29043    # socket/setsockopt and other routines are undefined under SCO ODT
29044    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29045    # on later versions), says Simon Leinen: it contains gethostby*
29046    # variants that don't use the name server (or something).  -lsocket
29047    # must be given before -lnsl if both are needed.  We assume that
29048    # if connect needs -lnsl, so does gethostbyname.
29049    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29050if test "x$ac_cv_func_connect" = x""yes; then :
29051
29052fi
29053
29054    if test $ac_cv_func_connect = no; then
29055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29056$as_echo_n "checking for connect in -lsocket... " >&6; }
29057if test "${ac_cv_lib_socket_connect+set}" = set; then :
29058  $as_echo_n "(cached) " >&6
29059else
29060  ac_check_lib_save_LIBS=$LIBS
29061LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29063/* end confdefs.h.  */
29064
29065/* Override any GCC internal prototype to avoid an error.
29066   Use char because int might match the return type of a GCC
29067   builtin and then its argument prototype would still apply.  */
29068#ifdef __cplusplus
29069extern "C"
29070#endif
29071char connect ();
29072int
29073main ()
29074{
29075return connect ();
29076  ;
29077  return 0;
29078}
29079_ACEOF
29080if ac_fn_cxx_try_link "$LINENO"; then :
29081  ac_cv_lib_socket_connect=yes
29082else
29083  ac_cv_lib_socket_connect=no
29084fi
29085rm -f core conftest.err conftest.$ac_objext \
29086    conftest$ac_exeext conftest.$ac_ext
29087LIBS=$ac_check_lib_save_LIBS
29088fi
29089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29090$as_echo "$ac_cv_lib_socket_connect" >&6; }
29091if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29092  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29093fi
29094
29095    fi
29096
29097    # Guillermo Gomez says -lposix is necessary on A/UX.
29098    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29099if test "x$ac_cv_func_remove" = x""yes; then :
29100
29101fi
29102
29103    if test $ac_cv_func_remove = no; then
29104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29105$as_echo_n "checking for remove in -lposix... " >&6; }
29106if test "${ac_cv_lib_posix_remove+set}" = set; then :
29107  $as_echo_n "(cached) " >&6
29108else
29109  ac_check_lib_save_LIBS=$LIBS
29110LIBS="-lposix  $LIBS"
29111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29112/* end confdefs.h.  */
29113
29114/* Override any GCC internal prototype to avoid an error.
29115   Use char because int might match the return type of a GCC
29116   builtin and then its argument prototype would still apply.  */
29117#ifdef __cplusplus
29118extern "C"
29119#endif
29120char remove ();
29121int
29122main ()
29123{
29124return remove ();
29125  ;
29126  return 0;
29127}
29128_ACEOF
29129if ac_fn_cxx_try_link "$LINENO"; then :
29130  ac_cv_lib_posix_remove=yes
29131else
29132  ac_cv_lib_posix_remove=no
29133fi
29134rm -f core conftest.err conftest.$ac_objext \
29135    conftest$ac_exeext conftest.$ac_ext
29136LIBS=$ac_check_lib_save_LIBS
29137fi
29138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29139$as_echo "$ac_cv_lib_posix_remove" >&6; }
29140if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29141  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29142fi
29143
29144    fi
29145
29146    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29147    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29148if test "x$ac_cv_func_shmat" = x""yes; then :
29149
29150fi
29151
29152    if test $ac_cv_func_shmat = no; then
29153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29154$as_echo_n "checking for shmat in -lipc... " >&6; }
29155if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29156  $as_echo_n "(cached) " >&6
29157else
29158  ac_check_lib_save_LIBS=$LIBS
29159LIBS="-lipc  $LIBS"
29160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29161/* end confdefs.h.  */
29162
29163/* Override any GCC internal prototype to avoid an error.
29164   Use char because int might match the return type of a GCC
29165   builtin and then its argument prototype would still apply.  */
29166#ifdef __cplusplus
29167extern "C"
29168#endif
29169char shmat ();
29170int
29171main ()
29172{
29173return shmat ();
29174  ;
29175  return 0;
29176}
29177_ACEOF
29178if ac_fn_cxx_try_link "$LINENO"; then :
29179  ac_cv_lib_ipc_shmat=yes
29180else
29181  ac_cv_lib_ipc_shmat=no
29182fi
29183rm -f core conftest.err conftest.$ac_objext \
29184    conftest$ac_exeext conftest.$ac_ext
29185LIBS=$ac_check_lib_save_LIBS
29186fi
29187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29188$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29189if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29190  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29191fi
29192
29193    fi
29194  fi
29195
29196  # Check for libraries that X11R6 Xt/Xaw programs need.
29197  ac_save_LDFLAGS=$LDFLAGS
29198  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29199  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29200  # check for ICE first), but we must link in the order -lSM -lICE or
29201  # we get undefined symbols.  So assume we have SM if we have ICE.
29202  # These have to be linked with before -lX11, unlike the other
29203  # libraries we check for below, so use a different variable.
29204  # John Interrante, Karl Berry
29205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29206$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29207if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29208  $as_echo_n "(cached) " >&6
29209else
29210  ac_check_lib_save_LIBS=$LIBS
29211LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29213/* end confdefs.h.  */
29214
29215/* Override any GCC internal prototype to avoid an error.
29216   Use char because int might match the return type of a GCC
29217   builtin and then its argument prototype would still apply.  */
29218#ifdef __cplusplus
29219extern "C"
29220#endif
29221char IceConnectionNumber ();
29222int
29223main ()
29224{
29225return IceConnectionNumber ();
29226  ;
29227  return 0;
29228}
29229_ACEOF
29230if ac_fn_cxx_try_link "$LINENO"; then :
29231  ac_cv_lib_ICE_IceConnectionNumber=yes
29232else
29233  ac_cv_lib_ICE_IceConnectionNumber=no
29234fi
29235rm -f core conftest.err conftest.$ac_objext \
29236    conftest$ac_exeext conftest.$ac_ext
29237LIBS=$ac_check_lib_save_LIBS
29238fi
29239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29240$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29241if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29242  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29243fi
29244
29245  LDFLAGS=$ac_save_LDFLAGS
29246
29247fi
29248
29249
29250if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29251
29252    # Print a helpful message on how to acquire the necessary build dependency.
29253    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29254    MISSING_DEPENDENCY=x11
29255    PKGHANDLER_COMMAND=
29256
29257    case $PKGHANDLER in
29258	apt-get)
29259                apt_help     $MISSING_DEPENDENCY ;;
29260    yum)
29261                yum_help     $MISSING_DEPENDENCY ;;
29262	port)
29263                port_help    $MISSING_DEPENDENCY ;;
29264	pkgutil)
29265                pkgutil_help $MISSING_DEPENDENCY ;;
29266	pkgadd)
29267                pkgadd_help  $MISSING_DEPENDENCY ;;
29268    * )
29269      break ;;
29270    esac
29271
29272    if test "x$PKGHANDLER_COMMAND" != x; then
29273        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29274    fi
29275
29276    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29277fi
29278
29279# Some of the old makefiles require a setting of OPENWIN_HOME
29280# Since the X11R6 directory has disappeared on later Linuxes,
29281# we need to probe for it.
29282if test "x$OPENJDK_TARGET_OS" = xlinux; then
29283    if test -d "$SYS_ROOT/usr/X11R6"; then
29284        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29285    fi
29286    if test -d "$SYS_ROOT/usr/include/X11"; then
29287        OPENWIN_HOME="$SYS_ROOT/usr"
29288    fi
29289fi
29290if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29291    OPENWIN_HOME="/usr/openwin"
29292fi
29293
29294
29295
29296#
29297# Weird Sol10 something check...TODO change to try compile
29298#
29299if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29300  if test "`uname -r`" = "5.10"; then
29301     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29302     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29303     fi
29304  fi
29305fi
29306
29307ac_ext=c
29308ac_cpp='$CPP $CPPFLAGS'
29309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29311ac_compiler_gnu=$ac_cv_c_compiler_gnu
29312
29313OLD_CFLAGS="$CFLAGS"
29314CFLAGS="$CFLAGS $X_CFLAGS"
29315
29316# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29317for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29318do :
29319  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29320ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29321                   # include <X11/Xutil.h>
29322
29323"
29324if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29325  cat >>confdefs.h <<_ACEOF
29326#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29327_ACEOF
29328 X11_A_OK=yes
29329else
29330  X11_A_OK=no
29331fi
29332
29333done
29334
29335
29336CFLAGS="$OLD_CFLAGS"
29337ac_ext=cpp
29338ac_cpp='$CXXCPP $CPPFLAGS'
29339ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29340ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29341ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29342
29343
29344if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29345
29346    # Print a helpful message on how to acquire the necessary build dependency.
29347    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29348    MISSING_DEPENDENCY=x11
29349    PKGHANDLER_COMMAND=
29350
29351    case $PKGHANDLER in
29352	apt-get)
29353                apt_help     $MISSING_DEPENDENCY ;;
29354    yum)
29355                yum_help     $MISSING_DEPENDENCY ;;
29356	port)
29357                port_help    $MISSING_DEPENDENCY ;;
29358	pkgutil)
29359                pkgutil_help $MISSING_DEPENDENCY ;;
29360	pkgadd)
29361                pkgadd_help  $MISSING_DEPENDENCY ;;
29362    * )
29363      break ;;
29364    esac
29365
29366    if test "x$PKGHANDLER_COMMAND" != x; then
29367        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29368    fi
29369
29370    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29371fi
29372
29373
29374
29375
29376
29377
29378###############################################################################
29379#
29380# The common unix printing system cups is used to print from java.
29381#
29382
29383# Check whether --with-cups was given.
29384if test "${with_cups+set}" = set; then :
29385  withval=$with_cups;
29386fi
29387
29388
29389# Check whether --with-cups-include was given.
29390if test "${with_cups_include+set}" = set; then :
29391  withval=$with_cups_include;
29392fi
29393
29394
29395if test "x$CUPS_NOT_NEEDED" = xyes; then
29396	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29397		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29398$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29399	fi
29400	CUPS_CFLAGS=
29401else
29402	CUPS_FOUND=no
29403
29404	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29405	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29406	fi
29407
29408	if test "x${with_cups}" != x; then
29409	    CUPS_CFLAGS="-I${with_cups}/include"
29410	    CUPS_FOUND=yes
29411	fi
29412	if test "x${with_cups_include}" != x; then
29413	    CUPS_CFLAGS="-I${with_cups_include}"
29414	    CUPS_FOUND=yes
29415	fi
29416	if test "x$CUPS_FOUND" = xno; then
29417
29418
29419    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29420        # Source the builddeps file again, to make sure it uses the latest variables!
29421        . $builddepsfile
29422        # Look for a target and build machine specific resource!
29423        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29424        if test "x$resource" = x; then
29425            # Ok, lets instead look for a target specific resource
29426            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29427        fi
29428        if test "x$resource" = x; then
29429            # Ok, lets instead look for a build specific resource
29430            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29431        fi
29432        if test "x$resource" = x; then
29433            # Ok, lets instead look for a generic resource
29434            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29435            resource=${builddep_cups}
29436        fi
29437        if test "x$resource" != x; then
29438            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29439$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29440	    # If the resource in the builddeps.conf file is an existing directory,
29441	    # for example /java/linux/cups
29442	    if test -d ${resource}; then
29443	       depdir=${resource}
29444	    else
29445
29446# cups is for example mymodule
29447# $resource is for example libs/general/libmymod_1_2_3.zip
29448# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29449# $with_builddeps_dir is for example /localhome/builddeps
29450# depdir is the name of the variable into which we store the depdir, eg MYMOD
29451# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29452# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29453    filename=`basename $resource`
29454    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29455    filebase=${filename%%.*}
29456    extension=${filename#*.}
29457    installdir=$with_builddeps_dir/$filebase
29458    if test ! -f $installdir/$filename.unpacked; then
29459        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29460$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29461        if test ! -d $installdir; then
29462            mkdir -p $installdir
29463        fi
29464        if test ! -d $installdir; then
29465            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29466        fi
29467        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29468        touch $tmpfile
29469        if test ! -f $tmpfile; then
29470            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29471        fi
29472
29473    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29474    # $tmpfile is the local file name for the downloaded file.
29475    VALID_TOOL=no
29476    if test "x$BDEPS_FTP" = xwget; then
29477       VALID_TOOL=yes
29478       wget -O $tmpfile $with_builddeps_server/$resource
29479    fi
29480    if test "x$BDEPS_FTP" = xlftp; then
29481       VALID_TOOL=yes
29482       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29483    fi
29484    if test "x$BDEPS_FTP" = xftp; then
29485        VALID_TOOL=yes
29486        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29487        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29488        FTPUSERPWD=${FTPSERVER%%@*}
29489        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29490            FTPUSER=${userpwd%%:*}
29491            FTPPWD=${userpwd#*@}
29492            FTPSERVER=${FTPSERVER#*@}
29493        else
29494            FTPUSER=ftp
29495            FTPPWD=ftp
29496        fi
29497        # the "pass" command does not work on some
29498        # ftp clients (read ftp.exe) but if it works,
29499        # passive mode is better!
29500        (\
29501            echo "user $FTPUSER $FTPPWD"        ;\
29502            echo "pass"                         ;\
29503            echo "bin"                          ;\
29504            echo "get $FTPPATH $tmpfile"              ;\
29505        ) | ftp -in $FTPSERVER
29506    fi
29507    if test "x$VALID_TOOL" != xyes; then
29508       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29509    fi
29510
29511        mv $tmpfile $installdir/$filename
29512        if test ! -s $installdir/$filename; then
29513            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29514        fi
29515        case "$extension" in
29516            zip)  echo "Unzipping $installdir/$filename..."
29517               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29518            ;;
29519            tar.gz) echo "Untaring $installdir/$filename..."
29520               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29521            ;;
29522            tgz) echo "Untaring $installdir/$filename..."
29523               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29524            ;;
29525            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29526            ;;
29527        esac
29528    fi
29529    if test -f $installdir/$filename.unpacked; then
29530        depdir=$installdir
29531    fi
29532
29533	    fi
29534            # Source the builddeps file again, because in the previous command, the depdir
29535            # was updated to point at the current build dependency install directory.
29536            . $builddepsfile
29537            # Now extract variables from the builddeps.conf files.
29538            theroot=${builddep_cups_ROOT}
29539            thecflags=${builddep_cups_CFLAGS}
29540            thelibs=${builddep_cups_LIBS}
29541            if test "x$depdir" = x; then
29542                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29543            fi
29544            CUPS=$depdir
29545            if test "x$theroot" != x; then
29546               CUPS="$theroot"
29547            fi
29548            if test "x$thecflags" != x; then
29549               CUPS_CFLAGS="$thecflags"
29550            fi
29551            if test "x$thelibs" != x; then
29552               CUPS_LIBS="$thelibs"
29553            fi
29554            CUPS_FOUND=yes
29555
29556        fi
29557
29558    fi
29559
29560	fi
29561	if test "x$CUPS_FOUND" = xno; then
29562	    # Are the cups headers installed in the default /usr/include location?
29563	    for ac_header in cups/cups.h cups/ppd.h
29564do :
29565  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29566ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29567if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29568  cat >>confdefs.h <<_ACEOF
29569#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29570_ACEOF
29571 CUPS_FOUND=yes
29572	                      CUPS_CFLAGS=
29573	                      DEFAULT_CUPS=yes
29574fi
29575
29576done
29577
29578	fi
29579	if test "x$CUPS_FOUND" = xno; then
29580	    # Getting nervous now? Lets poke around for standard Solaris third-party
29581	    # package installation locations.
29582	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29583$as_echo_n "checking for cups headers... " >&6; }
29584	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29585	       # An SFW package seems to be installed!
29586	       CUPS_FOUND=yes
29587	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29588	    elif test -s /opt/csw/include/cups/cups.h; then
29589	       # A CSW package seems to be installed!
29590	       CUPS_FOUND=yes
29591	       CUPS_CFLAGS="-I/opt/csw/include"
29592	    fi
29593	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29594$as_echo "$CUPS_FOUND" >&6; }
29595	fi
29596	if test "x$CUPS_FOUND" = xno; then
29597
29598    # Print a helpful message on how to acquire the necessary build dependency.
29599    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29600    MISSING_DEPENDENCY=cups
29601    PKGHANDLER_COMMAND=
29602
29603    case $PKGHANDLER in
29604	apt-get)
29605                apt_help     $MISSING_DEPENDENCY ;;
29606    yum)
29607                yum_help     $MISSING_DEPENDENCY ;;
29608	port)
29609                port_help    $MISSING_DEPENDENCY ;;
29610	pkgutil)
29611                pkgutil_help $MISSING_DEPENDENCY ;;
29612	pkgadd)
29613                pkgadd_help  $MISSING_DEPENDENCY ;;
29614    * )
29615      break ;;
29616    esac
29617
29618    if test "x$PKGHANDLER_COMMAND" != x; then
29619        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29620    fi
29621
29622	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29623	fi
29624fi
29625
29626
29627
29628
29629
29630
29631###############################################################################
29632#
29633# The ubiquitous freetype2 library is used to render fonts.
29634#
29635
29636# Check whether --with-freetype was given.
29637if test "${with_freetype+set}" = set; then :
29638  withval=$with_freetype;
29639fi
29640
29641
29642# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29643USING_SYSTEM_FT_LIB=false
29644
29645if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29646	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29647		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29648$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29649	fi
29650	FREETYPE2_CFLAGS=
29651	FREETYPE2_LIBS=
29652        FREETYPE2_LIB_PATH=
29653else
29654	FREETYPE2_FOUND=no
29655
29656	if test "x$with_freetype" != x; then
29657
29658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29659
29660  # Input might be given as Windows format, start by converting to
29661  # unix format.
29662  path="$with_freetype"
29663  new_path=`$CYGPATH -u "$path"`
29664
29665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29668  # "foo.exe" is OK but "foo" is an error.
29669  #
29670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29671  # It is also a way to make sure we got the proper file name for the real test later on.
29672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29673  if test "x$test_shortpath" = x; then
29674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29675$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29676    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29677  fi
29678
29679  # Call helper function which possibly converts this using DOS-style short mode.
29680  # If so, the updated path is stored in $new_path.
29681
29682  input_path="$new_path"
29683  # Check if we need to convert this using DOS-style short mode. If the path
29684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29685  # take no chances and rewrite it.
29686  # Note: m4 eats our [], so we need to use [ and ] instead.
29687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29688  if test "x$has_forbidden_chars" != x; then
29689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29693      # Going to short mode and back again did indeed matter. Since short mode is
29694      # case insensitive, let's make it lowercase to improve readability.
29695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29696      # Now convert it back to Unix-stile (cygpath)
29697      input_path=`$CYGPATH -u "$shortmode_path"`
29698      new_path="$input_path"
29699    fi
29700  fi
29701
29702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29703  if test "x$test_cygdrive_prefix" = x; then
29704    # As a simple fix, exclude /usr/bin since it's not a real path.
29705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29707      # a path prefixed by /cygdrive for fixpath to work.
29708      new_path="$CYGWIN_ROOT_PATH$input_path"
29709    fi
29710  fi
29711
29712
29713  if test "x$path" != "x$new_path"; then
29714    with_freetype="$new_path"
29715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29716$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29717  fi
29718
29719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29720
29721  path="$with_freetype"
29722  has_colon=`$ECHO $path | $GREP ^.:`
29723  new_path="$path"
29724  if test "x$has_colon" = x; then
29725    # Not in mixed or Windows style, start by that.
29726    new_path=`cmd //c echo $path`
29727  fi
29728
29729
29730  input_path="$new_path"
29731  # Check if we need to convert this using DOS-style short mode. If the path
29732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29733  # take no chances and rewrite it.
29734  # Note: m4 eats our [], so we need to use [ and ] instead.
29735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29736  if test "x$has_forbidden_chars" != x; then
29737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29739  fi
29740
29741
29742  windows_path="$new_path"
29743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29744    unix_path=`$CYGPATH -u "$windows_path"`
29745    new_path="$unix_path"
29746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29748    new_path="$unix_path"
29749  fi
29750
29751  if test "x$path" != "x$new_path"; then
29752    with_freetype="$new_path"
29753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29754$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29755  fi
29756
29757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29759
29760  else
29761    # We're on a posix platform. Hooray! :)
29762    path="$with_freetype"
29763
29764    if test ! -f "$path" && test ! -d "$path"; then
29765      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29766    fi
29767
29768    has_space=`$ECHO "$path" | $GREP " "`
29769    if test "x$has_space" != x; then
29770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29771$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29772      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29773    fi
29774  fi
29775
29776	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29777            FREETYPE2_LIB_PATH="$with_freetype/lib"
29778            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29779                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29780                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29781            fi
29782            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29783                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29784            fi
29785	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29786            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29787                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29788            fi
29789 	    FREETYPE2_FOUND=yes
29790   	    if test "x$FREETYPE2_FOUND" = xyes; then
29791	        # Verify that the directories exist
29792                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29793		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29794		fi
29795	        # List the contents of the lib.
29796		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29797                if test "x$FREETYPELIB" = x; then
29798		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29799		fi
29800	        # Check one h-file
29801                if ! test -s "$with_freetype/include/ft2build.h"; then
29802		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29803		fi
29804            fi
29805        fi
29806	if test "x$FREETYPE2_FOUND" = xno; then
29807
29808
29809    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29810        # Source the builddeps file again, to make sure it uses the latest variables!
29811        . $builddepsfile
29812        # Look for a target and build machine specific resource!
29813        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29814        if test "x$resource" = x; then
29815            # Ok, lets instead look for a target specific resource
29816            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29817        fi
29818        if test "x$resource" = x; then
29819            # Ok, lets instead look for a build specific resource
29820            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29821        fi
29822        if test "x$resource" = x; then
29823            # Ok, lets instead look for a generic resource
29824            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29825            resource=${builddep_freetype2}
29826        fi
29827        if test "x$resource" != x; then
29828            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29829$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29830	    # If the resource in the builddeps.conf file is an existing directory,
29831	    # for example /java/linux/cups
29832	    if test -d ${resource}; then
29833	       depdir=${resource}
29834	    else
29835
29836# freetype2 is for example mymodule
29837# $resource is for example libs/general/libmymod_1_2_3.zip
29838# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29839# $with_builddeps_dir is for example /localhome/builddeps
29840# depdir is the name of the variable into which we store the depdir, eg MYMOD
29841# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29842# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29843    filename=`basename $resource`
29844    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29845    filebase=${filename%%.*}
29846    extension=${filename#*.}
29847    installdir=$with_builddeps_dir/$filebase
29848    if test ! -f $installdir/$filename.unpacked; then
29849        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29850$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29851        if test ! -d $installdir; then
29852            mkdir -p $installdir
29853        fi
29854        if test ! -d $installdir; then
29855            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29856        fi
29857        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29858        touch $tmpfile
29859        if test ! -f $tmpfile; then
29860            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29861        fi
29862
29863    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29864    # $tmpfile is the local file name for the downloaded file.
29865    VALID_TOOL=no
29866    if test "x$BDEPS_FTP" = xwget; then
29867       VALID_TOOL=yes
29868       wget -O $tmpfile $with_builddeps_server/$resource
29869    fi
29870    if test "x$BDEPS_FTP" = xlftp; then
29871       VALID_TOOL=yes
29872       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29873    fi
29874    if test "x$BDEPS_FTP" = xftp; then
29875        VALID_TOOL=yes
29876        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29877        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29878        FTPUSERPWD=${FTPSERVER%%@*}
29879        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29880            FTPUSER=${userpwd%%:*}
29881            FTPPWD=${userpwd#*@}
29882            FTPSERVER=${FTPSERVER#*@}
29883        else
29884            FTPUSER=ftp
29885            FTPPWD=ftp
29886        fi
29887        # the "pass" command does not work on some
29888        # ftp clients (read ftp.exe) but if it works,
29889        # passive mode is better!
29890        (\
29891            echo "user $FTPUSER $FTPPWD"        ;\
29892            echo "pass"                         ;\
29893            echo "bin"                          ;\
29894            echo "get $FTPPATH $tmpfile"              ;\
29895        ) | ftp -in $FTPSERVER
29896    fi
29897    if test "x$VALID_TOOL" != xyes; then
29898       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29899    fi
29900
29901        mv $tmpfile $installdir/$filename
29902        if test ! -s $installdir/$filename; then
29903            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29904        fi
29905        case "$extension" in
29906            zip)  echo "Unzipping $installdir/$filename..."
29907               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29908            ;;
29909            tar.gz) echo "Untaring $installdir/$filename..."
29910               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29911            ;;
29912            tgz) echo "Untaring $installdir/$filename..."
29913               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29914            ;;
29915            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29916            ;;
29917        esac
29918    fi
29919    if test -f $installdir/$filename.unpacked; then
29920        depdir=$installdir
29921    fi
29922
29923	    fi
29924            # Source the builddeps file again, because in the previous command, the depdir
29925            # was updated to point at the current build dependency install directory.
29926            . $builddepsfile
29927            # Now extract variables from the builddeps.conf files.
29928            theroot=${builddep_freetype2_ROOT}
29929            thecflags=${builddep_freetype2_CFLAGS}
29930            thelibs=${builddep_freetype2_LIBS}
29931            if test "x$depdir" = x; then
29932                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29933            fi
29934            FREETYPE2=$depdir
29935            if test "x$theroot" != x; then
29936               FREETYPE2="$theroot"
29937            fi
29938            if test "x$thecflags" != x; then
29939               FREETYPE2_CFLAGS="$thecflags"
29940            fi
29941            if test "x$thelibs" != x; then
29942               FREETYPE2_LIBS="$thelibs"
29943            fi
29944            FREETYPE2_FOUND=yes
29945            else FREETYPE2_FOUND=no
29946
29947        fi
29948        else FREETYPE2_FOUND=no
29949
29950    fi
29951
29952            USING_SYSTEM_FT_LIB=true
29953	fi
29954	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29955            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29956
29957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29958
29959  # Input might be given as Windows format, start by converting to
29960  # unix format.
29961  path="$FREETYPELOCATION"
29962  new_path=`$CYGPATH -u "$path"`
29963
29964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29967  # "foo.exe" is OK but "foo" is an error.
29968  #
29969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29970  # It is also a way to make sure we got the proper file name for the real test later on.
29971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29972  if test "x$test_shortpath" = x; then
29973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29974$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29975    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29976  fi
29977
29978  # Call helper function which possibly converts this using DOS-style short mode.
29979  # If so, the updated path is stored in $new_path.
29980
29981  input_path="$new_path"
29982  # Check if we need to convert this using DOS-style short mode. If the path
29983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29984  # take no chances and rewrite it.
29985  # Note: m4 eats our [], so we need to use [ and ] instead.
29986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29987  if test "x$has_forbidden_chars" != x; then
29988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29992      # Going to short mode and back again did indeed matter. Since short mode is
29993      # case insensitive, let's make it lowercase to improve readability.
29994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29995      # Now convert it back to Unix-stile (cygpath)
29996      input_path=`$CYGPATH -u "$shortmode_path"`
29997      new_path="$input_path"
29998    fi
29999  fi
30000
30001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30002  if test "x$test_cygdrive_prefix" = x; then
30003    # As a simple fix, exclude /usr/bin since it's not a real path.
30004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30006      # a path prefixed by /cygdrive for fixpath to work.
30007      new_path="$CYGWIN_ROOT_PATH$input_path"
30008    fi
30009  fi
30010
30011
30012  if test "x$path" != "x$new_path"; then
30013    FREETYPELOCATION="$new_path"
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30015$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30016  fi
30017
30018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019
30020  path="$FREETYPELOCATION"
30021  has_colon=`$ECHO $path | $GREP ^.:`
30022  new_path="$path"
30023  if test "x$has_colon" = x; then
30024    # Not in mixed or Windows style, start by that.
30025    new_path=`cmd //c echo $path`
30026  fi
30027
30028
30029  input_path="$new_path"
30030  # Check if we need to convert this using DOS-style short mode. If the path
30031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30032  # take no chances and rewrite it.
30033  # Note: m4 eats our [], so we need to use [ and ] instead.
30034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30035  if test "x$has_forbidden_chars" != x; then
30036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30038  fi
30039
30040
30041  windows_path="$new_path"
30042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30043    unix_path=`$CYGPATH -u "$windows_path"`
30044    new_path="$unix_path"
30045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30047    new_path="$unix_path"
30048  fi
30049
30050  if test "x$path" != "x$new_path"; then
30051    FREETYPELOCATION="$new_path"
30052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30053$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30054  fi
30055
30056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30058
30059  else
30060    # We're on a posix platform. Hooray! :)
30061    path="$FREETYPELOCATION"
30062
30063    if test ! -f "$path" && test ! -d "$path"; then
30064      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30065    fi
30066
30067    has_space=`$ECHO "$path" | $GREP " "`
30068    if test "x$has_space" != x; then
30069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30070$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30071      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30072    fi
30073  fi
30074
30075	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30076$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30077	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30078	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30079	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30080 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30081                if ! test -s "$FREETYPE2_LIBS"; then
30082		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30083		fi
30084                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30085		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30086		fi
30087                USING_SYSTEM_FT_LIB=true
30088                FREETYPE2_FOUND=yes
30089	    fi
30090	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30091$as_echo "$FREETYPE2_FOUND" >&6; }
30092        fi
30093	if test "x$FREETYPE2_FOUND" = xno; then
30094
30095pkg_failed=no
30096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30097$as_echo_n "checking for FREETYPE2... " >&6; }
30098
30099if test -n "$FREETYPE2_CFLAGS"; then
30100    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30101 elif test -n "$PKG_CONFIG"; then
30102    if test -n "$PKG_CONFIG" && \
30103    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30104  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30105  ac_status=$?
30106  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30107  test $ac_status = 0; }; then
30108  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30109else
30110  pkg_failed=yes
30111fi
30112 else
30113    pkg_failed=untried
30114fi
30115if test -n "$FREETYPE2_LIBS"; then
30116    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30117 elif test -n "$PKG_CONFIG"; then
30118    if test -n "$PKG_CONFIG" && \
30119    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30120  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30121  ac_status=$?
30122  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30123  test $ac_status = 0; }; then
30124  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30125else
30126  pkg_failed=yes
30127fi
30128 else
30129    pkg_failed=untried
30130fi
30131
30132
30133
30134if test $pkg_failed = yes; then
30135
30136if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30137        _pkg_short_errors_supported=yes
30138else
30139        _pkg_short_errors_supported=no
30140fi
30141        if test $_pkg_short_errors_supported = yes; then
30142	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30143        else
30144	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30145        fi
30146	# Put the nasty error message in config.log where it belongs
30147	echo "$FREETYPE2_PKG_ERRORS" >&5
30148
30149	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30150$as_echo "no" >&6; }
30151                FREETYPE2_FOUND=no
30152elif test $pkg_failed = untried; then
30153	FREETYPE2_FOUND=no
30154else
30155	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30156	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30158$as_echo "yes" >&6; }
30159	FREETYPE2_FOUND=yes
30160fi
30161            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30162            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30163            USING_SYSTEM_FT_LIB=true
30164            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30165            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30166              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30167            fi
30168	fi
30169	if test "x$FREETYPE2_FOUND" = xno; then
30170	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30171$as_echo_n "checking for freetype in some standard locations... " >&6; }
30172
30173	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30174	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30175	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30176	    fi
30177	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30178	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30179	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30180	    fi
30181
30182	    PREV_CXXCFLAGS="$CXXFLAGS"
30183	    PREV_LDFLAGS="$LDFLAGS"
30184	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30185	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30186	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30187/* end confdefs.h.  */
30188#include<ft2build.h>
30189	                    #include FT_FREETYPE_H
30190	                   int main() { return 0; }
30191
30192_ACEOF
30193if ac_fn_cxx_try_link "$LINENO"; then :
30194
30195	                      # Yes, the default cflags and libs did the trick.
30196	                      FREETYPE2_FOUND=yes
30197	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30198	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30199
30200else
30201
30202	                      FREETYPE2_FOUND=no
30203
30204fi
30205rm -f core conftest.err conftest.$ac_objext \
30206    conftest$ac_exeext conftest.$ac_ext
30207            CXXCFLAGS="$PREV_CXXFLAGS"
30208	    LDFLAGS="$PREV_LDFLAGS"
30209	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30210$as_echo "$FREETYPE2_FOUND" >&6; }
30211            USING_SYSTEM_FT_LIB=true
30212	fi
30213	if test "x$FREETYPE2_FOUND" = xno; then
30214
30215    # Print a helpful message on how to acquire the necessary build dependency.
30216    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30217    MISSING_DEPENDENCY=freetype2
30218    PKGHANDLER_COMMAND=
30219
30220    case $PKGHANDLER in
30221	apt-get)
30222                apt_help     $MISSING_DEPENDENCY ;;
30223    yum)
30224                yum_help     $MISSING_DEPENDENCY ;;
30225	port)
30226                port_help    $MISSING_DEPENDENCY ;;
30227	pkgutil)
30228                pkgutil_help $MISSING_DEPENDENCY ;;
30229	pkgadd)
30230                pkgadd_help  $MISSING_DEPENDENCY ;;
30231    * )
30232      break ;;
30233    esac
30234
30235    if test "x$PKGHANDLER_COMMAND" != x; then
30236        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30237    fi
30238
30239		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30240	fi
30241
30242        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30243            # AC_CHECK_LIB does not support use of cl.exe
30244            PREV_LDFLAGS="$LDFLAGS"
30245            LDFLAGS="$FREETYPE2_LIBS"
30246            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30247$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30248if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30249  $as_echo_n "(cached) " >&6
30250else
30251  ac_check_lib_save_LIBS=$LIBS
30252LIBS="-lfreetype  $LIBS"
30253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30254/* end confdefs.h.  */
30255
30256/* Override any GCC internal prototype to avoid an error.
30257   Use char because int might match the return type of a GCC
30258   builtin and then its argument prototype would still apply.  */
30259#ifdef __cplusplus
30260extern "C"
30261#endif
30262char FT_Init_FreeType ();
30263int
30264main ()
30265{
30266return FT_Init_FreeType ();
30267  ;
30268  return 0;
30269}
30270_ACEOF
30271if ac_fn_cxx_try_link "$LINENO"; then :
30272  ac_cv_lib_freetype_FT_Init_FreeType=yes
30273else
30274  ac_cv_lib_freetype_FT_Init_FreeType=no
30275fi
30276rm -f core conftest.err conftest.$ac_objext \
30277    conftest$ac_exeext conftest.$ac_ext
30278LIBS=$ac_check_lib_save_LIBS
30279fi
30280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30281$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30282if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30283  FREETYPE2_FOUND=true
30284else
30285  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30286fi
30287
30288            LDFLAGS="$PREV_LDFLAGS"
30289        fi
30290fi
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300###############################################################################
30301#
30302# Check for alsa headers and libraries. Used on Linux/GNU systems.
30303#
30304
30305# Check whether --with-alsa was given.
30306if test "${with_alsa+set}" = set; then :
30307  withval=$with_alsa;
30308fi
30309
30310
30311# Check whether --with-alsa-include was given.
30312if test "${with_alsa_include+set}" = set; then :
30313  withval=$with_alsa_include;
30314fi
30315
30316
30317# Check whether --with-alsa-lib was given.
30318if test "${with_alsa_lib+set}" = set; then :
30319  withval=$with_alsa_lib;
30320fi
30321
30322
30323if test "x$ALSA_NOT_NEEDED" = xyes; then
30324	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30325		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30326$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30327	fi
30328	ALSA_CFLAGS=
30329	ALSA_LIBS=
30330else
30331	ALSA_FOUND=no
30332
30333	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30334	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30335	fi
30336
30337	if test "x${with_alsa}" != x; then
30338	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30339	    ALSA_CFLAGS="-I${with_alsa}/include"
30340	    ALSA_FOUND=yes
30341	fi
30342	if test "x${with_alsa_include}" != x; then
30343	    ALSA_CFLAGS="-I${with_alsa_include}"
30344	    ALSA_FOUND=yes
30345	fi
30346	if test "x${with_alsa_lib}" != x; then
30347	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30348	    ALSA_FOUND=yes
30349	fi
30350	if test "x$ALSA_FOUND" = xno; then
30351
30352
30353    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30354        # Source the builddeps file again, to make sure it uses the latest variables!
30355        . $builddepsfile
30356        # Look for a target and build machine specific resource!
30357        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30358        if test "x$resource" = x; then
30359            # Ok, lets instead look for a target specific resource
30360            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30361        fi
30362        if test "x$resource" = x; then
30363            # Ok, lets instead look for a build specific resource
30364            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30365        fi
30366        if test "x$resource" = x; then
30367            # Ok, lets instead look for a generic resource
30368            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30369            resource=${builddep_alsa}
30370        fi
30371        if test "x$resource" != x; then
30372            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30373$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30374	    # If the resource in the builddeps.conf file is an existing directory,
30375	    # for example /java/linux/cups
30376	    if test -d ${resource}; then
30377	       depdir=${resource}
30378	    else
30379
30380# alsa is for example mymodule
30381# $resource is for example libs/general/libmymod_1_2_3.zip
30382# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30383# $with_builddeps_dir is for example /localhome/builddeps
30384# depdir is the name of the variable into which we store the depdir, eg MYMOD
30385# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30386# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30387    filename=`basename $resource`
30388    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30389    filebase=${filename%%.*}
30390    extension=${filename#*.}
30391    installdir=$with_builddeps_dir/$filebase
30392    if test ! -f $installdir/$filename.unpacked; then
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30394$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30395        if test ! -d $installdir; then
30396            mkdir -p $installdir
30397        fi
30398        if test ! -d $installdir; then
30399            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30400        fi
30401        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30402        touch $tmpfile
30403        if test ! -f $tmpfile; then
30404            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30405        fi
30406
30407    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30408    # $tmpfile is the local file name for the downloaded file.
30409    VALID_TOOL=no
30410    if test "x$BDEPS_FTP" = xwget; then
30411       VALID_TOOL=yes
30412       wget -O $tmpfile $with_builddeps_server/$resource
30413    fi
30414    if test "x$BDEPS_FTP" = xlftp; then
30415       VALID_TOOL=yes
30416       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30417    fi
30418    if test "x$BDEPS_FTP" = xftp; then
30419        VALID_TOOL=yes
30420        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30421        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30422        FTPUSERPWD=${FTPSERVER%%@*}
30423        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30424            FTPUSER=${userpwd%%:*}
30425            FTPPWD=${userpwd#*@}
30426            FTPSERVER=${FTPSERVER#*@}
30427        else
30428            FTPUSER=ftp
30429            FTPPWD=ftp
30430        fi
30431        # the "pass" command does not work on some
30432        # ftp clients (read ftp.exe) but if it works,
30433        # passive mode is better!
30434        (\
30435            echo "user $FTPUSER $FTPPWD"        ;\
30436            echo "pass"                         ;\
30437            echo "bin"                          ;\
30438            echo "get $FTPPATH $tmpfile"              ;\
30439        ) | ftp -in $FTPSERVER
30440    fi
30441    if test "x$VALID_TOOL" != xyes; then
30442       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30443    fi
30444
30445        mv $tmpfile $installdir/$filename
30446        if test ! -s $installdir/$filename; then
30447            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30448        fi
30449        case "$extension" in
30450            zip)  echo "Unzipping $installdir/$filename..."
30451               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30452            ;;
30453            tar.gz) echo "Untaring $installdir/$filename..."
30454               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30455            ;;
30456            tgz) echo "Untaring $installdir/$filename..."
30457               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30458            ;;
30459            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30460            ;;
30461        esac
30462    fi
30463    if test -f $installdir/$filename.unpacked; then
30464        depdir=$installdir
30465    fi
30466
30467	    fi
30468            # Source the builddeps file again, because in the previous command, the depdir
30469            # was updated to point at the current build dependency install directory.
30470            . $builddepsfile
30471            # Now extract variables from the builddeps.conf files.
30472            theroot=${builddep_alsa_ROOT}
30473            thecflags=${builddep_alsa_CFLAGS}
30474            thelibs=${builddep_alsa_LIBS}
30475            if test "x$depdir" = x; then
30476                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30477            fi
30478            ALSA=$depdir
30479            if test "x$theroot" != x; then
30480               ALSA="$theroot"
30481            fi
30482            if test "x$thecflags" != x; then
30483               ALSA_CFLAGS="$thecflags"
30484            fi
30485            if test "x$thelibs" != x; then
30486               ALSA_LIBS="$thelibs"
30487            fi
30488            ALSA_FOUND=yes
30489            else ALSA_FOUND=no
30490
30491        fi
30492        else ALSA_FOUND=no
30493
30494    fi
30495
30496	fi
30497	if test "x$ALSA_FOUND" = xno; then
30498
30499pkg_failed=no
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30501$as_echo_n "checking for ALSA... " >&6; }
30502
30503if test -n "$ALSA_CFLAGS"; then
30504    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30505 elif test -n "$PKG_CONFIG"; then
30506    if test -n "$PKG_CONFIG" && \
30507    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30508  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30509  ac_status=$?
30510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30511  test $ac_status = 0; }; then
30512  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30513else
30514  pkg_failed=yes
30515fi
30516 else
30517    pkg_failed=untried
30518fi
30519if test -n "$ALSA_LIBS"; then
30520    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30521 elif test -n "$PKG_CONFIG"; then
30522    if test -n "$PKG_CONFIG" && \
30523    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30524  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30525  ac_status=$?
30526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30527  test $ac_status = 0; }; then
30528  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30529else
30530  pkg_failed=yes
30531fi
30532 else
30533    pkg_failed=untried
30534fi
30535
30536
30537
30538if test $pkg_failed = yes; then
30539
30540if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30541        _pkg_short_errors_supported=yes
30542else
30543        _pkg_short_errors_supported=no
30544fi
30545        if test $_pkg_short_errors_supported = yes; then
30546	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30547        else
30548	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30549        fi
30550	# Put the nasty error message in config.log where it belongs
30551	echo "$ALSA_PKG_ERRORS" >&5
30552
30553	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30554$as_echo "no" >&6; }
30555                ALSA_FOUND=no
30556elif test $pkg_failed = untried; then
30557	ALSA_FOUND=no
30558else
30559	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30560	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30562$as_echo "yes" >&6; }
30563	ALSA_FOUND=yes
30564fi
30565	fi
30566	if test "x$ALSA_FOUND" = xno; then
30567	    for ac_header in alsa/asoundlib.h
30568do :
30569  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30570if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30571  cat >>confdefs.h <<_ACEOF
30572#define HAVE_ALSA_ASOUNDLIB_H 1
30573_ACEOF
30574 ALSA_FOUND=yes
30575	                      ALSA_CFLAGS=-Iignoreme
30576	                      ALSA_LIBS=-lasound
30577	                      DEFAULT_ALSA=yes
30578else
30579  ALSA_FOUND=no
30580fi
30581
30582done
30583
30584	fi
30585	if test "x$ALSA_FOUND" = xno; then
30586
30587    # Print a helpful message on how to acquire the necessary build dependency.
30588    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30589    MISSING_DEPENDENCY=alsa
30590    PKGHANDLER_COMMAND=
30591
30592    case $PKGHANDLER in
30593	apt-get)
30594                apt_help     $MISSING_DEPENDENCY ;;
30595    yum)
30596                yum_help     $MISSING_DEPENDENCY ;;
30597	port)
30598                port_help    $MISSING_DEPENDENCY ;;
30599	pkgutil)
30600                pkgutil_help $MISSING_DEPENDENCY ;;
30601	pkgadd)
30602                pkgadd_help  $MISSING_DEPENDENCY ;;
30603    * )
30604      break ;;
30605    esac
30606
30607    if test "x$PKGHANDLER_COMMAND" != x; then
30608        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30609    fi
30610
30611	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30612	fi
30613fi
30614
30615
30616
30617
30618
30619
30620
30621###############################################################################
30622#
30623# Check for the jpeg library
30624#
30625
30626USE_EXTERNAL_LIBJPEG=true
30627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30628$as_echo_n "checking for main in -ljpeg... " >&6; }
30629if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30630  $as_echo_n "(cached) " >&6
30631else
30632  ac_check_lib_save_LIBS=$LIBS
30633LIBS="-ljpeg  $LIBS"
30634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30635/* end confdefs.h.  */
30636
30637
30638int
30639main ()
30640{
30641return main ();
30642  ;
30643  return 0;
30644}
30645_ACEOF
30646if ac_fn_cxx_try_link "$LINENO"; then :
30647  ac_cv_lib_jpeg_main=yes
30648else
30649  ac_cv_lib_jpeg_main=no
30650fi
30651rm -f core conftest.err conftest.$ac_objext \
30652    conftest$ac_exeext conftest.$ac_ext
30653LIBS=$ac_check_lib_save_LIBS
30654fi
30655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30656$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30657if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30658  cat >>confdefs.h <<_ACEOF
30659#define HAVE_LIBJPEG 1
30660_ACEOF
30661
30662  LIBS="-ljpeg $LIBS"
30663
30664else
30665   USE_EXTERNAL_LIBJPEG=false
30666               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30667$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30668
30669fi
30670
30671
30672
30673###############################################################################
30674#
30675# Check for the gif library
30676#
30677
30678USE_EXTERNAL_LIBJPEG=true
30679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30680$as_echo_n "checking for main in -lgif... " >&6; }
30681if test "${ac_cv_lib_gif_main+set}" = set; then :
30682  $as_echo_n "(cached) " >&6
30683else
30684  ac_check_lib_save_LIBS=$LIBS
30685LIBS="-lgif  $LIBS"
30686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30687/* end confdefs.h.  */
30688
30689
30690int
30691main ()
30692{
30693return main ();
30694  ;
30695  return 0;
30696}
30697_ACEOF
30698if ac_fn_cxx_try_link "$LINENO"; then :
30699  ac_cv_lib_gif_main=yes
30700else
30701  ac_cv_lib_gif_main=no
30702fi
30703rm -f core conftest.err conftest.$ac_objext \
30704    conftest$ac_exeext conftest.$ac_ext
30705LIBS=$ac_check_lib_save_LIBS
30706fi
30707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30708$as_echo "$ac_cv_lib_gif_main" >&6; }
30709if test "x$ac_cv_lib_gif_main" = x""yes; then :
30710  cat >>confdefs.h <<_ACEOF
30711#define HAVE_LIBGIF 1
30712_ACEOF
30713
30714  LIBS="-lgif $LIBS"
30715
30716else
30717   USE_EXTERNAL_LIBGIF=false
30718               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30719$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30720
30721fi
30722
30723
30724
30725###############################################################################
30726#
30727# Check for the zlib library
30728#
30729
30730
30731# Check whether --with-zlib was given.
30732if test "${with_zlib+set}" = set; then :
30733  withval=$with_zlib;
30734fi
30735
30736
30737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30738$as_echo_n "checking for compress in -lz... " >&6; }
30739if test "${ac_cv_lib_z_compress+set}" = set; then :
30740  $as_echo_n "(cached) " >&6
30741else
30742  ac_check_lib_save_LIBS=$LIBS
30743LIBS="-lz  $LIBS"
30744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30745/* end confdefs.h.  */
30746
30747/* Override any GCC internal prototype to avoid an error.
30748   Use char because int might match the return type of a GCC
30749   builtin and then its argument prototype would still apply.  */
30750#ifdef __cplusplus
30751extern "C"
30752#endif
30753char compress ();
30754int
30755main ()
30756{
30757return compress ();
30758  ;
30759  return 0;
30760}
30761_ACEOF
30762if ac_fn_cxx_try_link "$LINENO"; then :
30763  ac_cv_lib_z_compress=yes
30764else
30765  ac_cv_lib_z_compress=no
30766fi
30767rm -f core conftest.err conftest.$ac_objext \
30768    conftest$ac_exeext conftest.$ac_ext
30769LIBS=$ac_check_lib_save_LIBS
30770fi
30771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30772$as_echo "$ac_cv_lib_z_compress" >&6; }
30773if test "x$ac_cv_lib_z_compress" = x""yes; then :
30774   ZLIB_FOUND=yes
30775else
30776   ZLIB_FOUND=no
30777fi
30778
30779
30780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30781$as_echo_n "checking for which zlib to use... " >&6; }
30782
30783DEFAULT_ZLIB=bundled
30784if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30785#
30786# On macosx default is system...on others default is
30787#
30788    DEFAULT_ZLIB=system
30789fi
30790
30791if test "x${ZLIB_FOUND}" != "xyes"; then
30792#
30793# If we don't find any system...set default to bundled
30794#
30795    DEFAULT_ZLIB=bundled
30796fi
30797
30798#
30799# If user didn't specify, use DEFAULT_ZLIB
30800#
30801if test "x${with_zlib}" = "x"; then
30802    with_zlib=${DEFAULT_ZLIB}
30803fi
30804
30805if test "x${with_zlib}" = "xbundled"; then
30806    USE_EXTERNAL_LIBZ=false
30807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30808$as_echo "bundled" >&6; }
30809elif test "x${with_zlib}" = "xsystem"; then
30810    if test "x${ZLIB_FOUND}" = "xyes"; then
30811        USE_EXTERNAL_LIBZ=true
30812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30813$as_echo "system" >&6; }
30814    else
30815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30816$as_echo "system not found" >&6; }
30817        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30818    fi
30819else
30820    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30821fi
30822
30823
30824
30825###############################################################################
30826LIBZIP_CAN_USE_MMAP=true
30827
30828
30829
30830###############################################################################
30831#
30832# Check if altzone exists in time.h
30833#
30834
30835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30836/* end confdefs.h.  */
30837#include <time.h>
30838int
30839main ()
30840{
30841return (int)altzone;
30842  ;
30843  return 0;
30844}
30845_ACEOF
30846if ac_fn_cxx_try_link "$LINENO"; then :
30847  has_altzone=yes
30848else
30849  has_altzone=no
30850fi
30851rm -f core conftest.err conftest.$ac_objext \
30852    conftest$ac_exeext conftest.$ac_ext
30853if test "x$has_altzone" = xyes; then
30854
30855$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30856
30857fi
30858
30859###############################################################################
30860#
30861# Check the maths library
30862#
30863
30864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30865$as_echo_n "checking for cos in -lm... " >&6; }
30866if test "${ac_cv_lib_m_cos+set}" = set; then :
30867  $as_echo_n "(cached) " >&6
30868else
30869  ac_check_lib_save_LIBS=$LIBS
30870LIBS="-lm  $LIBS"
30871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30872/* end confdefs.h.  */
30873
30874/* Override any GCC internal prototype to avoid an error.
30875   Use char because int might match the return type of a GCC
30876   builtin and then its argument prototype would still apply.  */
30877#ifdef __cplusplus
30878extern "C"
30879#endif
30880char cos ();
30881int
30882main ()
30883{
30884return cos ();
30885  ;
30886  return 0;
30887}
30888_ACEOF
30889if ac_fn_cxx_try_link "$LINENO"; then :
30890  ac_cv_lib_m_cos=yes
30891else
30892  ac_cv_lib_m_cos=no
30893fi
30894rm -f core conftest.err conftest.$ac_objext \
30895    conftest$ac_exeext conftest.$ac_ext
30896LIBS=$ac_check_lib_save_LIBS
30897fi
30898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30899$as_echo "$ac_cv_lib_m_cos" >&6; }
30900if test "x$ac_cv_lib_m_cos" = x""yes; then :
30901  cat >>confdefs.h <<_ACEOF
30902#define HAVE_LIBM 1
30903_ACEOF
30904
30905  LIBS="-lm $LIBS"
30906
30907else
30908
30909                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30910$as_echo "$as_me: Maths library was not found" >&6;}
30911
30912fi
30913
30914
30915
30916###############################################################################
30917#
30918# Check for libdl.so
30919
30920save_LIBS="$LIBS"
30921LIBS=""
30922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30923$as_echo_n "checking for dlopen in -ldl... " >&6; }
30924if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30925  $as_echo_n "(cached) " >&6
30926else
30927  ac_check_lib_save_LIBS=$LIBS
30928LIBS="-ldl  $LIBS"
30929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30930/* end confdefs.h.  */
30931
30932/* Override any GCC internal prototype to avoid an error.
30933   Use char because int might match the return type of a GCC
30934   builtin and then its argument prototype would still apply.  */
30935#ifdef __cplusplus
30936extern "C"
30937#endif
30938char dlopen ();
30939int
30940main ()
30941{
30942return dlopen ();
30943  ;
30944  return 0;
30945}
30946_ACEOF
30947if ac_fn_cxx_try_link "$LINENO"; then :
30948  ac_cv_lib_dl_dlopen=yes
30949else
30950  ac_cv_lib_dl_dlopen=no
30951fi
30952rm -f core conftest.err conftest.$ac_objext \
30953    conftest$ac_exeext conftest.$ac_ext
30954LIBS=$ac_check_lib_save_LIBS
30955fi
30956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30957$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30958if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30959  cat >>confdefs.h <<_ACEOF
30960#define HAVE_LIBDL 1
30961_ACEOF
30962
30963  LIBS="-ldl $LIBS"
30964
30965fi
30966
30967LIBDL="$LIBS"
30968
30969LIBS="$save_LIBS"
30970
30971
30972
30973###############################################################################
30974#
30975# statically link libstdc++ before C++ ABI is stablized on Linux unless
30976# dynamic build is configured on command line.
30977#
30978
30979# Check whether --with-stdc++lib was given.
30980if test "${with_stdc__lib+set}" = set; then :
30981  withval=$with_stdc__lib;
30982    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30983        && test "x$with_stdc__lib" != xdefault; then
30984      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30985    fi
30986
30987else
30988  with_stdc__lib=default
30989
30990fi
30991
30992
30993if test "x$OPENJDK_TARGET_OS" = xlinux; then
30994    # Test if -lstdc++ works.
30995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30996$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30997    ac_ext=cpp
30998ac_cpp='$CXXCPP $CPPFLAGS'
30999ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31000ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31001ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31002
31003    OLD_CXXFLAGS="$CXXFLAGS"
31004    CXXFLAGS="$CXXFLAGS -lstdc++"
31005    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31006/* end confdefs.h.  */
31007
31008int
31009main ()
31010{
31011return 0;
31012  ;
31013  return 0;
31014}
31015_ACEOF
31016if ac_fn_cxx_try_link "$LINENO"; then :
31017  has_dynamic_libstdcxx=yes
31018else
31019  has_dynamic_libstdcxx=no
31020fi
31021rm -f core conftest.err conftest.$ac_objext \
31022    conftest$ac_exeext conftest.$ac_ext
31023    CXXFLAGS="$OLD_CXXFLAGS"
31024    ac_ext=cpp
31025ac_cpp='$CXXCPP $CPPFLAGS'
31026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31029
31030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31031$as_echo "$has_dynamic_libstdcxx" >&6; }
31032
31033    # Test if stdc++ can be linked statically.
31034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31035$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31036    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31037    ac_ext=cpp
31038ac_cpp='$CXXCPP $CPPFLAGS'
31039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31042
31043    OLD_LIBS="$LIBS"
31044    OLD_CXX="$CXX"
31045    LIBS="$STATIC_STDCXX_FLAGS"
31046    CXX="$CC"
31047    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31048/* end confdefs.h.  */
31049
31050int
31051main ()
31052{
31053return 0;
31054  ;
31055  return 0;
31056}
31057_ACEOF
31058if ac_fn_cxx_try_link "$LINENO"; then :
31059  has_static_libstdcxx=yes
31060else
31061  has_static_libstdcxx=no
31062fi
31063rm -f core conftest.err conftest.$ac_objext \
31064    conftest$ac_exeext conftest.$ac_ext
31065    LIBS="$OLD_LIBS"
31066    CXX="$OLD_CXX"
31067    ac_ext=cpp
31068ac_cpp='$CXXCPP $CPPFLAGS'
31069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31072
31073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31074$as_echo "$has_static_libstdcxx" >&6; }
31075
31076    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31077        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31078    fi
31079
31080    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31081        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31082    fi
31083
31084    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31085        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31086    fi
31087
31088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31089$as_echo_n "checking how to link with libstdc++... " >&6; }
31090    # If dynamic was requested, it's available since it would fail above otherwise.
31091    # If dynamic wasn't requested, go with static unless it isn't available.
31092    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31093        LIBCXX="$LIBCXX -lstdc++"
31094        LDCXX="$CXX"
31095        STATIC_CXX_SETTING="STATIC_CXX=false"
31096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31097$as_echo "dynamic" >&6; }
31098    else
31099        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31100        LDCXX="$CC"
31101        STATIC_CXX_SETTING="STATIC_CXX=true"
31102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31103$as_echo "static" >&6; }
31104    fi
31105fi
31106
31107
31108# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31109if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31110    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31111fi
31112
31113# TODO better (platform agnostic) test
31114if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31115    LIBCXX="-lstdc++"
31116fi
31117
31118
31119
31120
31121
31122# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31123
31124# When using cygwin or msys, we need a wrapper binary that renames
31125# /cygdrive/c/ arguments into c:/ arguments and peeks into
31126# @files and rewrites these too! This wrapper binary is
31127# called fixpath.
31128FIXPATH=
31129if test "x$OPENJDK_BUILD_OS" = xwindows; then
31130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31131$as_echo_n "checking if fixpath can be created... " >&6; }
31132    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31133    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31134    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31135      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31136      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31137      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31138      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31139    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31140      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31141      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31142
31143      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31144      # @ was chosen as separator to minimize risk of other tools messing around with it
31145      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31146      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31147
31148      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31149    fi
31150    rm -f $OUTPUT_ROOT/fixpath*
31151    cd $OUTPUT_ROOT
31152    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31153    cd $CURDIR
31154
31155    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31157$as_echo "no" >&6; }
31158        cat $OUTPUT_ROOT/fixpath1.log
31159        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31160    fi
31161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31162$as_echo "yes" >&6; }
31163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31164$as_echo_n "checking if fixpath.exe works... " >&6; }
31165    cd $OUTPUT_ROOT
31166    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31167    cd $CURDIR
31168    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31170$as_echo "no" >&6; }
31171        cat $OUTPUT_ROOT/fixpath2.log
31172        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31173    fi
31174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31175$as_echo "yes" >&6; }
31176    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31177fi
31178
31179
31180
31181
31182###############################################################################
31183#
31184# We need to do some final tweaking, when everything else is done.
31185#
31186###############################################################################
31187
31188
31189HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31190
31191
31192# The name of the Service Agent jar.
31193SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31194if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31195  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31196fi
31197
31198
31199
31200
31201###############################################################################
31202#
31203# Configure parts of the build that only affect the build performance,
31204# not the result.
31205#
31206###############################################################################
31207
31208
31209# How many cores do we have on this build system?
31210
31211# Check whether --with-num-cores was given.
31212if test "${with_num_cores+set}" = set; then :
31213  withval=$with_num_cores;
31214fi
31215
31216if test "x$with_num_cores" = x; then
31217    # The number of cores were not specified, try to probe them.
31218
31219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31220$as_echo_n "checking for number of cores... " >&6; }
31221    NUM_CORES=1
31222    FOUND_CORES=no
31223
31224    if test -f /proc/cpuinfo; then
31225        # Looks like a Linux (or cygwin) system
31226        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31227        FOUND_CORES=yes
31228    elif test -x /usr/sbin/psrinfo; then
31229        # Looks like a Solaris system
31230        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31231        FOUND_CORES=yes
31232    elif test -x /usr/sbin/system_profiler; then
31233        # Looks like a MacOSX system
31234        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31235        FOUND_CORES=yes
31236    elif test -n "$NUMBER_OF_PROCESSORS"; then
31237        # On windows, look in the env
31238        NUM_CORES=$NUMBER_OF_PROCESSORS
31239        FOUND_CORES=yes
31240    fi
31241
31242    # For c/c++ code we run twice as many concurrent build
31243    # jobs than we have cores, otherwise we will stall on io.
31244    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31245
31246    if test "x$FOUND_CORES" = xyes; then
31247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31248$as_echo "$NUM_CORES" >&6; }
31249    else
31250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31251$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31253$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31254    fi
31255
31256
31257else
31258    NUM_CORES=$with_num_cores
31259    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31260fi
31261
31262
31263
31264
31265# How much memory do we have on this build system?
31266
31267# Check whether --with-memory-size was given.
31268if test "${with_memory_size+set}" = set; then :
31269  withval=$with_memory_size;
31270fi
31271
31272if test "x$with_memory_size" = x; then
31273    # The memory size was not specified, try to probe it.
31274
31275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31276$as_echo_n "checking for memory size... " >&6; }
31277    # Default to 1024 MB
31278    MEMORY_SIZE=1024
31279    FOUND_MEM=no
31280
31281    if test -f /proc/meminfo; then
31282        # Looks like a Linux (or cygwin) system
31283        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31284        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31285        FOUND_MEM=yes
31286    elif test -x /usr/sbin/prtconf; then
31287        # Looks like a Solaris system
31288        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31289        FOUND_MEM=yes
31290    elif test -x /usr/sbin/system_profiler; then
31291        # Looks like a MacOSX system
31292        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31293        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31294        FOUND_MEM=yes
31295    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31296        # Windows, but without cygwin
31297        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31298        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31299        FOUND_MEM=yes
31300    fi
31301
31302    if test "x$FOUND_MEM" = xyes; then
31303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31304$as_echo "$MEMORY_SIZE MB" >&6; }
31305    else
31306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31307$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31309$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31310    fi
31311
31312else
31313    MEMORY_SIZE=$with_memory_size
31314fi
31315
31316
31317
31318# Setup smart javac (after cores and memory have been setup)
31319
31320
31321# Check whether --with-sjavac-server-java was given.
31322if test "${with_sjavac_server_java+set}" = set; then :
31323  withval=$with_sjavac_server_java;
31324fi
31325
31326
31327if test "x$with_sjavac_server_java" != x; then
31328    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31329    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31330    if test "x$FOUND_VERSION" = x; then
31331        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31332    fi
31333else
31334    SJAVAC_SERVER_JAVA=""
31335    # Hotspot specific options.
31336
31337    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31338    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31339    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31340    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31341    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31342        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31343    fi
31344
31345    # JRockit specific options.
31346
31347    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31348    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31349    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31350    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31351    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31352        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31353    fi
31354
31355    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31356fi
31357
31358
31359
31360# Check whether --with-sjavac-server-cores was given.
31361if test "${with_sjavac_server_cores+set}" = set; then :
31362  withval=$with_sjavac_server_cores;
31363fi
31364
31365if test "x$with_sjavac_server_cores" != x; then
31366    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31367else
31368    if test "$NUM_CORES" -gt 16; then
31369        # We set this arbitrary limit because we want to limit the heap
31370        # size of the javac server.
31371        # In the future we will make the javac compilers in the server
31372        # share more and more state, thus enabling us to use more and
31373        # more concurrent threads in the server.
31374        SJAVAC_SERVER_CORES="16"
31375    else
31376        SJAVAC_SERVER_CORES="$NUM_CORES"
31377    fi
31378
31379    if test "$MEMORY_SIZE" -gt "17000"; then
31380        MAX_HEAP_MEM=10000
31381
31382    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31383    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31384    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31385    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31386    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31387        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31388    fi
31389
31390
31391    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31392    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31393    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31394    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31395    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31396        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31397    fi
31398
31399    elif test "$MEMORY_SIZE" -gt "10000"; then
31400        MAX_HEAP_MEM=6000
31401
31402    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31403    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31404    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31405    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31406    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31407        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31408    fi
31409
31410
31411    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31412    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31413    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31414    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31415    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31416        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31417    fi
31418
31419    elif test "$MEMORY_SIZE" -gt "5000"; then
31420        MAX_HEAP_MEM=3000
31421
31422    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31423    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31424    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31425    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31426    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31427        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31428    fi
31429
31430
31431    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31432    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31433    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31434    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31435    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31436        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31437    fi
31438
31439    elif test "$MEMORY_SIZE" -gt "3800"; then
31440        MAX_HEAP_MEM=2500
31441
31442    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31443    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31444    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31445    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31446    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31447        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31448    fi
31449
31450    elif test "$MEMORY_SIZE" -gt "1900"; then
31451        MAX_HEAP_MEM=1200
31452
31453    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31454    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31455    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31456    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31457    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31458        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31459    fi
31460
31461    elif test "$MEMORY_SIZE" -gt "1000"; then
31462        MAX_HEAP_MEM=900
31463
31464    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31465    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31466    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31467    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31468    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31469        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31470    fi
31471
31472    else
31473        MAX_HEAP_MEM=512
31474
31475    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31476    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31477    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31478    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31479    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31480        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31481    fi
31482
31483    fi
31484
31485
31486    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31487    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31488    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31489    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31490    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31491        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31492    fi
31493
31494
31495    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31496    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31497    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31498    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31499    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31500        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31501    fi
31502
31503
31504    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31505    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31506    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31507    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31508    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31509        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31510    fi
31511
31512
31513    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31514    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31516$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31517        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31519$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31520    fi
31521fi
31522
31523
31524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31525$as_echo_n "checking whether to use sjavac... " >&6; }
31526# Check whether --enable-sjavac was given.
31527if test "${enable_sjavac+set}" = set; then :
31528  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31529else
31530  ENABLE_SJAVAC='no'
31531fi
31532
31533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31534$as_echo "$ENABLE_SJAVAC" >&6; }
31535
31536
31537if test "x$ENABLE_SJAVAC" = xyes; then
31538    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31539else
31540    SJAVAC_SERVER_DIR=
31541fi
31542
31543
31544
31545
31546# Can the C/C++ compiler use precompiled headers?
31547
31548
31549###############################################################################
31550#
31551# Can the C/C++ compiler use precompiled headers?
31552#
31553# Check whether --enable-precompiled-headers was given.
31554if test "${enable_precompiled_headers+set}" = set; then :
31555  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31556else
31557  ENABLE_PRECOMPH=yes
31558fi
31559
31560
31561USE_PRECOMPILED_HEADER=1
31562if test "x$ENABLE_PRECOMPH" = xno; then
31563    USE_PRECOMPILED_HEADER=0
31564fi
31565
31566if test "x$ENABLE_PRECOMPH" = xyes; then
31567    # Check that the compiler actually supports precomp headers.
31568    if test "x$GCC" = xyes; then
31569         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31570$as_echo_n "checking that precompiled headers work... " >&6; }
31571         echo "int alfa();" > conftest.h
31572         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31573         if test ! -f conftest.hpp.gch; then
31574             USE_PRECOMPILED_HEADER=0
31575             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31576$as_echo "no" >&6; }
31577         else
31578             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31579$as_echo "yes" >&6; }
31580         fi
31581         rm -f conftest.h conftest.hpp.gch
31582    fi
31583fi
31584
31585
31586
31587
31588# Setup use of ccache, if available
31589
31590    # Check whether --enable-ccache was given.
31591if test "${enable_ccache+set}" = set; then :
31592  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31593else
31594  ENABLE_CCACHE=yes
31595fi
31596
31597    if test "x$ENABLE_CCACHE" = xyes; then
31598        # Extract the first word of "ccache", so it can be a program name with args.
31599set dummy ccache; ac_word=$2
31600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31601$as_echo_n "checking for $ac_word... " >&6; }
31602if test "${ac_cv_path_CCACHE+set}" = set; then :
31603  $as_echo_n "(cached) " >&6
31604else
31605  case $CCACHE in
31606  [\\/]* | ?:[\\/]*)
31607  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31608  ;;
31609  *)
31610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31611for as_dir in $PATH
31612do
31613  IFS=$as_save_IFS
31614  test -z "$as_dir" && as_dir=.
31615    for ac_exec_ext in '' $ac_executable_extensions; do
31616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31617    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31619    break 2
31620  fi
31621done
31622  done
31623IFS=$as_save_IFS
31624
31625  ;;
31626esac
31627fi
31628CCACHE=$ac_cv_path_CCACHE
31629if test -n "$CCACHE"; then
31630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31631$as_echo "$CCACHE" >&6; }
31632else
31633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31634$as_echo "no" >&6; }
31635fi
31636
31637
31638    else
31639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31640$as_echo_n "checking for ccache... " >&6; }
31641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31642$as_echo "explicitly disabled" >&6; }
31643        CCACHE=
31644    fi
31645
31646
31647
31648# Check whether --with-ccache-dir was given.
31649if test "${with_ccache_dir+set}" = set; then :
31650  withval=$with_ccache_dir;
31651fi
31652
31653
31654    if test "x$with_ccache_dir" != x; then
31655        # When using a non home ccache directory, assume the use is to share ccache files
31656        # with other users. Thus change the umask.
31657        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31658    fi
31659    CCACHE_FOUND=""
31660    if test "x$CCACHE" != x; then
31661
31662    if test "x$CCACHE" != x; then
31663        CCACHE_FOUND="true"
31664        # Only use ccache if it is 3.1.4 or later, which supports
31665        # precompiled headers.
31666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31667$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31668        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31669        if test "x$HAS_GOOD_CCACHE" = x; then
31670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31671$as_echo "no, disabling ccache" >&6; }
31672            CCACHE=
31673        else
31674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31675$as_echo "yes" >&6; }
31676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31677$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31678            PUSHED_FLAGS="$CXXFLAGS"
31679            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31680            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31681/* end confdefs.h.  */
31682
31683int
31684main ()
31685{
31686
31687  ;
31688  return 0;
31689}
31690_ACEOF
31691if ac_fn_cxx_try_compile "$LINENO"; then :
31692  CC_KNOWS_CCACHE_TRICK=yes
31693else
31694  CC_KNOWS_CCACHE_TRICK=no
31695fi
31696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31697            CXXFLAGS="$PUSHED_FLAGS"
31698            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31699                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31700$as_echo "yes" >&6; }
31701            else
31702                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31703$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31704                CCACHE=
31705            fi
31706        fi
31707    fi
31708
31709    if test "x$CCACHE" != x; then
31710        CCACHE_SLOPPINESS=time_macros
31711        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31712        CCACHE_FLAGS=-fpch-preprocess
31713
31714        if test "x$SET_CCACHE_DIR" != x; then
31715            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31716	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31717        fi
31718    fi
31719
31720    fi
31721
31722
31723###############################################################################
31724#
31725# And now the finish...
31726#
31727###############################################################################
31728
31729# Check for some common pitfalls
31730
31731  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31732    file_to_test="$SRC_ROOT/LICENSE"
31733    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31734      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
31735    fi
31736  fi
31737
31738
31739
31740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31741$as_echo_n "checking if build directory is on local disk... " >&6; }
31742
31743	# df -l lists only local disks; if the given directory is not found then
31744	# a non-zero exit code is given
31745  if test "x$DF" = x; then
31746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31747      # msys does not have df; use Windows "net use" instead.
31748      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31749      if test "x$IS_NETWORK_DISK" = x; then
31750        OUTPUT_DIR_IS_LOCAL="yes"
31751      else
31752        OUTPUT_DIR_IS_LOCAL="no"
31753      fi
31754    else
31755      # No df here, say it's local
31756      OUTPUT_DIR_IS_LOCAL="yes"
31757    fi
31758  else
31759    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31760      OUTPUT_DIR_IS_LOCAL="yes"
31761    else
31762      OUTPUT_DIR_IS_LOCAL="no"
31763    fi
31764  fi
31765
31766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31767$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31768
31769
31770
31771# Check if the user has any old-style ALT_ variables set.
31772FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31773
31774# Before generating output files, test if they exist. If they do, this is a reconfigure.
31775# Since we can't properly handle the dependencies for this, warn the user about the situation
31776if test -e $OUTPUT_ROOT/spec.gmk; then
31777  IS_RECONFIGURE=yes
31778else
31779  IS_RECONFIGURE=no
31780fi
31781
31782if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31783  HIDE_PERFORMANCE_HINTS=yes
31784else
31785  HIDE_PERFORMANCE_HINTS=no
31786  # Hide it the next time around...
31787  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31788fi
31789
31790
31791
31792# At the end, call the custom hook. (Dummy macro if no custom sources available)
31793
31794
31795# We're messing a bit with internal autoconf variables to put the config.status
31796# in the output directory instead of the current directory.
31797CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31798# Create the actual output files. Now the main work of configure is done.
31799cat >confcache <<\_ACEOF
31800# This file is a shell script that caches the results of configure
31801# tests run on this system so they can be shared between configure
31802# scripts and configure runs, see configure's option --config-cache.
31803# It is not useful on other systems.  If it contains results you don't
31804# want to keep, you may remove or edit it.
31805#
31806# config.status only pays attention to the cache file if you give it
31807# the --recheck option to rerun configure.
31808#
31809# `ac_cv_env_foo' variables (set or unset) will be overridden when
31810# loading this file, other *unset* `ac_cv_foo' will be assigned the
31811# following values.
31812
31813_ACEOF
31814
31815# The following way of writing the cache mishandles newlines in values,
31816# but we know of no workaround that is simple, portable, and efficient.
31817# So, we kill variables containing newlines.
31818# Ultrix sh set writes to stderr and can't be redirected directly,
31819# and sets the high bit in the cache file unless we assign to the vars.
31820(
31821  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31822    eval ac_val=\$$ac_var
31823    case $ac_val in #(
31824    *${as_nl}*)
31825      case $ac_var in #(
31826      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31827$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31828      esac
31829      case $ac_var in #(
31830      _ | IFS | as_nl) ;; #(
31831      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31832      *) { eval $ac_var=; unset $ac_var;} ;;
31833      esac ;;
31834    esac
31835  done
31836
31837  (set) 2>&1 |
31838    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31839    *${as_nl}ac_space=\ *)
31840      # `set' does not quote correctly, so add quotes: double-quote
31841      # substitution turns \\\\ into \\, and sed turns \\ into \.
31842      sed -n \
31843	"s/'/'\\\\''/g;
31844	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31845      ;; #(
31846    *)
31847      # `set' quotes correctly as required by POSIX, so do not add quotes.
31848      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31849      ;;
31850    esac |
31851    sort
31852) |
31853  sed '
31854     /^ac_cv_env_/b end
31855     t clear
31856     :clear
31857     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31858     t end
31859     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31860     :end' >>confcache
31861if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31862  if test -w "$cache_file"; then
31863    test "x$cache_file" != "x/dev/null" &&
31864      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31865$as_echo "$as_me: updating cache $cache_file" >&6;}
31866    cat confcache >$cache_file
31867  else
31868    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31869$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31870  fi
31871fi
31872rm -f confcache
31873
31874test "x$prefix" = xNONE && prefix=$ac_default_prefix
31875# Let make expand exec_prefix.
31876test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31877
31878DEFS=-DHAVE_CONFIG_H
31879
31880ac_libobjs=
31881ac_ltlibobjs=
31882U=
31883for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31884  # 1. Remove the extension, and $U if already installed.
31885  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31886  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31887  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31888  #    will be set to the directory where LIBOBJS objects are built.
31889  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31890  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31891done
31892LIBOBJS=$ac_libobjs
31893
31894LTLIBOBJS=$ac_ltlibobjs
31895
31896
31897
31898: ${CONFIG_STATUS=./config.status}
31899ac_write_fail=0
31900ac_clean_files_save=$ac_clean_files
31901ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31902{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31903$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31904as_write_fail=0
31905cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31906#! $SHELL
31907# Generated by $as_me.
31908# Run this file to recreate the current configuration.
31909# Compiler output produced by configure, useful for debugging
31910# configure, is in config.log if it exists.
31911
31912debug=false
31913ac_cs_recheck=false
31914ac_cs_silent=false
31915
31916SHELL=\${CONFIG_SHELL-$SHELL}
31917export SHELL
31918_ASEOF
31919cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31920## -------------------- ##
31921## M4sh Initialization. ##
31922## -------------------- ##
31923
31924# Be more Bourne compatible
31925DUALCASE=1; export DUALCASE # for MKS sh
31926if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31927  emulate sh
31928  NULLCMD=:
31929  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31930  # is contrary to our usage.  Disable this feature.
31931  alias -g '${1+"$@"}'='"$@"'
31932  setopt NO_GLOB_SUBST
31933else
31934  case `(set -o) 2>/dev/null` in #(
31935  *posix*) :
31936    set -o posix ;; #(
31937  *) :
31938     ;;
31939esac
31940fi
31941
31942
31943as_nl='
31944'
31945export as_nl
31946# Printing a long string crashes Solaris 7 /usr/bin/printf.
31947as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31948as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31949as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31950# Prefer a ksh shell builtin over an external printf program on Solaris,
31951# but without wasting forks for bash or zsh.
31952if test -z "$BASH_VERSION$ZSH_VERSION" \
31953    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31954  as_echo='print -r --'
31955  as_echo_n='print -rn --'
31956elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31957  as_echo='printf %s\n'
31958  as_echo_n='printf %s'
31959else
31960  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31961    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31962    as_echo_n='/usr/ucb/echo -n'
31963  else
31964    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31965    as_echo_n_body='eval
31966      arg=$1;
31967      case $arg in #(
31968      *"$as_nl"*)
31969	expr "X$arg" : "X\\(.*\\)$as_nl";
31970	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31971      esac;
31972      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31973    '
31974    export as_echo_n_body
31975    as_echo_n='sh -c $as_echo_n_body as_echo'
31976  fi
31977  export as_echo_body
31978  as_echo='sh -c $as_echo_body as_echo'
31979fi
31980
31981# The user is always right.
31982if test "${PATH_SEPARATOR+set}" != set; then
31983  PATH_SEPARATOR=:
31984  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31985    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31986      PATH_SEPARATOR=';'
31987  }
31988fi
31989
31990
31991# IFS
31992# We need space, tab and new line, in precisely that order.  Quoting is
31993# there to prevent editors from complaining about space-tab.
31994# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31995# splitting by setting IFS to empty value.)
31996IFS=" ""	$as_nl"
31997
31998# Find who we are.  Look in the path if we contain no directory separator.
31999case $0 in #((
32000  *[\\/]* ) as_myself=$0 ;;
32001  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32002for as_dir in $PATH
32003do
32004  IFS=$as_save_IFS
32005  test -z "$as_dir" && as_dir=.
32006    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32007  done
32008IFS=$as_save_IFS
32009
32010     ;;
32011esac
32012# We did not find ourselves, most probably we were run as `sh COMMAND'
32013# in which case we are not to be found in the path.
32014if test "x$as_myself" = x; then
32015  as_myself=$0
32016fi
32017if test ! -f "$as_myself"; then
32018  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32019  exit 1
32020fi
32021
32022# Unset variables that we do not need and which cause bugs (e.g. in
32023# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32024# suppresses any "Segmentation fault" message there.  '((' could
32025# trigger a bug in pdksh 5.2.14.
32026for as_var in BASH_ENV ENV MAIL MAILPATH
32027do eval test x\${$as_var+set} = xset \
32028  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32029done
32030PS1='$ '
32031PS2='> '
32032PS4='+ '
32033
32034# NLS nuisances.
32035LC_ALL=C
32036export LC_ALL
32037LANGUAGE=C
32038export LANGUAGE
32039
32040# CDPATH.
32041(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32042
32043
32044# as_fn_error STATUS ERROR [LINENO LOG_FD]
32045# ----------------------------------------
32046# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32047# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32048# script with STATUS, using 1 if that was 0.
32049as_fn_error ()
32050{
32051  as_status=$1; test $as_status -eq 0 && as_status=1
32052  if test "$4"; then
32053    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32054    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32055  fi
32056  $as_echo "$as_me: error: $2" >&2
32057  as_fn_exit $as_status
32058} # as_fn_error
32059
32060
32061# as_fn_set_status STATUS
32062# -----------------------
32063# Set $? to STATUS, without forking.
32064as_fn_set_status ()
32065{
32066  return $1
32067} # as_fn_set_status
32068
32069# as_fn_exit STATUS
32070# -----------------
32071# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32072as_fn_exit ()
32073{
32074  set +e
32075  as_fn_set_status $1
32076  exit $1
32077} # as_fn_exit
32078
32079# as_fn_unset VAR
32080# ---------------
32081# Portably unset VAR.
32082as_fn_unset ()
32083{
32084  { eval $1=; unset $1;}
32085}
32086as_unset=as_fn_unset
32087# as_fn_append VAR VALUE
32088# ----------------------
32089# Append the text in VALUE to the end of the definition contained in VAR. Take
32090# advantage of any shell optimizations that allow amortized linear growth over
32091# repeated appends, instead of the typical quadratic growth present in naive
32092# implementations.
32093if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32094  eval 'as_fn_append ()
32095  {
32096    eval $1+=\$2
32097  }'
32098else
32099  as_fn_append ()
32100  {
32101    eval $1=\$$1\$2
32102  }
32103fi # as_fn_append
32104
32105# as_fn_arith ARG...
32106# ------------------
32107# Perform arithmetic evaluation on the ARGs, and store the result in the
32108# global $as_val. Take advantage of shells that can avoid forks. The arguments
32109# must be portable across $(()) and expr.
32110if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32111  eval 'as_fn_arith ()
32112  {
32113    as_val=$(( $* ))
32114  }'
32115else
32116  as_fn_arith ()
32117  {
32118    as_val=`expr "$@" || test $? -eq 1`
32119  }
32120fi # as_fn_arith
32121
32122
32123if expr a : '\(a\)' >/dev/null 2>&1 &&
32124   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32125  as_expr=expr
32126else
32127  as_expr=false
32128fi
32129
32130if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32131  as_basename=basename
32132else
32133  as_basename=false
32134fi
32135
32136if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32137  as_dirname=dirname
32138else
32139  as_dirname=false
32140fi
32141
32142as_me=`$as_basename -- "$0" ||
32143$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32144	 X"$0" : 'X\(//\)$' \| \
32145	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32146$as_echo X/"$0" |
32147    sed '/^.*\/\([^/][^/]*\)\/*$/{
32148	    s//\1/
32149	    q
32150	  }
32151	  /^X\/\(\/\/\)$/{
32152	    s//\1/
32153	    q
32154	  }
32155	  /^X\/\(\/\).*/{
32156	    s//\1/
32157	    q
32158	  }
32159	  s/.*/./; q'`
32160
32161# Avoid depending upon Character Ranges.
32162as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32163as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32164as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32165as_cr_digits='0123456789'
32166as_cr_alnum=$as_cr_Letters$as_cr_digits
32167
32168ECHO_C= ECHO_N= ECHO_T=
32169case `echo -n x` in #(((((
32170-n*)
32171  case `echo 'xy\c'` in
32172  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32173  xy)  ECHO_C='\c';;
32174  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32175       ECHO_T='	';;
32176  esac;;
32177*)
32178  ECHO_N='-n';;
32179esac
32180
32181rm -f conf$$ conf$$.exe conf$$.file
32182if test -d conf$$.dir; then
32183  rm -f conf$$.dir/conf$$.file
32184else
32185  rm -f conf$$.dir
32186  mkdir conf$$.dir 2>/dev/null
32187fi
32188if (echo >conf$$.file) 2>/dev/null; then
32189  if ln -s conf$$.file conf$$ 2>/dev/null; then
32190    as_ln_s='ln -s'
32191    # ... but there are two gotchas:
32192    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32193    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32194    # In both cases, we have to default to `cp -p'.
32195    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32196      as_ln_s='cp -p'
32197  elif ln conf$$.file conf$$ 2>/dev/null; then
32198    as_ln_s=ln
32199  else
32200    as_ln_s='cp -p'
32201  fi
32202else
32203  as_ln_s='cp -p'
32204fi
32205rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32206rmdir conf$$.dir 2>/dev/null
32207
32208
32209# as_fn_mkdir_p
32210# -------------
32211# Create "$as_dir" as a directory, including parents if necessary.
32212as_fn_mkdir_p ()
32213{
32214
32215  case $as_dir in #(
32216  -*) as_dir=./$as_dir;;
32217  esac
32218  test -d "$as_dir" || eval $as_mkdir_p || {
32219    as_dirs=
32220    while :; do
32221      case $as_dir in #(
32222      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32223      *) as_qdir=$as_dir;;
32224      esac
32225      as_dirs="'$as_qdir' $as_dirs"
32226      as_dir=`$as_dirname -- "$as_dir" ||
32227$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32228	 X"$as_dir" : 'X\(//\)[^/]' \| \
32229	 X"$as_dir" : 'X\(//\)$' \| \
32230	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32231$as_echo X"$as_dir" |
32232    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32233	    s//\1/
32234	    q
32235	  }
32236	  /^X\(\/\/\)[^/].*/{
32237	    s//\1/
32238	    q
32239	  }
32240	  /^X\(\/\/\)$/{
32241	    s//\1/
32242	    q
32243	  }
32244	  /^X\(\/\).*/{
32245	    s//\1/
32246	    q
32247	  }
32248	  s/.*/./; q'`
32249      test -d "$as_dir" && break
32250    done
32251    test -z "$as_dirs" || eval "mkdir $as_dirs"
32252  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32253
32254
32255} # as_fn_mkdir_p
32256if mkdir -p . 2>/dev/null; then
32257  as_mkdir_p='mkdir -p "$as_dir"'
32258else
32259  test -d ./-p && rmdir ./-p
32260  as_mkdir_p=false
32261fi
32262
32263if test -x / >/dev/null 2>&1; then
32264  as_test_x='test -x'
32265else
32266  if ls -dL / >/dev/null 2>&1; then
32267    as_ls_L_option=L
32268  else
32269    as_ls_L_option=
32270  fi
32271  as_test_x='
32272    eval sh -c '\''
32273      if test -d "$1"; then
32274	test -d "$1/.";
32275      else
32276	case $1 in #(
32277	-*)set "./$1";;
32278	esac;
32279	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32280	???[sx]*):;;*)false;;esac;fi
32281    '\'' sh
32282  '
32283fi
32284as_executable_p=$as_test_x
32285
32286# Sed expression to map a string onto a valid CPP name.
32287as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32288
32289# Sed expression to map a string onto a valid variable name.
32290as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32291
32292
32293exec 6>&1
32294## ----------------------------------- ##
32295## Main body of $CONFIG_STATUS script. ##
32296## ----------------------------------- ##
32297_ASEOF
32298test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32299
32300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32301# Save the log message, to keep $0 and so on meaningful, and to
32302# report actual input values of CONFIG_FILES etc. instead of their
32303# values after options handling.
32304ac_log="
32305This file was extended by OpenJDK $as_me jdk8, which was
32306generated by GNU Autoconf 2.67.  Invocation command line was
32307
32308  CONFIG_FILES    = $CONFIG_FILES
32309  CONFIG_HEADERS  = $CONFIG_HEADERS
32310  CONFIG_LINKS    = $CONFIG_LINKS
32311  CONFIG_COMMANDS = $CONFIG_COMMANDS
32312  $ $0 $@
32313
32314on `(hostname || uname -n) 2>/dev/null | sed 1q`
32315"
32316
32317_ACEOF
32318
32319case $ac_config_files in *"
32320"*) set x $ac_config_files; shift; ac_config_files=$*;;
32321esac
32322
32323case $ac_config_headers in *"
32324"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32325esac
32326
32327
32328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32329# Files that config.status was made for.
32330config_files="$ac_config_files"
32331config_headers="$ac_config_headers"
32332
32333_ACEOF
32334
32335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32336ac_cs_usage="\
32337\`$as_me' instantiates files and other configuration actions
32338from templates according to the current configuration.  Unless the files
32339and actions are specified as TAGs, all are instantiated by default.
32340
32341Usage: $0 [OPTION]... [TAG]...
32342
32343  -h, --help       print this help, then exit
32344  -V, --version    print version number and configuration settings, then exit
32345      --config     print configuration, then exit
32346  -q, --quiet, --silent
32347                   do not print progress messages
32348  -d, --debug      don't remove temporary files
32349      --recheck    update $as_me by reconfiguring in the same conditions
32350      --file=FILE[:TEMPLATE]
32351                   instantiate the configuration file FILE
32352      --header=FILE[:TEMPLATE]
32353                   instantiate the configuration header FILE
32354
32355Configuration files:
32356$config_files
32357
32358Configuration headers:
32359$config_headers
32360
32361Report bugs to <build-dev@openjdk.java.net>.
32362OpenJDK home page: <http://openjdk.java.net>."
32363
32364_ACEOF
32365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32366ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32367ac_cs_version="\\
32368OpenJDK config.status jdk8
32369configured by $0, generated by GNU Autoconf 2.67,
32370  with options \\"\$ac_cs_config\\"
32371
32372Copyright (C) 2010 Free Software Foundation, Inc.
32373This config.status script is free software; the Free Software Foundation
32374gives unlimited permission to copy, distribute and modify it."
32375
32376ac_pwd='$ac_pwd'
32377srcdir='$srcdir'
32378AWK='$AWK'
32379test -n "\$AWK" || AWK=awk
32380_ACEOF
32381
32382cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32383# The default lists apply if the user does not specify any file.
32384ac_need_defaults=:
32385while test $# != 0
32386do
32387  case $1 in
32388  --*=?*)
32389    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32390    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32391    ac_shift=:
32392    ;;
32393  --*=)
32394    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32395    ac_optarg=
32396    ac_shift=:
32397    ;;
32398  *)
32399    ac_option=$1
32400    ac_optarg=$2
32401    ac_shift=shift
32402    ;;
32403  esac
32404
32405  case $ac_option in
32406  # Handling of the options.
32407  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32408    ac_cs_recheck=: ;;
32409  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32410    $as_echo "$ac_cs_version"; exit ;;
32411  --config | --confi | --conf | --con | --co | --c )
32412    $as_echo "$ac_cs_config"; exit ;;
32413  --debug | --debu | --deb | --de | --d | -d )
32414    debug=: ;;
32415  --file | --fil | --fi | --f )
32416    $ac_shift
32417    case $ac_optarg in
32418    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32419    '') as_fn_error $? "missing file argument" ;;
32420    esac
32421    as_fn_append CONFIG_FILES " '$ac_optarg'"
32422    ac_need_defaults=false;;
32423  --header | --heade | --head | --hea )
32424    $ac_shift
32425    case $ac_optarg in
32426    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32427    esac
32428    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32429    ac_need_defaults=false;;
32430  --he | --h)
32431    # Conflict between --help and --header
32432    as_fn_error $? "ambiguous option: \`$1'
32433Try \`$0 --help' for more information.";;
32434  --help | --hel | -h )
32435    $as_echo "$ac_cs_usage"; exit ;;
32436  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32437  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32438    ac_cs_silent=: ;;
32439
32440  # This is an error.
32441  -*) as_fn_error $? "unrecognized option: \`$1'
32442Try \`$0 --help' for more information." ;;
32443
32444  *) as_fn_append ac_config_targets " $1"
32445     ac_need_defaults=false ;;
32446
32447  esac
32448  shift
32449done
32450
32451ac_configure_extra_args=
32452
32453if $ac_cs_silent; then
32454  exec 6>/dev/null
32455  ac_configure_extra_args="$ac_configure_extra_args --silent"
32456fi
32457
32458_ACEOF
32459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32460if \$ac_cs_recheck; then
32461  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32462  shift
32463  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32464  CONFIG_SHELL='$SHELL'
32465  export CONFIG_SHELL
32466  exec "\$@"
32467fi
32468
32469_ACEOF
32470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32471exec 5>>config.log
32472{
32473  echo
32474  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32475## Running $as_me. ##
32476_ASBOX
32477  $as_echo "$ac_log"
32478} >&5
32479
32480_ACEOF
32481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32482_ACEOF
32483
32484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32485
32486# Handling of arguments.
32487for ac_config_target in $ac_config_targets
32488do
32489  case $ac_config_target in
32490    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32491    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32492    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32493    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32494    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32495    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32496    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32497
32498  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32499  esac
32500done
32501
32502
32503# If the user did not use the arguments to specify the items to instantiate,
32504# then the envvar interface is used.  Set only those that are not.
32505# We use the long form for the default assignment because of an extremely
32506# bizarre bug on SunOS 4.1.3.
32507if $ac_need_defaults; then
32508  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32509  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32510fi
32511
32512# Have a temporary directory for convenience.  Make it in the build tree
32513# simply because there is no reason against having it here, and in addition,
32514# creating and moving files from /tmp can sometimes cause problems.
32515# Hook for its removal unless debugging.
32516# Note that there is a small window in which the directory will not be cleaned:
32517# after its creation but before its name has been assigned to `$tmp'.
32518$debug ||
32519{
32520  tmp=
32521  trap 'exit_status=$?
32522  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32523' 0
32524  trap 'as_fn_exit 1' 1 2 13 15
32525}
32526# Create a (secure) tmp directory for tmp files.
32527
32528{
32529  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32530  test -n "$tmp" && test -d "$tmp"
32531}  ||
32532{
32533  tmp=./conf$$-$RANDOM
32534  (umask 077 && mkdir "$tmp")
32535} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32536
32537# Set up the scripts for CONFIG_FILES section.
32538# No need to generate them if there are no CONFIG_FILES.
32539# This happens for instance with `./config.status config.h'.
32540if test -n "$CONFIG_FILES"; then
32541
32542
32543ac_cr=`echo X | tr X '\015'`
32544# On cygwin, bash can eat \r inside `` if the user requested igncr.
32545# But we know of no other shell where ac_cr would be empty at this
32546# point, so we can use a bashism as a fallback.
32547if test "x$ac_cr" = x; then
32548  eval ac_cr=\$\'\\r\'
32549fi
32550ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32551if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32552  ac_cs_awk_cr='\\r'
32553else
32554  ac_cs_awk_cr=$ac_cr
32555fi
32556
32557echo 'BEGIN {' >"$tmp/subs1.awk" &&
32558_ACEOF
32559
32560
32561{
32562  echo "cat >conf$$subs.awk <<_ACEOF" &&
32563  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32564  echo "_ACEOF"
32565} >conf$$subs.sh ||
32566  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32567ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32568ac_delim='%!_!# '
32569for ac_last_try in false false false false false :; do
32570  . ./conf$$subs.sh ||
32571    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32572
32573  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32574  if test $ac_delim_n = $ac_delim_num; then
32575    break
32576  elif $ac_last_try; then
32577    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32578  else
32579    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32580  fi
32581done
32582rm -f conf$$subs.sh
32583
32584cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32585cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32586_ACEOF
32587sed -n '
32588h
32589s/^/S["/; s/!.*/"]=/
32590p
32591g
32592s/^[^!]*!//
32593:repl
32594t repl
32595s/'"$ac_delim"'$//
32596t delim
32597:nl
32598h
32599s/\(.\{148\}\)..*/\1/
32600t more1
32601s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32602p
32603n
32604b repl
32605:more1
32606s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32607p
32608g
32609s/.\{148\}//
32610t nl
32611:delim
32612h
32613s/\(.\{148\}\)..*/\1/
32614t more2
32615s/["\\]/\\&/g; s/^/"/; s/$/"/
32616p
32617b
32618:more2
32619s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32620p
32621g
32622s/.\{148\}//
32623t delim
32624' <conf$$subs.awk | sed '
32625/^[^""]/{
32626  N
32627  s/\n//
32628}
32629' >>$CONFIG_STATUS || ac_write_fail=1
32630rm -f conf$$subs.awk
32631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32632_ACAWK
32633cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32634  for (key in S) S_is_set[key] = 1
32635  FS = ""
32636
32637}
32638{
32639  line = $ 0
32640  nfields = split(line, field, "@")
32641  substed = 0
32642  len = length(field[1])
32643  for (i = 2; i < nfields; i++) {
32644    key = field[i]
32645    keylen = length(key)
32646    if (S_is_set[key]) {
32647      value = S[key]
32648      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32649      len += length(value) + length(field[++i])
32650      substed = 1
32651    } else
32652      len += 1 + keylen
32653  }
32654
32655  print line
32656}
32657
32658_ACAWK
32659_ACEOF
32660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32661if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32662  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32663else
32664  cat
32665fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32666  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32667_ACEOF
32668
32669# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32670# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32671# trailing colons and then remove the whole line if VPATH becomes empty
32672# (actually we leave an empty line to preserve line numbers).
32673if test "x$srcdir" = x.; then
32674  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32675h
32676s///
32677s/^/:/
32678s/[	 ]*$/:/
32679s/:\$(srcdir):/:/g
32680s/:\${srcdir}:/:/g
32681s/:@srcdir@:/:/g
32682s/^:*//
32683s/:*$//
32684x
32685s/\(=[	 ]*\).*/\1/
32686G
32687s/\n//
32688s/^[^=]*=[	 ]*$//
32689}'
32690fi
32691
32692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32693fi # test -n "$CONFIG_FILES"
32694
32695# Set up the scripts for CONFIG_HEADERS section.
32696# No need to generate them if there are no CONFIG_HEADERS.
32697# This happens for instance with `./config.status Makefile'.
32698if test -n "$CONFIG_HEADERS"; then
32699cat >"$tmp/defines.awk" <<\_ACAWK ||
32700BEGIN {
32701_ACEOF
32702
32703# Transform confdefs.h into an awk script `defines.awk', embedded as
32704# here-document in config.status, that substitutes the proper values into
32705# config.h.in to produce config.h.
32706
32707# Create a delimiter string that does not exist in confdefs.h, to ease
32708# handling of long lines.
32709ac_delim='%!_!# '
32710for ac_last_try in false false :; do
32711  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32712  if test -z "$ac_t"; then
32713    break
32714  elif $ac_last_try; then
32715    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32716  else
32717    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32718  fi
32719done
32720
32721# For the awk script, D is an array of macro values keyed by name,
32722# likewise P contains macro parameters if any.  Preserve backslash
32723# newline sequences.
32724
32725ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32726sed -n '
32727s/.\{148\}/&'"$ac_delim"'/g
32728t rset
32729:rset
32730s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32731t def
32732d
32733:def
32734s/\\$//
32735t bsnl
32736s/["\\]/\\&/g
32737s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32738D["\1"]=" \3"/p
32739s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32740d
32741:bsnl
32742s/["\\]/\\&/g
32743s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32744D["\1"]=" \3\\\\\\n"\\/p
32745t cont
32746s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32747t cont
32748d
32749:cont
32750n
32751s/.\{148\}/&'"$ac_delim"'/g
32752t clear
32753:clear
32754s/\\$//
32755t bsnlc
32756s/["\\]/\\&/g; s/^/"/; s/$/"/p
32757d
32758:bsnlc
32759s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32760b cont
32761' <confdefs.h | sed '
32762s/'"$ac_delim"'/"\\\
32763"/g' >>$CONFIG_STATUS || ac_write_fail=1
32764
32765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32766  for (key in D) D_is_set[key] = 1
32767  FS = ""
32768}
32769/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32770  line = \$ 0
32771  split(line, arg, " ")
32772  if (arg[1] == "#") {
32773    defundef = arg[2]
32774    mac1 = arg[3]
32775  } else {
32776    defundef = substr(arg[1], 2)
32777    mac1 = arg[2]
32778  }
32779  split(mac1, mac2, "(") #)
32780  macro = mac2[1]
32781  prefix = substr(line, 1, index(line, defundef) - 1)
32782  if (D_is_set[macro]) {
32783    # Preserve the white space surrounding the "#".
32784    print prefix "define", macro P[macro] D[macro]
32785    next
32786  } else {
32787    # Replace #undef with comments.  This is necessary, for example,
32788    # in the case of _POSIX_SOURCE, which is predefined and required
32789    # on some systems where configure will not decide to define it.
32790    if (defundef == "undef") {
32791      print "/*", prefix defundef, macro, "*/"
32792      next
32793    }
32794  }
32795}
32796{ print }
32797_ACAWK
32798_ACEOF
32799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32800  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32801fi # test -n "$CONFIG_HEADERS"
32802
32803
32804eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32805shift
32806for ac_tag
32807do
32808  case $ac_tag in
32809  :[FHLC]) ac_mode=$ac_tag; continue;;
32810  esac
32811  case $ac_mode$ac_tag in
32812  :[FHL]*:*);;
32813  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32814  :[FH]-) ac_tag=-:-;;
32815  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32816  esac
32817  ac_save_IFS=$IFS
32818  IFS=:
32819  set x $ac_tag
32820  IFS=$ac_save_IFS
32821  shift
32822  ac_file=$1
32823  shift
32824
32825  case $ac_mode in
32826  :L) ac_source=$1;;
32827  :[FH])
32828    ac_file_inputs=
32829    for ac_f
32830    do
32831      case $ac_f in
32832      -) ac_f="$tmp/stdin";;
32833      *) # Look for the file first in the build tree, then in the source tree
32834	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32835	 # because $ac_f cannot contain `:'.
32836	 test -f "$ac_f" ||
32837	   case $ac_f in
32838	   [\\/$]*) false;;
32839	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32840	   esac ||
32841	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32842      esac
32843      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32844      as_fn_append ac_file_inputs " '$ac_f'"
32845    done
32846
32847    # Let's still pretend it is `configure' which instantiates (i.e., don't
32848    # use $as_me), people would be surprised to read:
32849    #    /* config.h.  Generated by config.status.  */
32850    configure_input='Generated from '`
32851	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32852	`' by configure.'
32853    if test x"$ac_file" != x-; then
32854      configure_input="$ac_file.  $configure_input"
32855      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32856$as_echo "$as_me: creating $ac_file" >&6;}
32857    fi
32858    # Neutralize special characters interpreted by sed in replacement strings.
32859    case $configure_input in #(
32860    *\&* | *\|* | *\\* )
32861       ac_sed_conf_input=`$as_echo "$configure_input" |
32862       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32863    *) ac_sed_conf_input=$configure_input;;
32864    esac
32865
32866    case $ac_tag in
32867    *:-:* | *:-) cat >"$tmp/stdin" \
32868      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32869    esac
32870    ;;
32871  esac
32872
32873  ac_dir=`$as_dirname -- "$ac_file" ||
32874$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32875	 X"$ac_file" : 'X\(//\)[^/]' \| \
32876	 X"$ac_file" : 'X\(//\)$' \| \
32877	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32878$as_echo X"$ac_file" |
32879    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32880	    s//\1/
32881	    q
32882	  }
32883	  /^X\(\/\/\)[^/].*/{
32884	    s//\1/
32885	    q
32886	  }
32887	  /^X\(\/\/\)$/{
32888	    s//\1/
32889	    q
32890	  }
32891	  /^X\(\/\).*/{
32892	    s//\1/
32893	    q
32894	  }
32895	  s/.*/./; q'`
32896  as_dir="$ac_dir"; as_fn_mkdir_p
32897  ac_builddir=.
32898
32899case "$ac_dir" in
32900.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32901*)
32902  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32903  # A ".." for each directory in $ac_dir_suffix.
32904  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32905  case $ac_top_builddir_sub in
32906  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32907  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32908  esac ;;
32909esac
32910ac_abs_top_builddir=$ac_pwd
32911ac_abs_builddir=$ac_pwd$ac_dir_suffix
32912# for backward compatibility:
32913ac_top_builddir=$ac_top_build_prefix
32914
32915case $srcdir in
32916  .)  # We are building in place.
32917    ac_srcdir=.
32918    ac_top_srcdir=$ac_top_builddir_sub
32919    ac_abs_top_srcdir=$ac_pwd ;;
32920  [\\/]* | ?:[\\/]* )  # Absolute name.
32921    ac_srcdir=$srcdir$ac_dir_suffix;
32922    ac_top_srcdir=$srcdir
32923    ac_abs_top_srcdir=$srcdir ;;
32924  *) # Relative name.
32925    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32926    ac_top_srcdir=$ac_top_build_prefix$srcdir
32927    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32928esac
32929ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32930
32931
32932  case $ac_mode in
32933  :F)
32934  #
32935  # CONFIG_FILE
32936  #
32937
32938_ACEOF
32939
32940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32941# If the template does not know about datarootdir, expand it.
32942# FIXME: This hack should be removed a few years after 2.60.
32943ac_datarootdir_hack=; ac_datarootdir_seen=
32944ac_sed_dataroot='
32945/datarootdir/ {
32946  p
32947  q
32948}
32949/@datadir@/p
32950/@docdir@/p
32951/@infodir@/p
32952/@localedir@/p
32953/@mandir@/p'
32954case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32955*datarootdir*) ac_datarootdir_seen=yes;;
32956*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32957  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32958$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32959_ACEOF
32960cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32961  ac_datarootdir_hack='
32962  s&@datadir@&$datadir&g
32963  s&@docdir@&$docdir&g
32964  s&@infodir@&$infodir&g
32965  s&@localedir@&$localedir&g
32966  s&@mandir@&$mandir&g
32967  s&\\\${datarootdir}&$datarootdir&g' ;;
32968esac
32969_ACEOF
32970
32971# Neutralize VPATH when `$srcdir' = `.'.
32972# Shell code in configure.ac might set extrasub.
32973# FIXME: do we really want to maintain this feature?
32974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32975ac_sed_extra="$ac_vpsub
32976$extrasub
32977_ACEOF
32978cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32979:t
32980/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32981s|@configure_input@|$ac_sed_conf_input|;t t
32982s&@top_builddir@&$ac_top_builddir_sub&;t t
32983s&@top_build_prefix@&$ac_top_build_prefix&;t t
32984s&@srcdir@&$ac_srcdir&;t t
32985s&@abs_srcdir@&$ac_abs_srcdir&;t t
32986s&@top_srcdir@&$ac_top_srcdir&;t t
32987s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32988s&@builddir@&$ac_builddir&;t t
32989s&@abs_builddir@&$ac_abs_builddir&;t t
32990s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32991$ac_datarootdir_hack
32992"
32993eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32994  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32995
32996test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32997  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32998  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32999  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33000which seems to be undefined.  Please make sure it is defined" >&5
33001$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33002which seems to be undefined.  Please make sure it is defined" >&2;}
33003
33004  rm -f "$tmp/stdin"
33005  case $ac_file in
33006  -) cat "$tmp/out" && rm -f "$tmp/out";;
33007  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33008  esac \
33009  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33010 ;;
33011  :H)
33012  #
33013  # CONFIG_HEADER
33014  #
33015  if test x"$ac_file" != x-; then
33016    {
33017      $as_echo "/* $configure_input  */" \
33018      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33019    } >"$tmp/config.h" \
33020      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33021    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33022      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33023$as_echo "$as_me: $ac_file is unchanged" >&6;}
33024    else
33025      rm -f "$ac_file"
33026      mv "$tmp/config.h" "$ac_file" \
33027	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33028    fi
33029  else
33030    $as_echo "/* $configure_input  */" \
33031      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33032      || as_fn_error $? "could not create -" "$LINENO" 5
33033  fi
33034 ;;
33035
33036
33037  esac
33038
33039done # for ac_tag
33040
33041
33042as_fn_exit 0
33043_ACEOF
33044ac_clean_files=$ac_clean_files_save
33045
33046test $ac_write_fail = 0 ||
33047  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33048
33049
33050# configure is writing to config.log, and then calls config.status.
33051# config.status does its own redirection, appending to config.log.
33052# Unfortunately, on DOS this fails, as config.log is still kept open
33053# by configure, so config.status won't be able to write to it; its
33054# output is simply discarded.  So we exec the FD to /dev/null,
33055# effectively closing config.log, so it can be properly (re)opened and
33056# appended to by config.status.  When coming back to configure, we
33057# need to make the FD available again.
33058if test "$no_create" != yes; then
33059  ac_cs_success=:
33060  ac_config_status_args=
33061  test "$silent" = yes &&
33062    ac_config_status_args="$ac_config_status_args --quiet"
33063  exec 5>/dev/null
33064  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33065  exec 5>>config.log
33066  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33067  # would make configure fail if this is the last instruction.
33068  $ac_cs_success || as_fn_exit 1
33069fi
33070if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33071  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33072$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33073fi
33074
33075
33076# Make the compare script executable
33077$CHMOD +x $OUTPUT_ROOT/compare.sh
33078
33079# Finally output some useful information to the user
33080
33081# Finally output some useful information to the user
33082
33083if test "x$CCACHE_FOUND" != x; then
33084	if  test "x$HAS_GOOD_CCACHE" = x; then
33085		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33086		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33087	else
33088		CCACHE_STATUS="installed and in use"
33089	fi
33090else
33091	if test "x$GCC" = xyes; then
33092		CCACHE_STATUS="not installed (consider installing)"
33093		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33094	else
33095		CCACHE_STATUS="not available for your system"
33096	fi
33097fi
33098
33099printf "\n"
33100printf "====================================================\n"
33101printf "A new configuration has been successfully created in\n"
33102printf "$OUTPUT_ROOT\n"
33103if test "x$CONFIGURE_COMMAND_LINE" != x; then
33104	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33105else
33106	printf "using default settings.\n"
33107fi
33108
33109printf "\n"
33110printf "Configuration summary:\n"
33111printf "* Debug level:    $DEBUG_LEVEL\n"
33112printf "* JDK variant:    $JDK_VARIANT\n"
33113printf "* JVM variants:   $with_jvm_variants\n"
33114printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33115
33116printf "\n"
33117printf "Tools summary:\n"
33118if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33119  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33120fi
33121printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33122printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33123printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33124
33125printf "\n"
33126printf "Build performance summary:\n"
33127printf "* Cores to use:   $NUM_CORES\n"
33128printf "* Memory limit:   $MEMORY_SIZE MB\n"
33129printf "* ccache status:  $CCACHE_STATUS\n"
33130printf "\n"
33131
33132if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33133	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33134	printf "$CCACHE_HELP_MSG\n"
33135
33136    # Print a helpful message on how to acquire the necessary build dependency.
33137    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33138    MISSING_DEPENDENCY=ccache
33139    PKGHANDLER_COMMAND=
33140
33141    case $PKGHANDLER in
33142	apt-get)
33143                apt_help     $MISSING_DEPENDENCY ;;
33144    yum)
33145                yum_help     $MISSING_DEPENDENCY ;;
33146	port)
33147                port_help    $MISSING_DEPENDENCY ;;
33148	pkgutil)
33149                pkgutil_help $MISSING_DEPENDENCY ;;
33150	pkgadd)
33151                pkgadd_help  $MISSING_DEPENDENCY ;;
33152    * )
33153      break ;;
33154    esac
33155
33156    if test "x$PKGHANDLER_COMMAND" != x; then
33157        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33158    fi
33159
33160	printf "$HELP_MSG\n"
33161	printf "\n"
33162fi
33163
33164if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33165	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33166	printf "will result in longer build times.\n"
33167	printf "\n"
33168fi
33169
33170if test "x$FOUND_ALT_VARIABLES" != "x"; then
33171	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33172	printf "These are not respected, and will be ignored. It is recommended\n"
33173	printf "that you clean your environment. The following variables are set:\n"
33174	printf "$FOUND_ALT_VARIABLES\n"
33175	printf "\n"
33176fi
33177
33178if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33179	printf "WARNING: Your build output directory is not on a local disk.\n"
33180	printf "This will severely degrade build performance!\n"
33181	printf "It is recommended that you create an output directory on a local disk,\n"
33182	printf "and run the configure script again from that directory.\n"
33183	printf "\n"
33184fi
33185
33186if test "x$IS_RECONFIGURE" = "xyes"; then
33187	printf "WARNING: The result of this configuration has overridden an older\n"
33188	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33189	printf "proper build. Failure to do so might result in strange build problems.\n"
33190	printf "\n"
33191fi
33192
33193